5.16 · AHL · HL onlyPaper 1Paper 2

Integration by substitution and parts

In a minute

Two methods take you past the standard integrals. A given substitution rewrites a hard integral in a new variable, even when the derivative of the inside isn't there. reverses the product rule, so you can integrate products such as xcos⁡(3x)x\cos(3x) and single functions such as ln⁡x\ln x.

You'll be able to

  • Use a given substitution when the derivative of the inside isn't there, rewriting dx\mathrm{d}x, every leftover xx and the limits.
  • Integrate a product by parts, choosing uu and dvdx\frac{\mathrm{d}v}{\mathrm{d}x} well.
  • Integrate ln⁡x\ln x and inverse trig functions by parts, writing each as a product with 11.
  • Use parts twice, including when the integral you started with comes back.
  • Combine a substitution with integration by parts.
Before you start3 quick questions on what this builds on
Check yourself
Find ∫sin⁡(4x) dx\int \sin(4x)\,\mathrm{d}x.
Check yourself
Differentiate y=arctan⁡xy = \arctan x.
Check yourself
Find the exact value of ∫143x dx\int_{1}^{4} \frac{3}{\sqrt{x}}\,\mathrm{d}x.

Revise first: 5.5 Antidifferentiation, definite integrals and area, 5.10 Indefinite integration and substitution, 5.11 Definite integrals and areas and 5.15 Extended differentiation and integration

Substitution when the derivative isn't there

In 5.10 you used on integrals of the form ∫k g′(x) f(g(x)) dx\int k\,g'(x)\,f(g(x))\,\mathrm{d}x. The derivative of the inside, g′(x)g'(x), was already there, ready to become du\mathrm{d}u.

Now look at ∫x(2x−1)4 dx\int x(2x - 1)^{4}\,\mathrm{d}x. With u=2x−1u = 2x - 1, you get dudx=2\frac{\mathrm{d}u}{\mathrm{d}x} = 2. But the factor outside the bracket is xx, not a number. You can still substitute: you write that leftover xx in terms of uu too.

1. Start from the substitution, such as u=2x−1u = 2x - 1. When an integral is not of the form ∫k g′(x) f(g(x)) dx\int k\,g'(x)\,f(g(x))\,\mathrm{d}x, the exam gives it to you.

2. Differentiate to find dudx\frac{\mathrm{d}u}{\mathrm{d}x}. Rearrange it to replace dx\mathrm{d}x, or a group such as ex dx\mathrm{e}^{x}\,\mathrm{d}x.

3. Rearrange the substitution to write every leftover xx in terms of uu.

4. Integrate with respect to uu. For an indefinite integral, put xx back at the end. For a , change the to uu-values instead.

Worked exampleUse the substitution u=2x−1u = 2x - 1 to find ∫x(2x−1)4 dx\int x(2x - 1)^{4}\,\mathrm{d}x.

Try it first, then reveal one step at a time.

  1. Differentiate: dudx=2\frac{\mathrm{d}u}{\mathrm{d}x} = 2, so dx=12 du\mathrm{d}x = \frac{1}{2}\,\mathrm{d}u.
Check yourself
Use the substitution u=xu = \sqrt{x} to find ∫1x+x dx\int \frac{1}{x + \sqrt{x}}\,\mathrm{d}x, for x>0x > 0.
Worked exampleUse the substitution u=ex+1u = \mathrm{e}^{x} + 1 to find the exact value of ∫0ln⁡3e2xex+1 dx\int_{0}^{\ln 3} \frac{\mathrm{e}^{2x}}{\mathrm{e}^{x} + 1}\,\mathrm{d}x.

Try it first, then reveal one step at a time.

  1. Differentiate: dudx=ex\frac{\mathrm{d}u}{\mathrm{d}x} = \mathrm{e}^{x}, so ex dx=du\mathrm{e}^{x}\,\mathrm{d}x = \mathrm{d}u.
Check yourself
Use the substitution u=4−xu = 4 - x to find the exact value of ∫03x4−x dx\int_{0}^{3} \frac{x}{\sqrt{4 - x}}\,\mathrm{d}x.

Integration by parts

Substitution can't help with ∫xcos⁡(3x) dx\int x\cos(3x)\,\mathrm{d}x. It is a product of two unrelated functions.

The way in is the from 5.6. For two functions uu and vv of xx, ddx(uv)=udvdx+vdudx\frac{\mathrm{d}}{\mathrm{d}x}(uv) = u\frac{\mathrm{d}v}{\mathrm{d}x} + v\frac{\mathrm{d}u}{\mathrm{d}x}.

Integrate both sides with respect to xx. The left side gives back uvuv. Rearrange, and you get :

In the formula booklet
∫udvdx dx=uv−∫vdudx dxor∫u dv=uv−∫v du\int u\frac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = uv - \int v\frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x \quad \text{or} \quad \int u\,\mathrm{d}v = uv - \int v\,\mathrm{d}u

