# Integration¶

### The fundamental theorem of calculus¶

The idea behind the fundamental theorem is that a definite integral can be computed using an antiderivative.

For a function $f(x)$, the antiderivative (aka indefinite integral) is commonly denoted $F(x)$ and is defined to be the value that, when differentiated, gives $f(x)$.

\frac{d}{dx}F(x) = f(x)
F(x) = \int f(x)
\int_{a}^b f(x) = F(b)-F(a)

### Single integrals¶

An integral is an infinite sum. $$\int_{a}^b x^2 dx$$

### Computing integrals¶

#### Integration by parts¶

The product rule for differentiation states that

\frac{d}{dx}(h(x)g(x)) = \frac{dh}{dx}g + h\frac{dg}{dx}

integrating this equation on both sides with respect to $x$ yields

\int \frac{d}{dx}(h(x)g(x)) = \int \frac{dh}{dx}g dx + \int h\frac{dg}{dx} dx

as the indefinite integral is defined to be the inverse operation to differentiation, the left hand side of the equation simplifies to $h(g)g(x)$. On the right hand side the differentials cancel, leaving

h(x)g(x) = \int g dh + \int h dg

simple algebra shows that

\int g dh = h(x)g(x) - \int h dg

this formula is known as integration by parts.