This whole subtopic is higher level. Nothing in it is on an SL paper.
Educerie · IB Diploma · Mathematics: analysis and approaches
Topic 5 Calculus · 5.16 Integration by substitution and by parts
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Integrate ∫ k g′(x) f(g(x)) dx by inspection or substitution, none given | HL only | "Find ∫ x²(x³ − 2)⁵ dx" (3 marks) |
| Use a given substitution, rewriting every x and the dx in the new variable | HL only | "Using the substitution u = x + 3, find ∫ x√(x + 3) dx" (5 marks) |
| Change the limits of a definite integral when you substitute | HL only | "Use u = 2x + 1 to find the exact value of …" (6 marks) |
| Use a given trigonometric substitution such as x = sin θ | HL only | "By using x = 2 sin θ, show that …" (6 to 7 marks) |
| Integrate by parts with the formula-booklet rule, choosing u sensibly | HL only | "Find ∫ x cos 2x dx" (4 marks) |
| Integrate ln x, arcsin x and arctan x by parts, as 1 × the function | HL only | "Find ∫ ln x dx" (3 marks), "∫ arcsin x dx" (5 marks) |
| Apply parts twice when one round leaves another product | HL only | "Find ∫ x²eˣ dx" (5 marks) |
| Solve for the integral in the cyclic case, where it comes back | HL only | "Show that ∫ eˣ sin x dx = ½eˣ(sin x − cos x) + C" (6 to 7 marks) |
Before you start
You need the SL integrals and inspection from 5.10, and the chain and product rules from 5.6. The results of 5.15 (arcsin, arctan and the rest) turn up as answers. The identity cos²θ = ½(1 + cos 2θ) from 3.6 is needed once. The integration-by-parts formula is in the formula booklet.
1The idea in one paragraph
Integration has no product rule. Instead you have two ways of turning an integral you cannot do into one you can. Integration by substitution renames part of the integrand as a new variable, u, so that the integral becomes a standard one in u. It is the chain rule read backwards. Integration by parts swaps ∫ u (dv/dx) dx for uv − ∫ v (du/dx) dx. It is the product rule read backwards, and it works when u is the factor that gets simpler as you differentiate it. Every question here comes down to one decision: which technique, and which u.
2Substitution: what it does and why it works
At SL you met ∫ 2x cos(x²) dx. The inside is x², its derivative 2x sits outside, and the answer is sin(x²) + C by inspection. As a substitution, the working looks like this.
The step du = 2x dx says a small change in x makes a change in u that is 2x times as big. Figure 1 shows the definite version from 0 to 1: the area under y = 2x cos(x²) on the left, and after u = x² the area under y = cos u on the right. The curves look nothing alike, but the substitution stretches the strips so that each keeps its area, and both totals are sin 1 ≈ 0.841.
The guide describes this SL form as ∫ k g′(x) f(g(x)) dx: a function of an inside function g(x), multiplied by a constant times the derivative of that inside. When an integral has this shape, no substitution will be given, and you are expected to spot it: in ∫ 6x²(x³ − 2)⁵ dx the inside x³ − 2 has derivative 3x², and 6x² is twice that, so the answer is 2 × (x³ − 2)⁶/6 + C = (x³ − 2)⁶/3 + C.
At HL the derivative of the inside is not quite there, or leftover x terms must be rewritten in u. For those, the guide says the substitution will be provided, so the marks are for carrying it out cleanly.
3Using a substitution you are given
The method is always the same four moves.
Substitution: (1) differentiate the substitution to link du and dx; (2) replace every x and the dx, so that no x is left; (3) integrate in u; (4) put x back (or, for a definite integral, change the limits instead).
Move (2) is where most students stop too soon: every x must go, not only the "inside".
Example 1. Use the substitution u = x + 3 to find ∫ x√(x + 3) dx.
The inside is x + 3 and its derivative is 1, so dx = du. But there is a spare x outside the root. Rearrange the substitution to deal with it: x = u − 3.
Differentiating the final answer brings back x√(x + 3), which is how you check it on Paper 1.
Example 2. Use the substitution u = eˣ + 1 to find ∫ e2x ÷ (eˣ + 1) dx.
Here du = eˣ dx. The numerator e2x is eˣ × eˣ, so one eˣ goes with the dx to make du, and the other must be written in u: eˣ = u − 1.
No modulus is needed on ln u, because eˣ + 1 is always positive.
4Definite integrals: change the limits
For a definite integral you can put x back and use the original limits, or change the limits into u-values and never go back to x. The second is shorter, and it is what a mark scheme expects after "use the substitution … to find the exact value".
Example 3. Use the substitution u = 2x + 1 to find the exact value of ∫₀⁴ x ÷ √(2x + 1) dx.
Once the limits are in u, never substitute x = 4 into an expression in u. That mixed step is the most common way to lose the final A1 here.
Example 4: a substitution that replaces x itself. Sometimes the question gives x as a function of the new variable. The classic case is √(a² − x²), which x = a sin θ turns into a clean cosine. Find the exact value of ∫₀¹ √(1 − x²) dx using x = sin θ, for 0 ≤ θ ≤ π/2.
The restriction on θ is what makes √(cos²θ) equal cos θ rather than |cos θ|. The curve y = √(1 − x²) for 0 ≤ x ≤ 1 is a quarter of the unit circle, whose area is π/4, and Figure 6(a) in section 7 draws it. For the indefinite integral you would return to x with θ = arcsin x and sin 2θ = 2x√(1 − x²).
5Integration by parts: where the formula comes from
Take two functions u and v of x. The product rule says
Integrate both sides with respect to x. The left side integrates back to uv. Rearranging gives the rule, which is in the formula booklet:
∫ u (dv/dx) dx = uv − ∫ v (du/dx) dx · integration by parts. You choose which factor is u (you will differentiate it) and which is dv/dx (you will integrate it).
The formula is a trade: the integral on the left for the one on the right. It is worth making only if the new integral, ∫ v (du/dx) dx, is easier. Figure 2 shows the same fact as areas. Plot v against u: the area under the curve is ∫ v du, the area to its left is ∫ u dv, and together they make the large rectangle u₂v₂ minus the small one u₁v₁. Know one area and you know the other.
Example 5. Find ∫ x sin x dx.
Two different kinds of function are multiplied: a polynomial x and a trig function sin x. Differentiate x and it becomes 1, which is simpler. So u = x and dv/dx = sin x.
Differentiating gives x sin x back. Choose the other way round, u = sin x and dv/dx = x, and the new integral is ∫ (x²/2) cos x dx, with a higher power of x than you started with. When the trade makes things worse, you have chosen u badly. Stop and swap.
6Choosing u, and the three integrals that need a hidden 1
Figure 3 gives an order of preference that works for every integral in this course. Read it from the left: whichever factor appears furthest left should be u.
The logic: logarithms and inverse trig functions have simple derivatives but awkward integrals, so they must be u. Polynomials shrink when differentiated, so they make a good u against trig and exponential functions, which do not grow when integrated.
Example 6. Find ∫ x² ln x dx.
A logarithm beats a polynomial, so u = ln x.
The 1/x from ln x cancels a power of x, which is why ln x must be u.
Example 7: ln x on its own. With only one factor, write ∫ ln x dx as ∫ 1 × ln x dx, with u = ln x and dv/dx = 1, so v = x.
This result is not in the formula booklet, so be able to derive it in three lines. Figure 6(b) uses it: the area under y = ln x from 1 to e is (e − e) − (0 − 1) = 1.
Example 8: arcsin x on its own. The same hidden 1 works: u = arcsin x and dv/dx = 1.
The integral left over has the SL form: the inside 1 − x² has derivative −2x, so ∫ x(1 − x²)−1/2 dx = −(1 − x²)1/2 + C, and
Parts, then inspection: ∫ arctan x dx works the same way and gives x arctan x − ½ ln(1 + x²) + C.
Definite integrals by parts. Evaluate the uv part between the limits too. For ∫₀π/2 x cos x dx, with u = x and v = sin x:
7Repeated integration by parts
When one round leaves an integral that still needs parts, there are two patterns.
Pattern 1: the polynomial runs out. In ∫ x² eˣ dx, take u = x². The new integral ∫ 2x eˣ dx is still a product, but the power has dropped to 1, and one more round finishes it.
The minus sign in front of the bracket applies to both terms of the second round, which is why −2eˣ becomes +2eˣ. Figure 4 lays the same calculation out as a table: differentiate down the left until it reaches 0, integrate down the right, and multiply along the arrows with alternating signs. Use it to organise and check, but write at least the first round in the formula's form, because that line carries the method mark.
Pattern 2: the integral comes back. In ∫ eˣ sin x dx neither factor gets simpler, and two rounds of parts bring back the integral you started with. That is not a dead end. Call it I and solve for it like an unknown.
In the cyclic case, keep the same type of function as u in both rounds (trig both times, or exponential both times). Switch, and the second round undoes the first, leaving the useless line I = I.
Figure 5 shows the area under y = eˣ sin x from 0 to π:
Figure 6 checks two earlier results with pictures: π/4 from Example 4 and ∫₁e ln x dx = 1 from Example 7. On Paper 2 a GDC's numerical integral does the same in seconds.
8Which technique? A decision in three questions
Ask, in this order:
- Is it on the standard list, or a composite with ax + b? Integrate directly (5.10, 5.15).
- Is it a function of an inside function, times (a multiple of) the inside's derivative? Inspection, no hint given: ∫ x ex² dx and ∫ (ln x)/x dx are this type.
- Is it a product of two different kinds of function, or a lone ln or inverse trig? Parts, with u chosen from Figure 3.
A given substitution must be used. Some integrals need both techniques: u = x² turns ∫ x³ ex² dx into ½ ∫ u eu du, which then needs parts (Try it Q5). A rational function whose denominator factorises may need partial fractions (1.11, 5.15) first.
9Where marks are lost
Leaving some x behind after substituting. An integral in both x and u cannot be integrated. Rewrite every x first, using the substitution rearranged (x = u − 3).
Forgetting to replace dx. ∫ cos u dx is not ∫ cos u du. The line du = g′(x) dx carries the M1, so write it.
Using the x-limits after changing to u. Once the integral is in u, the limits must be u-values. Never mix.
Choosing u the wrong way round. If the new integral is harder than the old one, swap. A log or inverse trig function is always u.
Dropping the minus sign across the second round. Every term of the second round changes sign. Keep it in a bracket until the last line.
Switching types in the cyclic case. Taking u = sin x in round 1 and u = eˣ in round 2 gives I = I. Keep the same type as u both times.
Adding the constant too early, or forgetting it. Leave + C out of v and the middle of the working, and put one + C on every final indefinite answer; its absence costs an A1.
10Work it right
- Decide the technique first, with the three questions in section 8.
- For a substitution, write u = …, then du = … dx, then any rearrangement such as x = … in u, each on its own line.
- Rewrite the whole integral in u, new limits included, before integrating anything.
- For parts, write u, du/dx, dv/dx and v in a small block, then substitute into the booklet formula as printed.
- Put the second round of parts in a bracket with the minus sign outside; in the cyclic case call the integral I and solve for it.
- Finish with + C, exact values on Paper 1, and a check by differentiating or with the GDC's numerical integral.
11Try it
Marks in brackets. Q1 to Q5 are Paper 1 style, no calculator. Q6 is Paper 2 style, with a GDC.
Q1. Use the substitution u = √x to find ∫ 1 ÷ (1 + √x) dx, for x > 0. 5 marks
Q2. Find ∫ x cos 2x dx. 4 marks
Q3. Show that ∫₁e x ln x dx = (e² + 1)/4. 5 marks
Q4. Let I = ∫ e2x cos x dx. Use integration by parts twice to show that I = (1/5)e2x(sin x + 2 cos x) + C. 7 marks
Q5. Using the substitution u = x², find ∫ x³ ex² dx. 6 marks
Q6. The region R is bounded by the curve y = x e−x, the x-axis and the line x = k, where k > 0.
(a) Show that the area of R is 1 − (k + 1)e−k. 4 marks
(b) The area of R is 0.5. Find the value of k. 2 marks
12In one breath
Substitution undoes the chain rule: set u, write du = g′(x) dx, replace every x and the dx, integrate in u, then return to x, or for a definite integral change the limits and stay in u. You spot the SL form yourself; anything harder comes with the substitution given, including trig ones like x = sin θ that turn √(1 − x²) into cos θ. Parts undoes the product rule: ∫ u (dv/dx) dx = uv − ∫ v (du/dx) dx, with u chosen from logs, inverse trig, polynomials, then trig and exponentials, so the new integral is easier. A lone ln x or arcsin x is 1 times itself. A polynomial times eˣ or a trig function needs one round per power of x; eˣ times sin x comes back after two rounds, so call it I, keep the same type as u both times, and solve. Finish with + C, exact values on Paper 1, and a check.
Answers
Q1. u = √x, so x = u² and dx = 2u du. Then ∫ 1/(1 + √x) dx = ∫ 2u/(1 + u) du = ∫ (2 − 2/(1 + u)) du = 2u − 2 ln(1 + u) + C = 2√x − 2 ln(1 + √x) + C. No modulus is needed, because 1 + √x > 0. M1 for dx = 2u du, A1 for the integral fully in u, M1 for writing 2u/(1 + u) as 2 − 2/(1 + u), A1 for 2u − 2 ln(1 + u), A1 for the answer in x with + C. An answer left in u loses the final A1.
Q2. u = x, dv/dx = cos 2x, so du/dx = 1 and v = ½ sin 2x. Then ∫ x cos 2x dx = ½x sin 2x − ∫ ½ sin 2x dx = ½x sin 2x + ¼ cos 2x + C. M1 for parts with u = x, A1 for v = ½ sin 2x, A1 for ½x sin 2x − ∫ ½ sin 2x dx, A1 for the answer with + C.
Q3. u = ln x and dv/dx = x, so du/dx = 1/x and v = x²/2. ∫ x ln x dx = (x²/2) ln x − ∫ x/2 dx = (x²/2) ln x − x²/4. Between 1 and e: (e²/2 × 1 − e²/4) − (0 − 1/4) = e²/4 + 1/4 = (e² + 1)/4, as required. M1 for parts with u = ln x, A1 for (x²/2) ln x − ∫ x/2 dx, A1 for (x²/2) ln x − x²/4, M1 for both limits substituted with ln e = 1 seen, AG for reaching the given answer. Taking u = x scores 0.
Q4. Round 1, with u = cos x and v = ½e2x: I = ½e2x cos x + ½ ∫ e2x sin x dx. Round 2, again with the trig factor as u (u = sin x): ∫ e2x sin x dx = ½e2x sin x − ½ ∫ e2x cos x dx = ½e2x sin x − ½I. So I = ½e2x cos x + ¼e2x sin x − ¼I, giving (5/4)I = ¼e2x(sin x + 2 cos x), and I = (1/5)e2x(sin x + 2 cos x) + C. M1 A1 for the first round, M1 A1 for a second round with the same type as u, M1 for collecting the I terms, A1 for (5/4)I = …, A1 for the given result with + C. Switching the type of u in round 2, giving I = I, scores M1 A1 only.
Q5. u = x², so du = 2x dx and x³ dx = x² × x dx = ½u du. Then ∫ x³ ex² dx = ½ ∫ u eu du. By parts with the polynomial u as the differentiated factor: ∫ u eu du = u eu − ∫ eu du = u eu − eu. So the integral is ½eu(u − 1) + C = ½ex²(x² − 1) + C. M1 for du = 2x dx, A1 for ½ ∫ u eu du, M1 for parts on it, A1 for u eu − eu, A1 for the answer in x, A1 for + C. Follow through a wrong constant.
Q6. (a) Area = ∫₀k x e−x dx. By parts with u = x, dv/dx = e−x, v = −e−x: ∫ x e−x dx = −x e−x + ∫ e−x dx = −x e−x − e−x. Between 0 and k: (−k e−k − e−k) − (0 − 1) = 1 − (k + 1)e−k. M1 for parts, A1 for −x e−x − e−x, M1 for substituting both limits, A1 for the given answer, AG. (b) Solve 1 − (k + 1)e−k = 0.5 on the GDC, by graphing y = 1 − (x + 1)e−x and y = 0.5 and using intersect: k = 1.68 (3 s.f.). M1 for setting their expression equal to 0.5, A1 for 1.68.
Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section AHL 5.16 Integration by substitution and by parts. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.