# Integration by Parts Practice Problems with Answers

> 12 integration by parts practice problems with answers and full solutions: x eˣ, ln x, arctan x, repeated parts and the e^x sin x loop.

Source: https://practicecalculus.com/practice-problems/integration-by-parts
Updated: 2026-11-06

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

## At a glance

- **Problems:** 12, with answers and full solutions
- **Level:** Calculus 2 and AP Calculus BC, Unit 6
- **You need:** [Antiderivatives](/practice-problems/antiderivatives) and [u-substitution](/practice-problems/u-substitution)
- **Main idea:** Pick $u$ to get simpler when differentiated and $dv$ to be easy to integrate
- **Practice with new numbers:** [Integration by parts lesson](/learn/calculus-2/integration-techniques/integration-by-parts)

## Key takeaways

- Use LIATE to choose $u$: logs, inverse trig, algebraic, trig, exponential. The earlier type is usually $u$.
- For $x^n$ times $e^x$, $\sin x$ or $\cos x$, apply parts $n$ times. Each round lowers the power by one.
- For $e^{ax}\sin bx$ or $e^{ax}\cos bx$, apply parts twice and solve for the integral that comes back.

These **integration by parts practice problems** start with one round of parts and build up to repeated parts, the tabular method and integrals that loop back to themselves. Try each one first. The answers come first so you can check quickly, then the full solutions.

The formula comes from the product rule:

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

Pick $u$ and $dv$, find $du$ and $v$, then fill in the formula. For more on the formula, read the [integration by parts rule](/rules/integration-by-parts-rule).

## Problems

**One round of parts**

1. $\displaystyle\int x\,e^x\,dx$
2. $\displaystyle\int x\cos x\,dx$
3. $\displaystyle\int \ln x\,dx$
4. $\displaystyle\int x\ln x\,dx$
5. $\displaystyle\int x\sin(2x)\,dx$
6. $\displaystyle\int \arctan x\,dx$

**Repeated parts**

7. $\displaystyle\int x^2 e^x\,dx$
8. $\displaystyle\int x^2\cos x\,dx$

**Integrals that loop back**

9. $\displaystyle\int e^x\sin x\,dx$
10. $\displaystyle\int e^{2x}\cos x\,dx$

**Definite integrals**

11. $\displaystyle\int_0^1 x\,e^x\,dx$
12. $\displaystyle\int_1^{e} x\ln x\,dx$

## Answers

| Problem | Answer |
| --- | --- |
| 1 | $(x - 1)e^x + C$ |
| 2 | $x\sin x + \cos x + C$ |
| 3 | $x\ln x - x + C$ |
| 4 | $\dfrac{x^2}{2}\ln x - \dfrac{x^2}{4} + C$ |
| 5 | $-\dfrac{x\cos(2x)}{2} + \dfrac{\sin(2x)}{4} + C$ |
| 6 | $x\arctan x - \dfrac{1}{2}\ln(1 + x^2) + C$ |
| 7 | $(x^2 - 2x + 2)e^x + C$ |
| 8 | $x^2\sin x + 2x\cos x - 2\sin x + C$ |
| 9 | $\dfrac{e^x(\sin x - \cos x)}{2} + C$ |
| 10 | $\dfrac{e^{2x}(2\cos x + \sin x)}{5} + C$ |
| 11 | $1$ |
| 12 | $\dfrac{e^2 + 1}{4}$ |

## Step-by-step solutions

**1.** Let $u = x$ and $dv = e^x\,dx$, so $du = dx$ and $v = e^x$:

$$x e^x - \int e^x\,dx = xe^x - e^x + C = (x - 1)e^x + C$$

**2.** Let $u = x$ and $dv = \cos x\,dx$, so $v = \sin x$:

$$x\sin x - \int\sin x\,dx = x\sin x + \cos x + C$$

**3.** Let $u = \ln x$ and $dv = dx$, so $du = \frac{1}{x}dx$ and $v = x$:

$$x\ln x - \int x\cdot\frac{1}{x}\,dx = x\ln x - x + C$$

**4.** Logs come first in LIATE, so $u = \ln x$ and $dv = x\,dx$, giving $v = \frac{x^2}{2}$:

$$\frac{x^2}{2}\ln x - \int\frac{x^2}{2}\cdot\frac{1}{x}\,dx = \frac{x^2}{2}\ln x - \frac{x^2}{4} + C$$

**5.** Let $u = x$ and $dv = \sin(2x)\,dx$, so $v = -\frac{1}{2}\cos(2x)$:

