
# 2.4: Integration by Parts

[ "article:topic", "Integration by Parts", "authorname:green" ]

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

Integration by parts is a technique of integration applicable to integrands consisting of a product that cannot be rewritten as one or more easily integrated terms — at least, not without difficulty. The technique is particularly useful in cases containing a product of algebraic and transcendental factors.

### Introduction

Given two differentiable functions $$u$$ and $$v$$,

$\int u \,dv=uv-\int v\,du$

To use the technique, one identifies suitable functions $$u$$ and $$dv$$ and then differentiates $$u$$ to get $$du$$ and integrates $$dv$$ to get $$v$$ — ignoring the usual constant of integration term, since it does not affect the final answer. Note that the rule can also be written

$\int u \frac{dv}{dx}\,dx=uv-\int \frac{du}{dx}v\,dx.$

There is a mnemonic for choosing $$u$$ and $$dv$$, which covers a large variety of integrands:

$u \leftarrow \text{L I A T E}\rightarrow dv.$

The letters stand for:

• Logarithmic function
• Inverse trigonometric function
• Algebraic function
• Trigonometric function
• Exponential function.

This mnemonic only works when the integrand is the product of two different types of factors. The factor whose type of function appears higher in this list should generally be chosen as $$u$$ , the factor whose type appears lower as $$dv$$.

### When to Use Integration By Parts

1. When there is a product of two types of functions such as trig and exponential, poly and trig, etc.
2. Strange functions such as arctrig and $$\ln$$.
3. When all else fails.

### Derivation

According to the product rule for differentiation, given two differentiable functions $$u$$ and $$v$$,

\begin{align}\dfrac{d}{dx}(uv)&=u\dfrac{dv}{dx}+v\dfrac{du}{dx} \\ \text{(alternatively,) } (uv)'&=uv'+vu'. \end{align}.

Therefore,

$\int \dfrac{d}{dx}(uv) dx = \int u\dfrac{dv}{dx} dx +\int v\dfrac{du}{dx} dx ,$

for suitably chosen antiderivatives. Simplifying the right-hand side of the equation,

$\int \dfrac{d}{dx}(uv) = \int u\; dv +\int v \;du .$

On the left-hand side, the integral clearly "undoes" the differentiation (by the fundamental theorem of calculus), so

$uv+c = \int u \; dv +\int v \; du.$

Because the two antiderivative terms can always be chosen to make $$c=0$$, this can be simplified to:

$uv = \int u \; dv +\int v \; du .$

Solving for $$\int u \; dv$$, one obtains the final form of the rule:

$\int u \; dv = uv- \int v \; du.$

Example 1: Polynomial Factors to Large Powers

A fairly simple example of integration by parts is the integral

$\int x (x+3)^7 \, dx \nonumber.$

Solution

Although the integrand only involves algebraic functions, it is a good candidate for the method because expansion of $$(x+3)^7$$ would be very tedious. The key to the successful use of integration by parts is finding a usable value for $$dv$$ . Doing so is something of an art and may require trial and error.

First consider a wrong way to do this integral by parts:

• Let $$dv = x \; dx$$ and $$u=(x+3)^7$$ (since it is the term left over after $$dv$$ is determined).
• Thus $$\dfrac{x^2}{2}$$ and $$du=7(x+3)^6\; dx$$.

Then

$\int u \; dv = (x+3)^7\Big(\dfrac{x^2}{2} \Big) - \int \Big( \dfrac{x^2}{2} \Big) \cdot 7(x+3)^6 \; dx. \nonumber$

However, it would be difficult to integrate the second term of the right-hand side of the equation, so this approach will be abandoned. Here is a better way to handle this case:

• Let $$dv =(x+3)^7 \; dx$$ and $$u=x$$.
• Thus $$v=\dfrac{(x+3)^8}{8}$$ and $$du=dx$$.

Then

\begin{align} \int u \; dv &= (x) \Big[ \dfrac{(x+3)^8}{8} \Big] - \int \dfrac{(x+3)^8}{8} \; dx \nonumber \\ &= x\dfrac{(x+3)^8}{8} -\dfrac{(x+3)^9}{72} + C. \nonumber \end{align} \nonumber

Here integration by parts works quite nicely. It can be easily confirmed by differentiation that the resulting antiderivative is correct. Note that this integral may also be evaluated using the simpler integration by substitution technique.

Example 2: Algebraic and Transcendental Factors

As another example where integration by parts is useful (and, in fact, necessary), consider the integral

$\int x^2 \sin x . \nonumber$

Choosing $$dv = x^2 \; dx$$ fails, as in the previous (counter)example, since the resulting integral is more difficult than the original. Instead:

• Let $$dv = \sin x \; dx$$  and $$u=x^2$$.
• Thus $$v=-\cos x$$ and $$du = 2x \; dx$$.

Then

\begin{align} \int x^2 \sin x \; dx &= \int u \; dv\\ &= (x^2)(-\cos x) - \int -\cos(x) 2x \; dx \\ &= -x^2 \cos x + \int 2x \cos x \; dx. \end{align} \nonumber

In this case, the second term in the final expression requires another application of integration by parts:

• Let $$dv = \cos x$$ and $$u=2x$$.
• Thus $$v=\sin x$$ and $$du = 2dx$$.

Then

