All subjects · Mathematics · WMA14 (P4)

Integration by parts

Integration by parts reverses the product rule. It handles products such as x e2x, x cos x and ln x.

The formula

∫ u (dv/dx) dx = uv - ∫ v (du/dx) dx.

Choose u to be the part that becomes simpler when differentiated; dv/dx must be something you can integrate.

Choosing u

∫ ln x dx: write it as ∫ ln x × 1 dx, with u = ln x and dv/dx = 1. The result is x ln x - x + c.

Repeated parts

Worked example

Find ∫ x e2x dx.

  1. u = x, du/dx = 1; dv/dx = e2x, v = (1/2)e2x
  2. ∫ = (1/2)x e2x - ∫ (1/2)e2x dx

Answer: (1/2)x e2x - (1/4)e2x + c

Key idea: ∫ u v' dx = uv - ∫ v u' dx. Let u be the polynomial, or ln x whenever it appears.

Check yourself

  1. Find ∫ x cos x dx.
    • x sin x + cos x + c
    • x sin x - cos x + c
    • (x2/2)sin x + c
    • -x sin x + cos x + c
    Show answer

    x sin x + cos x + c. u = x, v = sin x: x sin x - ∫ sin x dx = x sin x + cos x + c.

  2. For ∫ x2 ln x dx, which choice of u should you make?
    • u = x2
    • u = x2 ln x
    • u = ln x
    • u = 1
    Show answer

    u = ln x. ln x is hard to integrate but easy to differentiate.

  3. Evaluate ∫1^{e} ln x dx.
    Show answer

    1. ∫ ln x dx = x ln x - x. From 1 to e: (e - e) - (0 - 1) = 1.

  4. Use integration by parts to find ∫0^{2} x ex dx, to 3 decimal places.
    Show answer

    8.389. ∫ x ex dx = x ex - ex. From 0 to 2: (2e2 - e2) - (0 - 1) = e2 + 1 = 8.389.

  5. Show that ∫0^{π} x sin x dx = π, and give the value to 2 decimal places.
    Show answer

    3.14. ∫ x sin x dx = -x cos x + sin x. From 0 to π: (-π(-1) + 0) - 0 = π = 3.14.

  6. Integrating by parts twice, find ∫0^{1} x2 ex dx to 3 decimal places.
    Show answer

    0.718. Using parts twice: ∫ x2 ex dx = ex(x2 - 2x + 2). From 0 to 1: e(1) - 2 = 0.718.

  7. Find ∫ ex sin x dx.
    • ex(sin x - cos x) + c
    • (1/2)ex(sin x - cos x) + c
    • (1/2)ex(sin x + cos x) + c
    • -ex cos x + c
    Show answer

    (1/2)ex(sin x - cos x) + c. Parts twice gives I = ex sin x - ex cos x - I, so 2I = ex(sin x - cos x).

  8. With u = ln x, find the value of ∫1^{2} x ln x dx to 3 decimal places.
    Show answer

    0.636. u = ln x, v = x2/2: (x2/2)ln x - x2/4. From 1 to 2: (2ln 2 - 1) - (0 - 1/4) = 2ln 2 - 3/4 = 0.636.

Practise with instant feedback

Sources

Last updated 7 November 2026. Spotted a mistake? Tell us.