# Integration techniques

Integration by parts applies to the product of two functions.

Integration by parts states that, if $$f$$ and $$g$$ are two functions, $$$ \int_a^b f'(x)g(x)\,dx = -\int_a^b f(x)g'(x)\,dx + \Big[ fg\Big]_a^b.$$$ Here, we use the notation $$\Big[ f \Big]_a^b = f(b) - f(a)$$.

With $$f(x) = \ln x$$, $$g(x) = x$$ so that $$f'(x) = 1/x$$, $$g'(x) =1$$, $$$\int_1^2\ln x\,dx = \Big[x\ln x\Big]_1^2 - \int_1^2\,dx = 2\ln 2-1.$$$

LIATE is a common rule to determine which type of function to **differentiate** first. It stands for Logarithmic ($$\ln x$$), Inverse trigonometric ($$\arcsin x$$), Algebraic ($$x^n$$), Trigonometric ($$\sin x$$), Exponential ($$e^x$$). To integrate the product of two functions, the function that comes first in this list is taken as the $$g$$ in the above formula.

In the example above, LIATE says that we should differentiate $$\ln x$$ and integrate the algebraic function $$1$$. A variant is ILATE.

The integration by parts formula is proved simply by noting that the derivative of $$fg$$ is $$f'g+fg'$$. By the fundamental theorem of calculus $$$ \Big[ fg\Big]_a^b = \int_a^b(fg)'\,dx = \int_a^b f'(x)g(x)\,dx + \int_a^b f(x)g'(x)\,dx. $$$

Integration by substitution is a useful technique to compute integrals when the integrand depends on the composition of two functions.

Integration by substitution states that, if $$f$$ and $$g$$ are two functions, $$$\displaystyle \int_{f(a)}^{f(b)}g(y)\,dy = \int_a^b f'(x) g\big(f(x)\big) \,dx $$$

Setting $$f(x) = x^2$$ and $$g(y) = e^y$$, we obtain $$$\int_0^2 2x e^{x^2}\,dx = \int_0^4 e^{y}\,dy = \Big[e^y\Big]_0^4 = e^4 - 1$$$

Informally, integration by substitution corresponds to the change of variable $$y= f(x)$$. We have that $$dy = f'(x)\,dx$$. Moreover, we see that when $$y$$ varies between the limits $$f(a)$$ and $$f(b)$$, $$x$$ varies between $$a$$ and $$b$$.

Rigorously, the integration by parts formula is an application of the **chain rule**, i.e. the differentiation rule for the **composition** of functions.

**Proof** If $$G$$ is a primitive of $$g$$, the derivative of $$G\circ f$$ is $$f'\, G'\circ f = f'\,g\circ f$$. So the fundamental theorem of calculus reads \begin{gather*} \int_{f(a)}^{f(b)}g(y)\,dy = G\circ f(b) - G\circ f(a) \\ = \int_a^b (G\circ f)'\,dx = \int_a^b f'(x)g\big(f(x)\big)\,dx \end{gather*}