The formula is in the booklet, so you don't need to memorise it. You do need to choose uu and dvdx\frac{\mathrm{d}v}{\mathrm{d}x} well.

The second form, ∫u dv=uv−∫v du\int u\,\mathrm{d}v = uv - \int v\,\mathrm{d}u, has a picture. Drag bb. The area under the curve is ∫v du\int v\,\mathrm{d}u, the area beside it is ∫u dv\int u\,\mathrm{d}v, and together they always fill the rectangle uvuv.

See why it worksDrag the slider
uvbb²

For the curve v = u² from u = 0 to u = b:

∫v du = 2.67

∫u dv = 5.33

Together they fill the rectangle b × b² = 8.00

2.00
The two coloured areas always fill the rectangle: uv = ∫v du + ∫u dv.

A power of xx is usually the best uu: x2x^{2} becomes 2x2x, then 22. The exceptions are ln⁡x\ln x and the . They are hard to integrate but easy to differentiate, so they are always uu.

Worked exampleFind ∫xcos⁡(3x) dx\int x\cos(3x)\,\mathrm{d}x.

Try it first, then reveal one step at a time.

  1. Let u=xu = x, which gets simpler, so dudx=1\frac{\mathrm{d}u}{\mathrm{d}x} = 1.

Had you chosen u=cos⁡(3x)u = \cos(3x) and dvdx=x\frac{\mathrm{d}v}{\mathrm{d}x} = x, the new integral would contain x2sin⁡(3x)x^{2}\sin(3x), which is harder. So swap.

Parts also works on a single function such as ln⁡x\ln x, arcsin⁡x\arcsin x or arctan⁡x\arctan x. Write it as a product with 11. Take uu as the function and dvdx=1\frac{\mathrm{d}v}{\mathrm{d}x} = 1, so v=xv = x.

Worked exampleFind ∫arctan⁡x dx\int \arctan x\,\mathrm{d}x.

Try it first, then reveal one step at a time.

  1. Write it as ∫arctan⁡x⋅1 dx\int \arctan x \cdot 1\,\mathrm{d}x. Let u=arctan⁡xu = \arctan x, so dudx=11+x2\frac{\mathrm{d}u}{\mathrm{d}x} = \frac{1}{1 + x^{2}}, as in 5.15.

The same steps work for arcsin⁡x\arcsin x. The leftover is ∫x1−x2 dx\int \frac{x}{\sqrt{1 - x^{2}}}\,\mathrm{d}x. It is not a log but a reverse chain rule power, −1−x2-\sqrt{1 - x^{2}}. So:

Learn this
∫arcsin⁡x dx=xarcsin⁡x+1−x2+C\int \arcsin x\,\mathrm{d}x = x\arcsin x + \sqrt{1 - x^{2}} + C

For ln⁡x\ln x the leftover is ∫1 dx\int 1\,\mathrm{d}x, so ∫ln⁡x dx=xln⁡x−x+C\int \ln x\,\mathrm{d}x = x\ln x - x + C.

Check yourself
Find ∫ln⁡(x+2) dx\int \ln(x + 2)\,\mathrm{d}x, for x>−2x > -2.

For a definite integral, the uvuv part gets the limits too: ∫abudvdx dx=[uv]ab−∫abvdudx dx\int_{a}^{b} u\frac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = \big[uv\big]_{a}^{b} - \int_{a}^{b} v\frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x.

Worked exampleGiven that ∫0kxe−x dx=0.5\int_{0}^{k} x\mathrm{e}^{-x}\,\mathrm{d}x = 0.5, where k>0k > 0, use integration by parts to write an equation for kk. Then use your calculator to find kk. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. Let u=xu = x, so dudx=1\frac{\mathrm{d}u}{\mathrm{d}x} = 1. Let dvdx=e−x\frac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^{-x}, so v=−e−xv = -\mathrm{e}^{-x}.
Check yourself
Find the exact value of ∫0π4xsec⁡2x dx\int_{0}^{\frac{\pi}{4}} x\sec^{2}x\,\mathrm{d}x.

Using parts more than once

When the new integral is still a product, use parts on it again. Two patterns come up.

Pattern 1: a power such as x2x^{2} times a sine, cosine or exponential. Each round, uu drops one power, so x2x^{2} needs two rounds.

Worked exampleFind ∫x2cos⁡x dx\int x^{2}\cos x\,\mathrm{d}x.

Try it first, then reveal one step at a time.

  1. Round 1: let u=x2u = x^{2} and dvdx=cos⁡x\frac{\mathrm{d}v}{\mathrm{d}x} = \cos x. Then dudx=2x\frac{\mathrm{d}u}{\mathrm{d}x} = 2x and v=sin⁡xv = \sin x.

Pattern 2: an exponential times a sine or cosine. Neither factor ever gets simpler. After two rounds, the integral you started with comes back.

Call that integral II. You then have an equation with II on both sides, and you solve it for II.

