# Integrals

Calculus in the ancient times: Method of exhaustion (see wikipedia)

User-friendly definition of the integral:

$lim_{N\to\infty}\frac{b-a}{N}\sum_{i=1}^N f(x_i)$

It would be better if the integral would not depend on the definition of the bins. In the limit $N\to\infty$ it doesn’t matter if they are evenly spaced or not:

$lim_{N\to\infty}\sum_{i=1}^N f(x_i)dx_i$

Fundamental theorem of calculus:

If $f(x)$ is a continuous real-valued function on a closed interval $[a,b]$

$F(x) = \int_a^x f(t) dt$

then $F(x)$ is continuous and differentiable in $[a,b]$ and:

$DF(x) = f(x)$

as a corollary:

$\int_a^b f(x) dx = F(b)-F(a)$

### Exercises

$\int \left ( 3x^{-5} - 7x^3 + 3 - x^9\right ) dx$

$\int \sin^3x \cos x dx$

$\int{ \left ( 2x + 3\right ) \left ( x^2 + 3 x + 15 \right ) dx}$

$\int e^x e^{-3 x} dx$

$\int x^2e^x dx$ (tip: by parts)

Try to solve a more general formula: $\int x^n e^x dx$

(get the solution using Wolfram:alpha )

For the die-hard:

$\int \frac{dx}{ \sqrt{3-2 x^2} }$

( solution )

tip: make a substitution deplyoing this relationship:

$\cos^2 \theta = 1 - \sin^2 \theta$