Skip to content
IB Diploma ProgrammeSL & HL

Integration by substitution and parts

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Integration by substitution and parts notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Integration by substitution and parts notes as text: skim, search, and jump between subtopics.

~14 min read

1. Substitution: replace x and dx

In integration by substitution, choose a new variable u = g(x). Find du/dx. Then replace every x and the dx, so that only u and du remain.

The method works at once when the integrand has the form k g'(x) f(g(x)). When it does not, the examination paper gives the substitution. Use it as stated.

If a lone x is left, write x in terms of u. Integrate in u. Then put g(x) back, so that the answer is in terms of x.

u = g(x), du/dx = g'(x)

int k g'(x) f(g(x)) dx = kint f(u) du

Worked example 14 marks

Use the substitution u = x + 1 to find int x√(x+1) dx.

  1. 1

    attempt to substitute: x = u - 1 and dx = du, so the integral is int (u-1)u^(1/2) du (M1) [1]

  2. 2

    = int (u^(3/2) - u^(1/2)) du (A1) [1]

  3. 3

    = 2/5u^(5/2) - 2/3u^(3/2) (A1) [1]

  4. 4

    = 2/5(x+1)^(5/2) - 2/3(x+1)^(3/2) + C, in terms of x with the constant (A1) [1]

2. Substitution in a definite integral

For a definite integral, change the limits with the variable. Put each x limit into u = g(x) to get the matching u limit.

Then evaluate in u. Do not return to x. An x limit does not belong on a u integrand.

If the new lower limit is the larger number, leave the limits as they are. A negative from du = -sin x dx can turn them round.

int_a^(b) k g'(x) f(g(x)) dx = kint_g(a)^(g(b)) f(u) du

Worked example 14 marks

Use the substitution u = x² + 1 to find the exact value of int₀^(√3) x/(√(x²+1)) dx.

  1. 1

    du/dx = 2x, so x dx = 1/2 du (A1) [1]

  2. 2

    new limits: x = 0 gives u = 1 and x = √3 gives u = 4 (A1) [1]

  3. 3

    1/2int₁⁴ u^(-1/2) du (M1) [1]

  4. 4

    = [u^(1/2)]₁⁴ = 2 - 1 = 1 (A1) [1]

3. Integration by parts

Integration by parts reverses the product rule. Split the integrand into u and dv/dx. Differentiate u to get du/dx. Integrate dv/dx to get v.

Choose u to be the part that becomes simpler when differentiated, such as x or x². Choose dv/dx to be a part you can integrate, such as e^(x), sin x or cos x.

The markscheme asks for an attempt to use integration by parts. It then gives a mark for each term with correct signs. The formula is in the data booklet.

int u dv/dx dx = uv - int v du/dx dx

int_a^(b) u dv/dx dx = [uv]_a^(b) - int_a^(b) v du/dx dx

Worked example 14 marks

Find the exact value of int₀^(π) xsin x dx.

  1. 1

    attempt to use integration by parts with u = x and dv/dx = sin x, so du/dx = 1 and v = -cos x (M1) [1]

  2. 2

    int₀^(π) xsin x dx = [-xcos x]₀^(π) + int₀^(π)cos x dx (A1) [1]

  3. 3

    [-xcos x]₀^(π) = -πcosπ - 0 = π (A1) [1]

  4. 4

    int₀^(π)cos x dx = [sin x]₀^(π) = 0, so the value is π (A1) [1]

4. ln x and arcsin x as products

ln x and arcsin x have no standard integral to quote, but each is a product in disguise. Write ln x = ln x × 1. Take u = ln x and dv/dx = 1, so v = x.

The same idea works for arcsin x. Its derivative, 1/(√(1-x²)), is in the data booklet. The new integral int x/(√(1-x²)) dx then needs a substitution or inspection.

Differentiate your answer to check it.

int ln x dx = xln x - x + C

int arcsin x dx = xarcsin x + √(1-x²) + C

Worked example 15 marks

Find int arcsin x dx.

  1. 1

    attempt to use integration by parts with u = arcsin x and dv/dx = 1 (M1) [1]

  2. 2

    du/dx = 1/(√(1-x²)) and v = x, so int arcsin x dx = xarcsin x - int x/(√(1-x²)) dx (A1) [1]

  3. 3

    attempt to integrate with w = 1 - x², dw = -2x dx (M1) [1]

  4. 4

    int x/(√(1-x²)) dx = -1/2int w^(-1/2) dw = -√(1-x²) (A1) [1]

  5. 5

    int arcsin x dx = xarcsin x + √(1-x²) + C (A1) [1]

5. Repeated integration by parts

When u is a power of x such as x², one use of the formula lowers the power by one. The new integral is still a product, so use the formula again.

