# Integration by parts

Integration by parts (IBP) is a method of integration with the formula:

:{\displaystyle {\begin{aligned}\int _{a}^{b}u(x)v'(x)dx&={\Big [}u(x)v(x){\Big ]}_{a}^{b}-\int _{a}^{b}u'(x)v(x)dx\\[6pt]&=u(b)v(b)-u(a)v(a)-\int _{a}^{b}u'(x)v(x)dx.\end{aligned}}}

Or more compactly,

${\displaystyle \int _{a}^{b}udv=uv|_{a}^{b}-\int _{a}^{b}vdu}$       or without bounds       ${\displaystyle \int udv=uv-\int vdu}$

where ${\displaystyle u}$ and ${\displaystyle v}$ are functions of a variable, for instance, ${\displaystyle x}$, giving ${\displaystyle u(x)}$ and ${\displaystyle v(x)}$.

${\displaystyle {\frac {d}{dx}}u(x)\rightarrow {\frac {du}{dx}}=u'(x)\rightarrow u'(x)dx=du}$       and       ${\displaystyle \int dv=\int v(x)=v}$
Note: ${\displaystyle dv}$ is whatever terms are not included as ${\displaystyle u}$.

### ILATE Rule

A rule of thumb has been proposed, consisting of choosing ${\displaystyle u}$ as the function that comes first in the following list:

I – inverse trigonometric functions: ${\displaystyle \arctan(x),\ \operatorname {arcsec}(x),}$ etc.
L – logarithmic functions: ${\displaystyle \ln(x),\ \log _{b}(x),}$ etc.
A – polynomials: ${\displaystyle x^{2},\ 3x^{50},}$ etc.
T – trigonometric functions: ${\displaystyle \sin(x),\ \tan(x),}$ etc.
E – exponential functions: ${\displaystyle e^{x},\ 19^{x},}$ etc.

## Derivation

The theorem can be derived as follows. For two continuously differentiable functions ${\displaystyle u(x)}$  and ${\displaystyle v(x)}$ , the product rule states:

${\displaystyle {\Big (}u(x)v(x){\Big )}'\ =\ v(x)u'(x)+u(x)v'(x).}$

Integrating both sides with respect to ${\displaystyle x}$ ,

${\displaystyle \int {\Big (}u(x)v(x){\Big )}'\,dx\ =\ \int u'(x)v(x)\,dx+\int u(x)v'(x)\,dx,}$

and noting that an indefinite integral is an antiderivative gives

${\displaystyle u(x)v(x)\ =\ \int u'(x)v(x)\,dx+\int u(x)v'(x)\,dx,}$

where we neglect writing the constant of integration. This yields the formula for integration by parts:

${\displaystyle \int u(x)v'(x)\,dx\ =\ u(x)v(x)-\int u'(x)v(x)\,dx,}$

or in terms of the differentials ${\displaystyle \ du=u'(x)\,dx,\ \ dv=v'(x)\,dx,\quad }$

${\displaystyle \int u(x)\,dv\ =\ u(x)v(x)-\int v(x)\,du.}$

This is to be understood as an equality of functions with an unspecified constant added to each side. Taking the difference of each side between two values x = a and x = b and applying the fundamental theorem of calculus gives the definite integral version:

${\displaystyle \int _{a}^{b}u(x)v'(x)\,dx\ =\ u(b)v(b)-u(a)v(a)-\int _{a}^{b}u'(x)v(x)\,dx.}$

## Examples

### Functions multiplied by one and itself

#### Given ${\displaystyle I=\int \ln(x)\cdot 1\ dx\ }$

The first example is ∫ ln(x) dx. We write this as:

${\displaystyle I=\int \ln(x)\cdot 1\ dx\ .}$

Let:

${\displaystyle u=\ln(x)\ \Rightarrow \ du={\frac {dx}{x}}}$
${\displaystyle dv=dx\ \Rightarrow \ v=x}$

then:

{\displaystyle {\begin{aligned}\int \ln(x)\ dx&=x\ln(x)-\int {\frac {x}{x}}\ dx\\&=x\ln(x)-\int 1\ dx\\&=x\ln(x)-x+C\end{aligned}}}

where C is the constant of integration.

#### Given ${\displaystyle I=\int \arctan(x)\ dx.}$

The second example is the inverse tangent function arctan(x):

${\displaystyle I=\int \arctan(x)\ dx.}$

Rewrite this as

${\displaystyle \int \arctan(x)\cdot 1\ dx.}$

Now let:

${\displaystyle u=\arctan(x)\ \Rightarrow \ du={\frac {dx}{1+x^{2}}}}$
${\displaystyle dv=dx\ \Rightarrow \ v=x}$

then

{\displaystyle {\begin{aligned}\int \arctan(x)\ dx&=x\arctan(x)-\int {\frac {x}{1+x^{2}}}\ dx\\[8pt]&=x\arctan(x)-{\frac {\ln(1+x^{2})}{2}}+C\end{aligned}}}

using a combination of the inverse chain rule method and the natural logarithm integral condition.

### Polynomials and trigonometric functions

In order to calculate

${\displaystyle I=\int x\cos(x)\ dx\ ,}$

let:

${\displaystyle u=x\ \Rightarrow \ du=dx}$
${\displaystyle dv=\cos(x)\ dx\ \Rightarrow \ v=\int \cos(x)\ dx=\sin(x)}$

then:

{\displaystyle {\begin{aligned}\int x\cos(x)\ dx&=\int u\ dv\\&=u\cdot v-\int v\,du\\&=x\sin(x)-\int \sin(x)\ dx\\&=x\sin(x)+\cos(x)+C,\end{aligned}}}

where C is a constant of integration.

For higher powers of x in the form

${\displaystyle \int x^{n}e^{x}\ dx,\ \int x^{n}\sin(x)\ dx,\ \int x^{n}\cos(x)\ dx\ ,}$

repeatedly using integration by parts can evaluate integrals such as these; each application of the theorem lowers the power of x by one.

### Exception to LIATE

${\displaystyle \int x^{3}e^{x^{2}}\,dx,}$

one would set

${\displaystyle u=x^{2},\quad dv=x\cdot e^{x^{2}}\,dx,}$

so that

${\displaystyle du=2x\,dx,\quad v={\frac {e^{x^{2}}}{2}}.}$

Then

${\displaystyle \int x^{3}e^{x^{2}}\,dx=\int (x^{2})\left(xe^{x^{2}}\right)\,dx=\int u\,dv=uv-\int v\,du={\frac {x^{2}e^{x^{2}}}{2}}-\int xe^{x^{2}}\,dx.}$

Finally, this results in

${\displaystyle \int x^{3}e^{x^{2}}\,dx={\frac {e^{x^{2}}(x^{2}-1)}{2}}+C.}$

### Performing IBP twice

${\displaystyle I=\int e^{x}\cos(x)\ dx.}$

Here, integration by parts is performed twice. First let

${\displaystyle u=\cos(x)\ \Rightarrow \ du=-\sin(x)\ dx}$
${\displaystyle dv=e^{x}\ dx\ \Rightarrow \ v=\int e^{x}\ dx=e^{x}}$

then:

${\displaystyle \int e^{x}\cos(x)\ dx=e^{x}\cos(x)+\int e^{x}\sin(x)\ dx.}$

Now, to evaluate the remaining integral, we use integration by parts again, with:

${\displaystyle u=\sin(x)\ \Rightarrow \ du=\cos(x)\ dx}$
${\displaystyle dv=e^{x}\ dx\ \Rightarrow \ v=\int e^{x}\ dx=e^{x}.}$

Then:

${\displaystyle \int e^{x}\sin(x)\ dx=e^{x}\sin(x)-\int e^{x}\cos(x)\ dx.}$

Putting these together,

${\displaystyle \int e^{x}\cos(x)\ dx=e^{x}\cos(x)+e^{x}\sin(x)-\int e^{x}\cos(x)\ dx.}$

The same integral shows up on both sides of this equation. The integral can simply be added to both sides to get

${\displaystyle 2\int e^{x}\cos(x)\ dx=e^{x}{\bigl [}\sin(x)+\cos(x){\bigr ]}+C,}$

which rearranges to

${\displaystyle \int e^{x}\cos(x)\ dx={\frac {1}{2}}e^{x}{\bigl [}\sin(x)+\cos(x){\bigr ]}+C'}$

## Problem Set

1) ${\displaystyle \int 2x\cos(5-13x)dx}$

2) ${\displaystyle \int x\cos(x)dx}$

3) ${\displaystyle \int x^{3}\sin(3x)dx}$

4) ${\displaystyle \int e^{2x}\cos(3x)dx}$

5) ${\displaystyle \int e^{-x}(2x^{2}-3x+5)dx}$

6) ${\displaystyle \int 4\tan ^{-1}({3 \over x})dx}$

7) ${\displaystyle \int x\tan(x-4x^{2})dx}$

8) ${\displaystyle \int x^{5}\cos ^{-1}(3x)dx}$

9) ${\displaystyle \int e^{2x}3x^{-2}dx}$

10) ${\displaystyle \int xln(3x)dx}$