**Integration by parts** is a very handy technique to have in your integrating toolbox. It will allow you to do all kinds of integrals you might not have been able to do (or would have needed to look up) before now. Basically, integration by parts is the reverse of the product rule of differentiation. Here's how it works.

The product rule of differentiation of a product of functions, **u(x)** and **v(x)** is

$$\frac{d}{dx} (uv) = u\cdot \frac{dv}{dx} + v\cdot \frac{du}{dx}$$

If we multiply through by the differential **dx**, we get

$$d(uv) = u\cdot dv + v\cdot du$$

Now integrating both sides give us

$$uv = \int u\cdot dv + \int v\cdot du$$

This result is usually rearranged to look like this

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

which we call the integration by parts formula. It says that if we can break an integrand up into a function u multiplied by a differential expression dv, we can rewrite the integral as a product of the two functions minus a (hopefully) simpler integral.

**A note on u and v**: I hear you. Why use the letters **u** and **v** when they look so similar, especially when written by hand? I don't know where it originated, but it's a ubiquitous notation in textbooks, and one I learned early and just got used to. Sorry!

For an integrand that can be written as **u·dv**, where the function **u** and the differential expression **dv** can be written as a product, the integral may be rewritten as

**Solution**

$$ \begin{matrix} \text{Let } \; \; u = x && dv = e^x \, dx,\\[4pt] \text{then } \; \; du = dx && v = e^x \end{matrix}$$

If you write out a little table like the one above, it will be easy to follow the integration-by-parts formula and just plug in the values of **u**, **v**, **du** and **dv**:

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

Now the integral is very simple, and the result can be simplified by factoring out the ex:

$$ \begin{align} &= x e^x - e^x + C \\[5pt] &= \bf e^x (x - 1) + C \end{align}$$

Now what if we'd chosen to make our substitution the other way, by letting u = ex, and so on? Here are the values:

$$ \begin{matrix} \text{Let } \; \; u = e^x && dv = x \, dx,\\[4pt] \text{then } \; \; du = e^x \, dx && v = \frac{x^2}{2} \end{matrix}$$

This time the new integral expression looks like this:

$$\int x e^x \, dx = \frac{1}{2} x^2 e^x - \int x^2 e^x \, dx$$

The new integral is now more complicated than the original, a good indication that this substitution isn't the way to go.

This will happen sometimes, and it means you should go in a different direction. No harm done!

**Solution**** ln(x)** and the differential **dx**:

$$ \begin{matrix} \text{Let } \; \; u = ln(x) && dv = dx,\\[4pt] \text{then } \; \; du = \frac{1}{x} \, dx && v = x \end{matrix}$$

Plugging into the integration-by-parts formula gives the new integral

$$\int ln(x) \, dx = x\, ln(x) - \int 1 \, dx$$

The 1 in the integrand comes from x/x, so the integral part in this case is just the integral of the differential **dx**, which is **x**. The result is:

$$= x \, ln|x| - x + C$$

This could also be rewritten as **x[ln|x| - 1] + C**.

You might want to take the derivative of some of the solutions to these examples to prove to yourself that you get the original integrand back.

**Solution**

$$ \begin{matrix} \text{Let } \; \; u = x^2 && dv = sin(x) \, dx,\\[4pt] \text{then } \; \; du = 2x \, dx && v = -cos(x) \end{matrix}$$

The new integral expression is

$$ \begin{align} &\int x^2 sin(x) \, dx \\ &= -x^2 \, cos(x) + 2 \int x \, cos(x) \, dx \end{align}$$

Now the new integral isn't something we can do in a straightforward way. In fact, it's a good candidate for integration by parts — so we'll do it again!

The second substitution is

$$ \begin{matrix} \text{Let } \; \; u = x && dv = cos(x) \, dx,\\[4pt] \text{then } \; \; du = dx && v = sin(x) \end{matrix}$$

Now our expression for the original integral is getting a little longer. It is

$$ \begin{align} &\int x^2 sin(x) \, dx \\ &= -x^2 \, cos(x) + 2 \left[ x sin(x) - \int sin(x) dx \right] \end{align}$$

This time the remaining integral is easy to evaluate:

$$= \left[ -x^2 cos(x) + 2x sin(x) + 2 cos(x) \right]_0^{\pi/2}$$

All that remains is to evaluate this result at the limits:

$$ \begin{align} &= 0 + \pi + 2 - (0 + 0 + 2) \\ &= \pi - 2 \end{align}$$

Be on the lookout for situations like this where you might need to use IBP twice, but also be aware that it can take you in useless circles sometimes, too.

Sometimes integration by parts (IBP) can be applied twice (or more times) to find an integral. But be aware that sometimes it can lead to a circular process that goes nowhere. In this case you need a different substitution or another integration technique.

**Solution**

$$ \begin{matrix} \text{Let } \; \; u = e^x && dv = sin(x) \, dx,\\[4pt] \text{then } \; \; du = e^x \, dx && v = -cos(x) \end{matrix}$$

The resulting integral expression is:

$$ \begin{align} \int &e^x sin(x) \, dx \\ &= -e^x cos(x) + \int e^x cos(x) \, dx \end{align}$$

The second substitution is similar to the first

$$ \begin{matrix} \text{Let } \; \; u = e^x && dv = cos(x) \, dx,\\[4pt] \text{then } \; \; du = e^x \, dx && v = sin(x) \end{matrix}$$

with the outcome that we get our original integral back. But ... its sign has changed, and we can make use of that

$$ \begin{align} \int &e^x sin(x) \, dx \\ &= -e^x cos(x) + e^x sin(x) - \int e^x sin(x)\, dx \end{align}$$

By adding the integral on the right to both sides (equivalent to moving it over to the right by addition),

we get an algebraic expression that allows us to solve for the original integral simply by dividing by two.

$$ \begin{align} 2\int &e^x sin(x) \, dx \\ &= -e^x cos(x) + e^x sin(x) \end{align}$$

The result is

$$\int e^x sin(x) \, dx = \bf \frac{e^x [sin(x) - cos(x)]}{2}$$

That kind of situation comes up once in a while and it's worth noting. I hate to make statements like this, but if you're focusing on the AP calculus exam, don't worry about this situation; it won't come up. Still, it's a fun and interesting problem.

Solve each integral. Obviously, integration by parts would be a good technique to choose.

1. | $$\int x \, ln(x) \, dx$$ | |

2. | $$\int x\, sec^2(x) \, dx$$ | |

3. | $$\int sin(x) \, sin(3x) \, dx$$ | |

4. | $$\int x (x + 1)^3 \, dx$$ | |

5. | $$\int_0^1 x \, e^{-x} \, dx$$ |

6. | $$\int_0^{\pi} e^{-x} \, sin(x) \, dx$$ | |

7. | $$\int_{\pi/6}^{\pi/2} x \, csc^2(x) \, dx$$ | |

8. | $$\int_{e^{-\pi}}^{e^{\pi}} cos (ln(x)) \, dx$$ | |

9. | $$\int x^2 \, e^{-x} \, dx$$ | |

10. | $$\int x^3 \, e^x \, dx$$ |

**xaktly.com** by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.