An xⁿ needs n passes. Choose u the same way on every pass, so that the power keeps falling.

Put the second integral in brackets with its minus sign in front. The sign then applies to the whole bracket.

int x²e^(x) dx = x²e^(x) - int 2xe^(x) dx

Worked example 15 marks

Find int x²e^(x) dx.

  1. 1

    attempt to use integration by parts with u = x² and dv/dx = e^(x) (M1) [1]

  2. 2

    int x²e^(x) dx = x²e^(x) - int 2xe^(x) dx (A1) [1]

  3. 3

    use integration by parts again with u = 2x and dv/dx = e^(x) (M1) [1]

  4. 4

    int 2xe^(x) dx = 2xe^(x) - int 2e^(x) dx = 2xe^(x) - 2e^(x) (A1) [1]

  5. 5

    int x²e^(x) dx = x²e^(x) - (2xe^(x) - 2e^(x)) + C = e^(x)(x² - 2x + 2) + C (A1) [1]

6. When the integral comes back

With e^(x)sin x, two passes of parts bring back the integrand: the original integral returns. With cosⁿ x, one pass and sin² x = 1 - cos² x bring it back.

Call it I and do not stop. You now hold an equation in I. Collect the terms in I on one side, then divide.

For I = int e^(x)sin x dx, two passes give I = e^(x)sin x - e^(x)cos x - I, so 2I = e^(x)(sin x - cos x). In a show that question the answer is printed, so every line of working earns its mark.

int e^(x)sin x dx = 1/2e^(x)(sin x - cos x) + C

Worked example 16 marks

Consider the family of functions fn(x) = cosⁿ x, where x ∈ R and n ∈ N.(a) By writing cosⁿ x as cosⁿ⁻¹x cos x, show that int cosⁿ x dx = cosⁿ⁻¹x sin x + (n - 1)int cosⁿ⁻²x dx - (n - 1)int cosⁿ x dx for n > 1.(b) Hence, show that int fn(x) dx = 1/ncosⁿ⁻¹x sin x + (n - 1)/nint fn₋₂(x) dx for n > 1.

  1. 1

    (a)

  2. 2

    attempt to use integration by parts on cosⁿ⁻¹xcos x, with u = cosⁿ⁻¹x and dv/dx = cos x, so du/dx = -(n-1)cosⁿ⁻²xsin x and v = sin x (M1) [1]

  3. 3

    int cosⁿ x dx = cosⁿ⁻¹xsin x (A1) [1]

  4. 4

    + int (n-1)cosⁿ⁻²xsin² x dx, with correct signs (A1) [1]

  5. 5

    = cosⁿ⁻¹xsin x + (n-1)int cosⁿ⁻²x (1 - cos²x) dx (A1) [1]

  6. 6

    = cosⁿ⁻¹xsin x + (n-1)int cosⁿ⁻²x dx - (n-1)int cosⁿ x dx (AG)

  7. 7

    (b)

  8. 8

    attempt to rearrange to collect the terms in int cosⁿ x dx (M1) [1]

  9. 9

    nint cosⁿ x dx = cosⁿ⁻¹xsin x + (n-1)int cosⁿ⁻²x dx (A1) [1]

  10. 10

    divide by n to reach the given result (AG)

7. Applying a reduction formula

A reduction formula writes an integral of power n as a term plus an integral of a lower power. Use it more than once to reach an integral you can do.

Start with the largest n, then apply the formula again with the smaller n. Each application is a method mark, so show each one.

The markscheme also accepts the double angle formula, cos² x = (cos 2x + 1)/2, for the last integral.

int cosⁿ x dx = 1/ncosⁿ⁻¹xsin x + (n-1)/nint cosⁿ⁻²x dx

Worked example 14 marks

Consider the family of functions fn(x) = cosⁿ x, where x ∈ R and n ∈ N. It is given that int fn(x) dx = 1/ncosⁿ⁻¹x sin x + (n - 1)/nint fn₋₂(x) dx for n > 1. Hence, find an expression for int cos⁴ x dx, giving your answer in the form pcos³ x sin x + qcos x sin x + rx + c where p, q, r ∈ Q⁺.

  1. 1

    attempt to use the given equation to reduce the power: int cos⁴ x dx = 1/4cos³ xsin x + 3/4int cos² x dx (M1) [1]

  2. 2

    attempt to use it again with n = 2: int cos² x dx = 1/2cos xsin x + 1/2int 1 dx (M1) [1]

  3. 3

    int cos⁴ x dx = 1/4cos³ xsin x + 3/4(1/2cos xsin x + 1/2x) (A1) [1]

  4. 4

    = 1/4cos³ xsin x + 3/8cos xsin x + 3/8x + c (A1) [1]

