---
title: "Integrating Using Integration by Parts | FiveStudy"
description: "The product rule backwards. It trades one integral for another, so choosing u is the whole skill."
url: https://fivestudy.com/guides/ap-calculus-bc-6-11-integrating-using-integration-by-parts
---

[AP Calculus BC](https://fivestudy.com/ap-calculus-bc) · Study guide

# Integrating Using Integration by Parts

[Figure: FiveStudy]

FiveStudy

AP® Calculus BC · Unit 6 · Integration and Accumulation of Change

AP® Calculus BC · Unit 6 · Integration and Accumulation of Change

# Integration by *Parts*

Integration by parts handles products where substitution fails, like x·eˣ or x·cos x, and single functions like ln x. This guide derives the formula, gives a rule of thumb for choosing u, and shows repeated use.

1. The formula 2. Choosing u and dv 3. Using it more than once 4. Definite integrals

The idea in one paragraph

The product rule says \((uv)' = u'v + uv'\). Integrating and rearranging gives \(\displaystyle\int u\,dv = uv - \int v\,du\). The goal is to pick \(u\) so that \(du\) is simpler than \(u\), and \(dv\) so that \(v\) is easy to find, making the new integral easier than the old one. A common order for choosing \(u\) is: logarithms, inverse trig, algebraic (powers of x), trig, exponential.

## 1 The formula

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

Where it comes from

Integrate the product rule \(\frac{d}{dx}[uv] = u\frac{dv}{dx} + v\frac{du}{dx}\): \(uv = \int u\,dv + \int v\,du\). Solve for \(\int u\,dv\).

Worked Example 1 The standard example

### \(\displaystyle\int xe^x\,dx\)

1. 1

   Choose \(u = x\) (it gets simpler when differentiated) and \(dv = e^x\,dx\).

2. 2

   Then \(du = dx\) and \(v = e^x\).

3. 3

   \(\displaystyle\int u\,dv = uv - \int v\,du = xe^x - \int e^x\,dx = xe^x - e^x\).

**Answer:** \(xe^x - e^x + C\)

**Figure 1.** The region under y = x·eˣ from 0 to 1 has area 1. Integration by parts turns this product, which has no basic antiderivative, into x·eˣ minus the easy integral of eˣ.

Write it like this

“Let \(u = x\) and \(dv = e^x\,dx\), so \(du = dx\) and \(v = e^x\). Then \(\displaystyle\int xe^x\,dx = xe^x - \int e^x\,dx = xe^x - e^x + C\).”

## 2 Choosing u and dv

| Choose u from earlier in this list | Example |
| --- | --- |
| Logarithms | \(\ln x\) |
| Inverse trig | \(\arctan x\), \(\arcsin x\) |
| Algebraic (powers of x) | \(x\), \(x^2\) |
| Trig | \(\cos x\), \(\sin x\) |
| Exponential | \(e^x\) |

Worked Example 2 Algebra times trig

### \(\displaystyle\int x\cos x\,dx\)

1. 1

   \(u = x\), \(dv = \cos x\,dx\); \(du = dx\), \(v = \sin x\).

2. 2

   \(x\sin x - \int\sin x\,dx = x\sin x + \cos x\).

**Answer:** \(x\sin x + \cos x + C\)

Worked Example 3 A single function

### \(\displaystyle\int \ln x\,dx\)

1. 1

   There is no basic antiderivative for \(\ln x\), but its derivative is simple. Write it as \(\ln x \cdot 1\): \(u = \ln x\), \(dv = dx\).

2. 2

   \(du = \frac1x\,dx\), \(v = x\). So \(x\ln x - \int x \cdot \frac1x\,dx = x\ln x - x\).

**Answer:** \(x\ln x - x + C\)

Worked Example 4 Inverse trig

### \(\displaystyle\int \arctan x\,dx\)

1. 1

   \(u = \arctan x\), \(dv = dx\); \(du = \frac{1}{1 + x^2}dx\), \(v = x\).

2. 2

   \(x\arctan x - \displaystyle\int\frac{x}{1 + x^2}dx\). The last integral is a substitution with \(w = 1 + x^2\): \(\frac12\ln(1 + x^2)\).

**Answer:** \(x\arctan x - \tfrac12\ln(1 + x^2) + C\)

Common Mistake 1 · Choosing u the wrong way around

In \(\int x\cos x\,dx\), choosing \(u = \cos x\), \(dv = x\,dx\) gives \(\frac{x^2}{2}\cos x + \int\frac{x^2}{2}\sin x\,dx\), a harder integral than the one you started with. If the new integral is worse, swap the choices.

## 3 Using it more than once

Worked Example 5 Twice in a row

### \(\displaystyle\int x^2e^x\,dx\)

1. 1

   \(u = x^2\), \(dv = e^x\,dx\): \(x^2e^x - \int 2xe^x\,dx\).

2. 2

   The new integral is Worked Example 1 times 2: \(2(xe^x - e^x)\).

3. 3

   Combine: \(x^2e^x - 2xe^x + 2e^x\).

**Answer:** \(e^x(x^2 - 2x + 2) + C\)

Common Mistake 2 · Sign errors on the second pass

The second application sits inside a minus sign: \(x^2e^x - \left[2xe^x - \int 2e^x\,dx\right]\). Distributing the minus correctly gives \(+2e^x\) at the end. Keep brackets until the last step.

## 4 Definite integrals

Worked Example 6 Definite version

### \(\displaystyle\int_0^1 xe^x\,dx\)

1. 1

   \(\left[xe^x - e^x\right]_0^1 = (e - e) - (0 - 1) = 1\).

**Answer:** 1, as in Figure 1.

Common Mistake 3 · Evaluating only part of the formula

With limits, both pieces get evaluated: \(\displaystyle\int_a^b u\,dv = \Big[uv\Big]_a^b - \int_a^b v\,du\). Forgetting to evaluate \(uv\) at the limits is a common slip.

### Quick reference

| Integral | Result |
| --- | --- |
| \(\int xe^x\,dx\) | \(xe^x - e^x + C\) |
| \(\int x\cos x\,dx\) | \(x\sin x + \cos x + C\) |
| \(\int \ln x\,dx\) | \(x\ln x - x + C\) |
| \(\int x^2e^x\,dx\) | \(e^x(x^2 - 2x + 2) + C\) |
| \(\int \arctan x\,dx\) | \(x\arctan x - \frac12\ln(1 + x^2) + C\) |

FiveStudy AP® Calculus BC · Integration by parts
