Integration by parts

Integration by parts (IBP) is a method of integration with the formula: \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{align}$
 * $\begin{align}

Or more compactly, $\int_{a}^{b} udv = uv

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

$\frac{d}{dx}u(x)\rightarrow\frac{du}{dx}=u'(x)\rightarrow u'(x)dx=du$    and      $\int dv = \int v(x) = v $

Note: $dv$ is whatever terms are not included as $u$.

ILATE Rule
A rule of thumb has been proposed, consisting of choosing $$u$$ as the function that comes first in the following list:
 * I – inverse trigonometric functions: $$\arctan(x),\ \arcsec(x),$$ etc.
 * L – logarithmic functions: $$\ln(x),\ \log_b(x),$$ etc.
 * A – polynomials: $$x^2,\ 3x^{50},$$ etc.
 * T – trigonometric functions: $$\sin(x),\ \tan(x),$$ etc.
 * E – exponential functions: $$e^x,\ 19^x,$$ etc.

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


 * $$\Big(u(x)v(x)\Big)' \ =\ v(x) u'(x) + u(x) v'(x).$$

Integrating both sides with respect to $$x$$,


 * $$\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


 * $$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:


 * $$\int u(x)v'(x)\,dx \ =\ u(x)v(x) - \int u'(x)v(x) \,dx, $$

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


 * $$\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: $$  \int_a^b u(x) v'(x) \, dx    \ =\ u(b) v(b) - u(a) v(a) - \int_a^b u'(x) v(x) \, dx. $$

Given $$I=\int\ln(x)\cdot 1\ dx\ $$
The first example is ∫ ln(x) dx. We write this as:


 * $$I=\int\ln(x)\cdot 1\ dx\ .$$

Let:


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

then:



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

where C is the constant of integration.

Given $$I=\int\arctan(x)\ dx.$$
The second example is the inverse tangent function arctan(x):


 * $$I=\int\arctan(x)\ dx.$$

Rewrite this as


 * $$\int\arctan(x)\cdot 1\ dx.$$

Now let:


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


 * $$dv = dx\ \Rightarrow\ v = x$$

then



\begin{align} \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{align} $$

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

Polynomials and trigonometric functions
In order to calculate


 * $$I=\int x\cos(x)\ dx\ ,$$

let:
 * $$u = x\ \Rightarrow\ du = dx$$
 * $$dv = \cos(x)\ dx\ \Rightarrow\ v = \int\cos(x)\ dx = \sin(x)$$

then:


 * $$\begin{align}

\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{align}$$

where C is a constant of integration.

For higher powers of x in the form


 * $$\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

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

one would set


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

so that


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

Then


 * $$\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 x e^{x^2} \,dx.$$

Finally, this results in
 * $$\int x^3 e^{x^2} \,dx = \frac{e^{x^2}(x^2 - 1)}{2} + C.$$

Performing IBP twice

 * $$I=\int e^x\cos(x)\ dx.$$

Here, integration by parts is performed twice. First let


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

then:


 * $$\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:


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

Then:


 * $$\int e^x\sin(x)\ dx = e^x\sin(x) - \int e^x\cos(x)\ dx.$$

Putting these together,


 * $$\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


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

which rearranges to


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

Problem Set
1) $$\int 2x\cos(5-13x)dx$$

2) $$\int x\cos(x)dx$$

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

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

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

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

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

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

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

10) $$\int xln(3x)dx$$