Recap

  • Substitution: set u = g(x), replace every x and dx, integrate in u, then give the answer in terms of x. A given substitution is used as stated.
  • In a definite integral, change the limits to u values and stay in u.
  • By parts: int u dv/dx dx = uv - int v du/dx dx. Choose u to be the part that becomes simpler when differentiated.
  • ln x and arcsin x: write the function as itself times 1, take u as the function and dv/dx = 1.
  • An xⁿ factor needs n passes. Choose u the same way each time, and bracket the second integral behind its minus sign.
  • If the original integral returns, call it I, collect the terms in I and divide.
  • Differentiate your answer to check it. Keep +C in an indefinite integral.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State the formula for integration by parts, in terms of u, v, du/dx and dv/dx.1 mark
    Answer
    1. int u dv/dx dx = uv - int v du/dx dx (A1)

    Trap: Writing a plus sign in front of the second integral.

  2. Use the substitution u = x² - 3 to find int 4x(x²-3)⁵ dx.3 marks
    Answer
    1. du/dx = 2x, so 4x dx = 2 du (M1)
    2. 2int u⁵ du = u⁶/3 (A1)
    3. ((x²-3)⁶)/3 + C (A1)

    Trap: Replacing 4x dx by du, which loses the factor of 2.

  3. Find int xe^(-x) dx.3 marks
    Answer
    1. u = x, dv/dx = e^(-x), so du/dx = 1 and v = -e^(-x) (M1)
    2. int xe^(-x) dx = -xe^(-x) + int e^(-x) dx (A1)
    3. = -xe^(-x) - e^(-x) + C (A1)

    Trap: Taking v = e^(-x). Integrating e^(-x) gives -e^(-x).

  4. Find the exact value of int₁^(e)ln x dx.3 marks
    Answer
    1. u = ln x, dv/dx = 1, so du/dx = 1/x and v = x (M1)
    2. int₁^(e)ln x dx = [xln x]₁^(e) - int₁^(e)1 dx (A1)
    3. = e - (e - 1) = 1 (A1)

    Trap: Giving int ln x dx = 1/x, the derivative, or leaving ln x with no product to split.

  5. Use the substitution u = cos x to find the exact value of int₀^(π/2)sin xcos³ x dx.4 marks
    Answer
    1. du/dx = -sin x, so sin xcos³ x dx = -u³ du (M1)
    2. x = 0 gives u = 1 and x = π/2 gives u = 0 (A1)
    3. int₁⁰-u³ du = int₀¹u³ du (M1)
    4. = [u⁴/4]₀¹ = 1/4 (A1)

    Trap: Keeping the limits 0 and π/2 on an integral in u, or dropping the minus sign from du.

  6. Find int x²cos x dx.5 marks
    Answer
    1. u = x², dv/dx = cos x, so du/dx = 2x and v = sin x (M1)
    2. int x²cos x dx = x²sin x - int 2xsin x dx (A1)
    3. second pass: u = 2x, dv/dx = sin x, so v = -cos x (M1)
    4. int 2xsin x dx = -2xcos x + 2sin x (A1)
    5. x²sin x + 2xcos x - 2sin x + C (A1)

    Trap: Not bracketing the second integral, so the minus sign is applied to only one of its terms.

  7. Show that int₀^(1/2)arcsin x dx = π/12 + (√3)/2 - 1.5 marks
    Answer
    1. u = arcsin x, dv/dx = 1, so du/dx = 1/(√(1-x²)) and v = x (M1)
    2. int arcsin x dx = xarcsin x - int x/(√(1-x²)) dx (A1)
    3. with w = 1 - x²: int x/(√(1-x²)) dx = -√(1-x²) (A1)
    4. [xarcsin x + √(1-x²)]₀^(1/2) = (1/2arcsin1/2 + (√3)/2) - (0 + 1) (M1)
    5. arcsin1/2 = π/6 (A1), so the value is π/12 + (√3)/2 - 1 (AG)

    Trap: Forgetting the lower limit: √(1-0²) = 1 is not zero.

  8. Find int e^(2x)cos x dx.6 marks
    Answer
    1. first pass: u = cos x, dv/dx = e^(2x), so v = 1/2e^(2x) (M1)
    2. I = 1/2e^(2x)cos x + 1/2int e^(2x)sin x dx (A1)
    3. second pass: u = sin x, dv/dx = e^(2x) (M1)
    4. int e^(2x)sin x dx = 1/2e^(2x)sin x - 1/2I (A1)
    5. I = 1/2e^(2x)cos x + 1/4e^(2x)sin x - 1/4I, so 5/4I = e^(2x)(1/2cos x + 1/4sin x) (M1)
    6. I = (e^(2x)(2cos x + sin x))/5 + C (A1)

    Trap: Swapping the roles on the second pass (u = e^(2x) after u = cos x) undoes the first pass and returns I = I.

  9. Let In = int₀¹ xⁿe^(x) dx for n ∈ N. (a) Show that In = e - nIn₋₁ for n ≥ 1. (b) Hence find I₃ in terms of e.7 marks
    Answer
    1. (a)
    2. u = xⁿ, dv/dx = e^(x), so du/dx = nxⁿ⁻¹ and v = e^(x) (M1)
    3. In = [xⁿe^(x)]₀¹ - nint₀¹ xⁿ⁻¹e^(x) dx (A1)
    4. [xⁿe^(x)]₀¹ = e - 0 = e (A1), so In = e - nIn₋₁ (AG)
    5. (b)
    6. I₀ = int₀¹ e^(x) dx = e - 1 (A1)
    7. I₁ = e - I₀ = 1 (A1)
    8. I₂ = e - 2I₁ = e - 2 (A1)
    9. I₃ = e - 3I₂ = 6 - 2e (A1)

    Trap: Starting the chain at I₀ = e or I₀ = 0. The integral of e^(x) from 0 to 1 is e - 1.

  10. Water flows into an empty tank. The rate of flow is r(t) = e^(√t) L min⁻¹, where t is the time in minutes after the flow starts. (a) Use the substitution u = √t to show that the volume of water in the tank after 4 minutes is int₀² 2ue^(u) du litres. (b) Hence show that this volume is 2(e² + 1) litres. (c) Write down this volume correct to three significant figures.7 marks
    Answer
    1. (a)
    2. t = u², so dt = 2u du (M1)
    3. t = 0 gives u = 0 and t = 4 gives u = 2 (A1)
    4. volume = int₀⁴ e^(√t) dt = int₀² e^(u) × 2u du = int₀² 2ue^(u) du (A1)(AG)
    5. (b)
    6. attempt to use integration by parts: differentiate 2u and integrate e^(u) (M1)
    7. int₀² 2ue^(u) du = [2ue^(u)]₀² - int₀² 2e^(u) du = [2ue^(u) - 2e^(u)]₀² (A1)
    8. = (4e² - 2e²) - (0 - 2) = 2e² + 2 = 2(e² + 1) (A1)(AG)
    9. (c)
    10. 2(e² + 1) = 16.778… = 16.8 litres (A1)

    Trap: Writing dt = du instead of 2u du, keeping the limits 0 and 4, or taking 2ue^(u) - 2e^(u) at u = 0 as 0 when it is -2.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
