INTEGRATION 06

Integration by Parts

Integration by parts reverses the product rule and is useful when an integrand is a product of two functions.

The main idea

The product rule is

\[ \frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx}. \]

Using differential notation,

\[ d(uv)=u\,dv+v\,du. \]

Rearranging,

\[ u\,dv=d(uv)-v\,du. \]

Integrating gives

\[ \boxed{ \int u\,dv = uv-\int v\,du } \]

This is the formula for integration by parts.

1. Why the rule works

Integration by parts is not an unrelated formula to memorise. It comes directly from the product rule.

\[ \boxed{ \text{product rule} \quad\longleftrightarrow\quad \text{integration by parts} } \]

2. What are \(u\), \(dv\), \(du\) and \(v\)?

We split the integrand into two parts:

\[ u \qquad\text{and}\qquad dv. \]

Then differentiate \(u\):

\[ du=\frac{du}{dx}\,dx, \]

and integrate \(dv\) to obtain \(v\).

3. A simple example

Evaluate

\[ \int x e^x\,dx. \]

Choose

\[ u=x \]

and

\[ dv=e^x\,dx. \]

Then

\[ du=dx \]

and

\[ v=e^x. \]

Using

\[ \int u\,dv=uv-\int v\,du, \]

we obtain

\[ \int xe^x\,dx = xe^x-\int e^x\,dx. \]

Therefore,

\[ \boxed{ \int xe^x\,dx = xe^x-e^x+C } \]

or

\[ \boxed{ \int xe^x\,dx = e^x(x-1)+C } \]

4. How to choose \(u\)

A useful choice is often the factor that becomes simpler when differentiated.

In

\[ \int xe^x\,dx, \]

differentiating \(x\) gives

\[ 1, \]

which is simpler.

Meanwhile \(e^x\) is easy to integrate.

5. Example with a logarithm

Evaluate

\[ \int \ln x\,dx. \]

Although only one factor is visible, write

\[ \ln x = (\ln x)(1). \]

Choose

\[ u=\ln x, \qquad dv=dx. \]

Then

\[ du=\frac1x\,dx \]

and

\[ v=x. \]

Therefore,

\[ \int\ln x\,dx = x\ln x - \int x\left(\frac1x\right)dx. \]

So

\[ = x\ln x-\int1\,dx. \]

Hence,

\[ \boxed{ \int\ln x\,dx = x\ln x-x+C } \]

6. Example with trigonometric functions

Evaluate

\[ \int x\cos x\,dx. \]

Choose

\[ u=x, \qquad dv=\cos x\,dx. \]

Then

\[ du=dx, \qquad v=\sin x. \]

Therefore,

\[ \int x\cos x\,dx = x\sin x-\int\sin x\,dx. \]

Since

\[ \int\sin x\,dx=-\cos x, \]

we obtain

\[ \boxed{ \int x\cos x\,dx = x\sin x+\cos x+C } \]

7. Why the sign matters

The formula is

\[ \int u\,dv = uv-\int v\,du. \]

The minus sign is essential.

It comes directly from rearranging the product rule.

8. Repeated integration by parts

Sometimes one application is not enough.

Consider

\[ \int x^2e^x\,dx. \]

Choose

\[ u=x^2, \qquad dv=e^x\,dx. \]

Then

\[ du=2x\,dx, \qquad v=e^x. \]

So

\[ \int x^2e^x\,dx = x^2e^x - 2\int xe^x\,dx. \]

Using the previous result,

\[ \int xe^x\,dx = xe^x-e^x. \]

Therefore,

\[ \int x^2e^x\,dx = x^2e^x-2xe^x+2e^x+C. \]

Thus,

\[ \boxed{ \int x^2e^x\,dx = e^x(x^2-2x+2)+C } \]

9. Definite integrals

For definite integrals,

\[ \boxed{ \int_a^b u\,dv = [uv]_a^b - \int_a^b v\,du } \]

The product \(uv\) must be evaluated at the limits.

10. Example with limits

Evaluate

\[ \int_0^1 xe^x\,dx. \]

Using

\[ \int xe^x\,dx = xe^x-e^x, \]

we have

\[ \int_0^1 xe^x\,dx = [xe^x-e^x]_0^1. \]

At \(x=1\),

\[ e-e=0. \]

At \(x=0\),

\[ 0-1=-1. \]

Therefore,

\[ 0-(-1)=1. \]

So

\[ \boxed{ \int_0^1 xe^x\,dx=1 } \]

11. Choosing \(u\): a useful guide

A common guide is to prefer as \(u\) a function that becomes simpler when differentiated.

For example, logarithmic and algebraic factors are often good choices.

But this is a guide, not a theorem. The best choice is the one that makes the new integral simpler.

12. When integration by parts is useful

It is especially useful for products such as

\[ x e^x, \] \[ x\sin x, \] \[ x\cos x, \] \[ x\ln x, \]

and many similar expressions.

13. Connection with differentials

The notation

\[ \int u\,dv \]

is natural because

\[ dv=v'(x)\,dx. \]

Similarly,

\[ du=u'(x)\,dx. \]

So the formula

\[ \int u\,dv = uv-\int v\,du \]

is a compact differential form of the reversed product rule.

14. The practical method

\[ \boxed{ 1.\; \text{Choose }u\text{ and }dv } \] \[ \boxed{ 2.\; \text{Find }du\text{ and }v } \] \[ \boxed{ 3.\; \text{Use } \int u\,dv=uv-\int v\,du } \] \[ \boxed{ 4.\; \text{Simplify the remaining integral} } \]

The aim is always to replace the original integral with one that is easier to evaluate.