# Интегралы


**Интеграл** - это "действие" обратное производной

$v(t)=t(8-t)$

$s(t)=\int v(t) dt$




```python
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from sympy import *

def showPlot(x_start, x_max, step, callback, title='Function', x_title='X', y_title='Y'):
    x = np.arange(x_start, x_max, step)
    y = callback(x)

    plt.plot(x, y)
    plt.xlabel(x_title)
    plt.ylabel(y_title)
    plt.title(title)
    plt.grid(True)
    plt.show()
    
def value_of_expr(x_vector, symbol, expr):
    y = np.empty_like(x_vector)
    for index, element  in enumerate(x_vector):
        y[index] = (expr.subs(symbol, element))
    return y

init_printing()
```


```python
t, v = symbols('t v')

vt = t*(8-t)
showPlot(0, 8, 0.01, lambda i: value_of_expr(i, t, vt), title='Velocity', x_title='time', y_title='velocity')
vt
```


```python
distance = integrate(vt, t)
integral
```


```python
showPlot(0, 8, 0.01, lambda i: value_of_expr(i, t, distance), title='Distance', x_title='time', y_title='distance')
```

# Таблица интегралов



# Определенные интегралы

$\int_{a}^{b} f(x) dx = F(X) |^{b}_{a}=F(b)-F(a)$




```python
distance = integrate(vt, (t, 0, 8))
N(distance)
```


```python
showPlot(0, 8, 1, lambda i: value_of_expr(i, t, vt), title='Velocity', x_title='time', y_title='velocity')
```


```python
i = np.arange(0, 8, .1)
y = value_of_expr(i, t, vt)
print(y)
print(sum(y*.1))
```

    [ 0.    0.79  1.56  2.31  3.04  3.75  4.44  5.11  5.76  6.39  7.    7.59
      8.16  8.71  9.24  9.75 10.24 10.71 11.16 11.59 12.   12.39 12.76 13.11
     13.44 13.75 14.04 14.31 14.56 14.79 15.   15.19 15.36 15.51 15.64 15.75
     15.84 15.91 15.96 15.99 16.   15.99 15.96 15.91 15.84 15.75 15.64 15.51
     15.36 15.19 15.   14.79 14.56 14.31 14.04 13.75 13.44 13.11 12.76 12.39
     12.   11.59 11.16 10.71 10.24  9.75  9.24  8.71  8.16  7.59  7.    6.39
      5.76  5.11  4.44  3.75  3.04  2.31  1.56  0.79]
    85.32000000000002



```python

```

10d4a788c04ba4a2617a575c36921ee78575fecc
ipynb
Jupyter Notebook
module_002_math/lesson_003_integrals/tutorials_sources/Integrals.ipynb
CorbenTerminator/ML
df083b768be23e53f28d160b23e6dbe8775115f2
Apache-2.0
2019-04-06T17:12:33.000Z
2021-07-29T12:35:48.000Z
module_002_math/lesson_003_integrals/tutorials_sources/Integrals.ipynb
CorbenTerminator/ML
df083b768be23e53f28d160b23e6dbe8775115f2
Apache-2.0
2019-04-01T19:24:38.000Z
2020-01-28T09:10:37.000Z
module_002_math/lesson_003_integrals/tutorials_sources/Integrals.ipynb
CorbenTerminator/ML
df083b768be23e53f28d160b23e6dbe8775115f2
Apache-2.0
2019-04-01T18:45:05.000Z
2022-01-20T12:32:46.000Z
Qwen/Qwen-72B
1. YES
2. YES