# 7.7: Integration by Parts

- Page ID
- 88690

Recall the product rule:

\(\cfrac{d}{dx} f \cdot g = f g' + g f'\)

If we use \(u\) and \(v\) instead of \(f\) and \(g\), this becomes

\(\frac{d}{dx} u \cdot v = u v' + v u'.\)

Now let’s integrate both sides and solve for \(u v'\)

\[\begin{align*} \frac{d}{dx} u \cdot v & = u v' + v u' \\ \int \frac{d}{dx} uvdx & = \int u v' + v u'dx \\ uv & = \int u v'dx + \int v u' dx \\ uv - \int v u'dx & = \int u v'dx, \end{align*}\]

Flipping this around, we have the inverse product rule, also called *integration by parts.*

\(\boxed{\int u v'dx = uv - \int u' v}\)

The tricky part is what to use as \(u\), and what to use as \(v'\). Here are some steps and guidelines to follow, but it takes some intuition building before you know how to use it sometimes, and some product integrals cannot be solved with integration by parts.

- Think of your original integral as a product. Identify a function that is easy to integrate, and set it equal to \(v'\). The other function should be something that will simplify nicely once you take the derivative.
- Find \(u'\) (take the derivative of \(u\)) and find \(v\) (integrate \(v'\))
- Using substitution, plug in the values for \(u\), \(v\), \(v\) and \(u'\) in the integration by parts formula.
- This gives you another integral — hopefully this one is easier. If not, you may need to use \(u\)-substitution, or even integration by parts a second time.

Let’s follow the integration by parts steps:

- The function we are integrating is \(x e^x\), which is a product in two pieces: \(x\) and \(e^x\). While \(x\) is easy to integrate, \(e^x\) is even nicer. We will start with \(v' = e^x\), and \(u = x\).
- We see \(u' = \frac{d}{dx} x = 1\), and \(v = \int e^xdx = e^x\) (you don’t need to worry about the \(+ C\) for now).
- Using the formula with \(u = x\), \(u' = 1\), \(v = e^x\), and \(v' = e^x\), we have
\[\begin{align*} \int_0^2 x e^xdx & = uv - \int u' vdx \\ & = (x)(e^x) - \int_0^2 (1)(e^x)dx \\ & = x e^x - \int_0^2 e^xdx \\ \end{align*}\]

- We now have reduce the problem to an easier one: \(\int e^xdx\). We continue:
\[\begin{align*} \int_0^2 x e^xdx & = x e^x - \int_0^2 e^xdx \\ & = x e^x - e^x \Big|_0^2 \\ & = (2 e^2 - e^2) - (0e^0 - e^0) \\ & = (e^2) - (0 - 1) \\ & = e^2 + 1 \end{align*}\]

So the answer is \(e^2 + 1 \approx \boxed{8.389}\).

Notice if the problem contains an \(x\) variable, then this is usually a good choice for \(u\) since it will go away once you take the derivative \(u'\).

We following the steps of integration by parts.

- Set \(u = (2x + 3)\), which simplifies nicely with the derivative, and let \(v' = \cos(x)\) which is easy to integrate.
- We have \(u' = 2\), and \(v = \sin(x)\).
- Applying the formula, we have
\[\begin{align*} \int (2x + 3) \cos(x)dx & = uv - \int u' vdx \\ & = (2x + 3) \sin(x) - \int 2 \sin(x)dx \\ \end{align*}\]

- Continuing …
\[\begin{align*} \int (2x + 3) \cos(x)dx & = (2x + 3) \sin(x) - \int 2 \sin(x)dx \\ & = (2x + 3) \sin(x) - 2 (-\cos(x)) \\ & = \boxed{(2x + 3) \sin(x) + 2 \cos(x) + C}. \end{align*}\]

This one will involve integration by parts and a \(u\)-substitution shortcut. Here are the steps of integration by parts:

- We can integrate either function, but just like the previous case it’s best to set \(u = x\). This leaves \(v' = \sqrt{2x + 1}\).
- We see \(u' = \frac{d}{dx} x = 1\). Notice \(v = \int \sqrt{2x + 1}dx\) is a bit harder — this is a \(u\)-sub shortcut though. Let’s write it as \(\frac{1}{m}\) factor from the \(u\)-sub shortcut, we have
- Applying the formula with \(u = x\), \(u' = 1\), \(v' = \sqrt{2x + 1}\), we see
At this point, doing the integral of \(u\)-sub shortcut problem. Watch.