$$-\frac{x\cos(2x)}{2} + \frac{1}{2}\int\cos(2x)\,dx = -\frac{x\cos(2x)}{2} + \frac{\sin(2x)}{4} + C$$

**6.** Let $u = \arctan x$ and $dv = dx$, so $du = \frac{1}{1+x^2}dx$ and $v = x$:

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

The last integral is a u-substitution with $u = 1 + x^2$, giving $\frac{1}{2}\ln(1 + x^2)$.

**7.** Use the tabular method. Derivatives of $x^2$: $x^2, 2x, 2, 0$. Integrals of $e^x$: $e^x, e^x, e^x$. Multiply diagonally with signs $+, -, +$:

$$x^2e^x - 2xe^x + 2e^x + C = (x^2 - 2x + 2)e^x + C$$

**8.** Tabular again. Derivatives: $x^2, 2x, 2, 0$. Integrals of $\cos x$: $\sin x, -\cos x, -\sin x$. With signs $+, -, +$:

$$x^2\sin x - 2x(-\cos x) + 2(-\sin x) = x^2\sin x + 2x\cos x - 2\sin x + C$$

**9.** Call the integral $I$. With $u = \sin x$ and $dv = e^x\,dx$: $I = e^x\sin x - \int e^x\cos x\,dx$. Apply parts again with $u = \cos x$: $\int e^x\cos x\,dx = e^x\cos x + I$. So:

$$I = e^x\sin x - e^x\cos x - I \quad\Rightarrow\quad I = \frac{e^x(\sin x - \cos x)}{2} + C$$

**10.** Let $I = \int e^{2x}\cos x\,dx$. Take $u = e^{2x}$ both times. First, $I = e^{2x}\sin x - 2\int e^{2x}\sin x\,dx$. Second, $\int e^{2x}\sin x\,dx = -e^{2x}\cos x + 2I$. Put it together:

$$I = e^{2x}\sin x + 2e^{2x}\cos x - 4I \quad\Rightarrow\quad 5I = e^{2x}(\sin x + 2\cos x)$$

**11.** From problem 1:

$$\big[(x - 1)e^x\big]_0^1 = 0 - (-1) = 1$$

**12.** From problem 4, using $\ln e = 1$ and $\ln 1 = 0$:

$$\left(\frac{e^2}{2} - \frac{e^2}{4}\right) - \left(0 - \frac{1}{4}\right) = \frac{e^2}{4} + \frac{1}{4} = \frac{e^2 + 1}{4}$$

## Common mistakes on these problems

- **Choosing $u$ backwards.** In problem 4, taking $u = x$ and $dv = \ln x\,dx$ means you must already know $\int\ln x\,dx$. Follow LIATE.
- **Sign errors in the second round.** In problems 7 and 8, the minus sign in front of $\int v\,du$ applies to everything that follows. The tabular method keeps the signs straight.
- **Switching $u$ and $dv$ types mid-loop.** In problem 10, if you take $u = e^{2x}$ first and $u = \sin x$ second, you undo the first step and get $I = I$.
- **Forgetting the $\frac{1}{2}$ in $v$.** When $dv = \sin(2x)\,dx$, $v = -\frac{1}{2}\cos(2x)$, not $-\cos(2x)$.

## Keep practicing

For unlimited problems with new numbers and instant feedback, try the [integration by parts lesson](/learn/calculus-2/integration-techniques/integration-by-parts) and the [repeated parts and LIATE lesson](/learn/calculus-2/integration-techniques/repeated-parts-and-liate). For more examples, see the [integral of x e^x](/integrals/x-e-to-the-x), the [integral of ln x](/integrals/ln-x) and the [integration by parts guide](/blog/integration-by-parts). Then try [trig integral problems](/practice-problems/trig-integrals).

## Frequently asked questions

### How do you choose u and dv?

Choose $u$ so that $du$ is simpler, and $dv$ so that you can integrate it. LIATE is a quick guide: logs first, then inverse trig, algebraic, trig and exponential. For $\int x\ln x\,dx$, $u = \ln x$ because $\ln x$ is hard to integrate but easy to differentiate.

### How do you integrate ln x?

Treat it as $\ln x \cdot 1$, with $u = \ln x$ and $dv = dx$. Then $\int\ln x\,dx = x\ln x - \int x\cdot\frac{1}{x}\,dx = x\ln x - x + C$. Problem 3 shows this.

### What is the tabular method?

A shortcut for repeated parts when $u$ is a polynomial. List derivatives of $u$ down one column until you reach $0$, integrals of $dv$ down another, multiply across diagonally and alternate signs $+, -, +, \dots$ Problem 7 shows it.