int u dv/dx dx = uv + int v du/dx dxint u dv/dx dx = uv - int v du/dx dx: the second term has a minus sign.
int₀^(π/2)sin xcos³ x dx with u = cos x, then int₀^(π/2)-u³ duint₁⁰-u³ du: change the limits to u values, u = 1 and u = 0.
int ln x dx = 1/xint ln x dx = xln x - x + C: write ln x × 1 and use integration by parts.
Stopping at I = e^(x)sin x - e^(x)cos x - ICollect the terms in I: 2I = e^(x)(sin x - cos x), so I = 1/2e^(x)(sin x - cos x) + C.

Frequently asked questions

How do I use a substitution in an integral, including the limits of a definite integral?
Choose u = g(x), find du/dx, and replace every x and the dx so that only u and du remain. For a definite integral, put each x limit into u = g(x) to get the matching u limit, and do not return to x. Integrate in u, and if an x is left, write it in terms of u.
What is the integration by parts formula?
int u dv/dx dx = uv - int v du/dx dx, and the formula is in the data booklet. Choose u to be the part that becomes simpler when differentiated, such as x or x². Choose dv/dx to be a part you can integrate, such as e^(x), sin x or cos x.
How do I integrate ln x or arcsin x?
Write ln x = ln x × 1, take u = ln x and dv/dx = 1, so v = x. Then int ln x dx = xln x - x + C. For arcsin x the same idea gives xarcsin x + √(1-x²) + C. Differentiate your answer to check it.
How do I integrate x² eˣ when the power of x is repeated?
One use of integration by parts lowers the power of x by one: int x²e^(x) dx = x²e^(x) - int 2xe^(x) dx. The new integral is still a product, so use the formula again. Put the second integral in brackets behind its minus sign, so the sign applies to the whole bracket.
What do I do when the original integral comes back during integration by parts?
Call the integral I and do not stop. For int e^(x)sin x dx, two passes of parts bring back I, which gives 2I = e^(x)(sin x - cos x). Collect the terms in I on one side and divide, so that int e^(x)sin x dx = 1/2e^(x)(sin x - cos x) + C.
Why do I get the wrong sign when I use integration by parts?
The second term has a minus sign, so writing a plus sign is wrong: the formula is uv - int v du/dx dx. Bracket the second integral so that its minus sign applies to every term inside it. Check the final answer by differentiating it.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters