← Back to all articles

Integration by Parts Step by Step: 6 Examples + Quiz

October 16, 20268 min read

Short answer: integration by parts reverses the product rule: ∫u dv = uv − ∫v du. Pick u as the part that gets simpler when differentiated (use the order LIATE: Logs, Inverse trig, Algebraic, Trig, Exponential), let dv be the rest, then apply the formula.

Where the formula comes from

The product rule says (uv)′ = u′v + uv′. Integrate both sides: uv = ∫v du + ∫u dv. Rearranging gives the formula. So integration by parts is just the product rule run backwards — which is why it suits products like x·ex. Not sure if parts is the right method? See when to use integration by parts.

The four-box method

Write four boxes before you start: u, du, dv, v. Filling them in first prevents most errors.

Worked examples

Example 1: ∫x ex dx

u = x, du = dx; dv = exdx, v = ex.
∫x ex dx = x ex − ∫ex dx = x ex − ex + C.

Example 2: ∫x cos x dx

u = x, du = dx; dv = cos x dx, v = sin x.
= x sin x − ∫sin x dx = x sin x + cos x + C.

Example 3: ∫ln x dx (the hidden product)

Write it as ∫ln x · 1 dx. u = ln x, du = (1/x)dx; dv = dx, v = x.
= x ln x − ∫x · (1/x) dx = x ln x − x + C.

Example 4: ∫x² ex dx (parts twice)

u = x², dv = exdx → x²ex − ∫2x ex dx. Apply Example 1 to the remaining integral:
= x²ex − 2(x ex − ex) + C = ex(x² − 2x + 2) + C.

Example 5: ∫ex sin x dx (the loop)

Call the integral I. Parts with u = sin x: I = ex sin x − ∫ex cos x dx. Parts again with u = cos x: ∫excos x dx = ex cos x + I.
So I = ex sin x − ex cos x − I, giving I = ½ex(sin x − cos x) + C.

Example 6: definite integral ∫01 x e2x dx

u = x, v = ½e2x: [½x e2x]01 − ∫01 ½e2x dx = ½e² − [¼e2x]01 = ½e² − ¼e² + ¼ = (e² + 1)/4.

Beginner mistakes

  • Choosing u = ex in ∫x ex dx — the new integral gets harder, not easier.
  • Sign errors in the minus before ∫v du, especially when v is negative (like −cos x).
  • Forgetting to evaluate uv at the limits in definite integrals.
  • Dropping + C on indefinite integrals.

Practice section

  1. ∫x sin x dx
  2. ∫x e3x dx
  3. ∫x ln x dx
  4. ∫arctan x dx
Show answers
  1. −x cos x + sin x + C
  2. (x/3)e3x − (1/9)e3x + C
  3. (x²/2)ln x − x²/4 + C
  4. x arctan x − ½ln(1 + x²) + C

Now try the 8-question quiz. For the bigger picture see the integrals topic page, and use the free diagnostic to see whether integration is really your weak spot.

Quiz: 8 questions

Pick an answer to see if you're right and why.

  1. 1. The integration by parts formula is:

  2. 2. For ∫x e^x dx, the best choice of u is:

  3. 3. ∫x e^x dx = ?

  4. 4. ∫x cos x dx = ?

  5. 5. For ∫ln x dx, what is dv?

  6. 6. ∫ln x dx = ?

  7. 7. How many times do you apply parts for ∫x² e^x dx?

  8. 8. In LIATE, which type should usually be u in ∫x² ln x dx?

Frequently Asked Questions

∫u dv = uv − ∫v du. It comes from integrating the product rule.

Still finding this difficult?

Ask the NoetaMind tutor to explain it at your level and give you practice questions. You will need an account, and your question is filled in for you to review before you send it.

Related articles