\begin{align} \int 2x \cos x \; dx &= \int u \; dv \\ &= (2x)(\sin x) - \int \sin x \cdot 2 \; dx \\ &= 2x \sin x + 2 \cos x + C. \end{align} \nonumber

Substituting the last expression into the previous result:

$\int x^2 \sin x \; dx = -x^2 \cos x + 2x \sin x + 2 \cos x + C. \nonumber$

Note that if the second integration by parts step had instead used $$dv = 2x \; dx$$ and $$u= \cos x$$, this would have "undone" the first step and we would have ended up with an integrand very much like the one we started with:

\begin{align} \int 2x \cos x \; dx &= \int u \; dv \\ &= (\cos x )(x^2) - \int x^2(-\sin x) \; dx \\ &= 2x \sin x + 2 \cos x + C. \end{align} \nonumber

Thus, the correct choice of $$u$$  and $$dv$$ is particularly important when multiple applications of the technique are required. In general, if $$u$$ is chosen to be an algebraic function in the first step, it should be algebraic in all subsequent steps.

Example 3

For example, in the integral

$\int x^2 \ln x \; dx, \nonumber$

the choices should be $$u=\ln x$$, since this is an easy to differentiate logarithmic function, and $$dv = x^2 \; dx$$, since this is an algebraic one ("L" appears before "A" in the mnemonic). On the other hand, in the integral

$\int x^2 e^{-x} \; dx \nonumber$

the proper choices are $$u=x^2$$ (algebraic) and $$dv = e^{-x}$$ (exponential).

Note that the second example above also follows the rule suggested by this mnemonic. If the mnemonic does not seem to work for a given integral it is possible that it may be a simpler form that can be evaluated using the substitution method, or perhaps rewritten into a simpler form using algebraic or trigonometric techniques (e.g., trigonometric identities).

A slightly different mnemonic that works almost as well — and has the added benefit of sounding more like an English word — is:

$u\leftarrow \text{L I P E T}\rightarrow dv$

Here the "P" stands for Power, which includes polynomials and roots (fractional powers). The other letters are as above.

Notice that the last two letters are switched in this form; this is usually not an issue, since integrals involving a product of trigonometric and exponential factors can generally be done "either way" (with respect to the choice of $$u$$ and $$dv$$) or not at all using this technique.

Example 4

Solve

$\int xe^x \, dx \nonumber.$

 $$u = x$$ $$du = dx$$ $$dv = e^x \; dx \(v = e^x$$

Hence we have

$\int xe^x \, dx = xe^x - \int e^x \, dx \nonumber$

$= xe^x - e^x + C \nonumber.$

Example 5: Integration by Parts Twice

Solve

$\int x^2e^x dx \nonumber$

 $$u = x^2$$ $$du = 2x \; dx$$ $$dv = e^x dx$$ $$v = e^x$$

We have

$x^2e^x - \int 2xe^x\,dx = x^2e^x - 2 \int xe^x \, dx \nonumber$

We just did this integral in the last example, so our solution is

$x^2e^x - 2\left[xe^x - e^x\right] + C \nonumber$

Example 6: The Integration by Parts Trick

Evaluate

$\int e^x \; \sin \; x\; dx \nonumber.$

 $$u =e^x$$ $$du = e^x \; dx$$ $$dv = \sin x \; dx$$ $$v = -\cos x$$

We have

$\int e^x \, \sin \, x \, dx = -e^x \, \cos \, x + \int e^x \, \cos, x \, dx \nonumber$

Now try integration by parts again:

 $$u = e^x$$ $$du = e^x \; dx$$ $$dv = \cos x \; dx$$ $$v = \sin x$$

$\int e^x \, \sin \, x \, dx = -e^x \cos \, x + e^x \, \sin \, x - \int e^x \, \sin \, x \, dx \nonumber.$

It seems as if we are back to where we started, however with a clever move, the answer appears.

Let

$I = \int e^x \sin \,x \, dx. \nonumber$

Then we have

$I = -e^x \cos\,x + e^x \sin\,x - I. \nonumber$

Adding I to both sides we get

$2I = -e^x \cos \, x + e^x \sin \, x. \nonumber$

So that

$I = \dfrac{ -e^x \cos\, x + e^x \sin \, x}{2} + C. \nonumber$

We can conclude that

$\int e^x \, \sin \, x \, dx = \dfrac{-e^x\, \cos\, x + e^x \sin\, x}{2} + C. \nonumber$

Example 7: The Other by Parts

$\int \arctan \; x \; dx \nonumber$

 $$u = \arctan x$$ $$du = \dfrac{1}{1+x^2} \; dx$$ $$dv = dx$$ $$v = x$$

We get

$x \, \arctan \, x - \int \dfrac{x}{1+x^2} dx \nonumber$

letting
$$u = 1 + x^2$$,    $$du = 2x \; dx$$,     $$x \; dx = \dfrac{du}{2}$$

$x \, \arctan \, x - \dfrac{1}{2} \int \dfrac{1}{u} du = x \, \arctan \, x - \dfrac{1}{2} \ln |1+x^2| + C \nonumber$

### Problems

Exercises

1. Evaluate

$\int \ln \, x \, dx \nonumber$

2. Evaluate

$\int x\, \text{sin} \, x \, dx \nonumber$

Larry Green (Lake Tahoe Community College)