Worked exampleFind ∫e2xcos⁡x dx\int \mathrm{e}^{2x}\cos x\,\mathrm{d}x.

Try it first, then reveal one step at a time.

  1. Call the integral II. Round 1: let u=e2xu = \mathrm{e}^{2x} and dvdx=cos⁡x\frac{\mathrm{d}v}{\mathrm{d}x} = \cos x, so dudx=2e2x\frac{\mathrm{d}u}{\mathrm{d}x} = 2\mathrm{e}^{2x} and v=sin⁡xv = \sin x. Then I=e2xsin⁡x−∫2e2xsin⁡x dxI = \mathrm{e}^{2x}\sin x - \int 2\mathrm{e}^{2x}\sin x\,\mathrm{d}x.
Check yourself
Find ∫x2e−x dx\int x^{2}\mathrm{e}^{-x}\,\mathrm{d}x.
Check yourself
Find ∫exsin⁡(2x) dx\int \mathrm{e}^{x}\sin(2x)\,\mathrm{d}x.

Substitution, then parts

Some integrals need both methods. Substituting for an inside such as x\sqrt{x} or x2x^{2} often leaves a product like usin⁡uu\sin u, and parts finishes it.

The letter uu is now taken, so for the parts step say in words which factor you differentiate and which you integrate.

Worked exampleUse the substitution u=xu = \sqrt{x} to find ∫sin⁡(x)dx\int \sin\left(\sqrt{x}\right)\mathrm{d}x, for x>0x > 0.

Try it first, then reveal one step at a time.

  1. From u=xu = \sqrt{x}, x=u2x = u^{2}. So dxdu=2u\frac{\mathrm{d}x}{\mathrm{d}u} = 2u and dx=2u du\mathrm{d}x = 2u\,\mathrm{d}u.
Worked exampleUse the substitution u=x2u = x^{2} to show that ∫01x3ex2 dx=12\int_{0}^{1} x^{3}\mathrm{e}^{x^{2}}\,\mathrm{d}x = \frac{1}{2}.

Try it first, then reveal one step at a time.

  1. dudx=2x\frac{\mathrm{d}u}{\mathrm{d}x} = 2x, so x dx=12 dux\,\mathrm{d}x = \frac{1}{2}\,\mathrm{d}u. Split x3=x2⋅xx^{3} = x^{2}\cdot x, and replace x2x^{2} with uu.
Check yourself
Use the substitution u=x2u = x^{2} to find ∫x3cos⁡(x2)dx\int x^{3}\cos\left(x^{2}\right)\mathrm{d}x.

Common mistakes

  • Losing a sign in the second round of parts. The whole second integral is subtracted, so bracket it before you expand: −(−2xcos⁡x+2sin⁡x)-\left(-2x\cos x + 2\sin x\right) flips both signs.
  • Keeping the xx-limits after switching to uu. Change the limits the moment you change the variable, or put xx back before you use the original limits.
  • Missing the factor from dx\mathrm{d}x. With u=2x−1u = 2x - 1, dx=12 du\mathrm{d}x = \frac{1}{2}\,\mathrm{d}u. Leave out the 12\frac{1}{2} and your answer is twice too big.
  • Stopping too early. An indefinite integral ends in terms of xx, not uu, with + C+\,C and any modulus signs a logarithm needs.

Exam tips

  • “Use the substitution u=…u = \ldots” means you must use that one. Show the du\mathrm{d}u line, the integral in uu and, for a definite integral, the new limits.
  • For parts, write down uu, vv, dudx\frac{\mathrm{d}u}{\mathrm{d}x} and dvdx\frac{\mathrm{d}v}{\mathrm{d}x} first. A correct set-up earns method marks even if the algebra slips later.
  • “Show that” an exact value means no calculator. Work forwards from the integral, and make your final line match the given result.
  • On Paper 2, write down the integral or equation you put into your calculator, then give the answer to 3 s.f.

Key takeaways

In booklet∫udvdx dx=uv−∫vdudx dxor∫u dv=uv−∫v du\int u\frac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = uv - \int v\frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x \quad \text{or} \quad \int u\,\mathrm{d}v = uv - \int v\,\mathrm{d}u
Learn thisSubstitution: replace dx\mathrm{d}x, write every leftover xx in terms of uu, and change the limits of a definite integral.
Learn thisParts: choose uu to get simpler when differentiated. ln⁡x\ln x and inverse trig functions are always uu.
Learn thisln⁡x\ln x, arcsin⁡x\arcsin x or arctan⁡x\arctan x on its own: use parts with dvdx=1\frac{\mathrm{d}v}{\mathrm{d}x} = 1.
Learn thisxnx^{n} times a trig or exponential function: parts nn times. Exponential times trig: parts twice, then solve for II.
Learn thisSubtract the whole second integral, in a bracket. Add + C+\,C once, at the end.

Practise this

6 past-paper questions on 5.16 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 5.16 →