Maths › Integration › Integration by substitution and by parts

Integration by substitution and by parts

The chain rule and the product rule each reverse into a method of integration. Substitution changes the variable until the integral matches a standard form, and the structure of the integrand determines which substitution to use; integration by parts replaces one integral by another, and it is how the integral of ln x is obtained.

Builds on Integrating standard functions and The product, quotient and chain rules.

IN THIS TOPIC

  • Spot reverse chain rule patterns, f'/f and f' times a power of f, at sight.
  • Choose a substitution from the shape of the integrand, including x = a sin θ for a root of a difference of two squares.
  • Run full substitutions, converting integrand, dx and limits together.
  • Integrate by parts, choosing which factor to differentiate, including ∫ln x dx.
  • Apply parts twice where one pass is not enough.

COMMON MISCONCEPTION

∫uv dx = ∫u dx × ∫v dx.

Integrating the two factors separately and multiplying gives (x2/2)ex for xex, whose derivative is not the original integrand. A product of unrelated factors integrates by parts, ∫u(dv/dx) dx = uv − ∫v(du/dx) dx, differentiating the factor that simplifies. For xex that is the x, and the answer is (x − 1)ex + c.

Choosing between the two methods

Two methods are taught here, and the shape of the integrand decides which to try first. Substitution is for an integrand built around an inner function: either that function appears together with its own derivative, as cos x does beside sin3 x, or a single new letter stands for a bracket or a root and leaves powers of that letter behind, as u = 2x + 1 does in ∫x√(2x + 1) dx. Parts is for a product of two functions with no such relation between them, one of which simplifies on being differentiated: x becomes 1 and ln x becomes 1/x, which is why xex, x2ex and ln x written as 1 × ln x are parts questions.

One test separates the two. Differentiate the candidate inner function and look for the result in the integrand. Where it appears, up to a constant factor, the integral reverses a chain rule, and inspection or a substitution finishes it. Where the two factors are unrelated, no substitution makes the integrand simpler, and parts replaces the integral by a different one instead. A few integrands, ∫x√(2x + 1) dx among them, can be done either way, and either is acceptable.

Reverse chain patterns and substitution are treated in Reverse chain patterns and Choosing the substitution. Integration by parts is in Integration by parts, with the case needing a second application in When once is not enough. The questions on this topic, with worked answers beneath them, are on the integration by substitution and by parts questions page.

Reverse chain patterns

Where an integrand contains a function together with its derivative as a factor, the integral reverses a chain rule in one step. Three patterns cover most cases.

∫f′(x)f(x)dx=ln|f(x)|+c\text{∫} \frac{f'(x)}{f(x)} \, dx = \text{ln}|f(x)| + cNOT IN THE BOOKLET: LEARN IT

The modulus signs matter: the result holds on any interval where f keeps the same sign, and says nothing across a point where f is zero. On a definite integral, check that the limits do not straddle a root of f before writing it down.

The other two are f' times a power of f, which integrates to the next power of f divided by its exponent, and the special case ∫tan x dx = −ln|cos x| + c, which is the first pattern with f = cos x.

Three integrands in grey boxes with their computed integrals in cyan and a spotting note beside each: a derivative-over-function pair gives a logarithm, a derivative-times-power pair reverses the chain rule directly, and tan x is the first pattern with sine and cosine named.
FIG. 1The three patterns: f'/f integrates to ln|f|, f' times a power of f reverses a chain rule, and tan x is the first pattern with f = cos x.

WORKED EXAMPLE

A full substitution, limits and all

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

From u = 2x + 1: x = (u − 1)/2 and dx = du/2, so the integral becomes ∫((u − 1)/2)√u (du/2) = ¼∫(u3/2 − u1/2) du.

Integrating: ¼((2/5)u5/2 − (2/3)u3/2) = u5/2/10 − u3/2/6.

Back in x: (2x + 1)5/2/10 − (2x + 1)3/2/6 + c.

Convert all three parts: the integrand, the dx, and, for a definite integral, the limits. Omitting the factor ½ from dx integrates a different function.

GUIDED PRACTICE

Spot, do not substitute

Find ∫sin3 x cos x dx by inspection, before opening the working.

Show the working

cos x is the derivative of sin x, and it multiplies a power of sin x, which is the f' fⁿ pattern.

Reversing the chain rule gives ¼ sin4 x + c, which differentiates back to the integrand.

The substitution u = sin x gives the same result; inspection is the same calculation written more briefly.

Choosing the substitution

The substitution above was supplied by the question. Edexcel 9MA0 8.5 also requires a suitable substitution to be found, so the choice must come from the structure of the integrand. A substitution is useful only when the resulting integral is simpler than the original, and a small number of structures cover most cases.

Structure of the integrandSubstitutionEffect
an inner function with its own derivative alongside it, up to a constantu = the inner functionthe du absorbs that factor, though inspection usually gets there faster
a power or a root of a linear expression, (2x + 1)5 or √(2x + 1)u = that linear expressionx comes back simple in u, so every part of the integrand turns into powers of u
a root of x, as in 1/(1 + √x)u = √x, so that x = u2the root becomes the new variable, and a rational function is what is left
a root of a difference of two squares, √(a2 − x2)x = a sin θa2 − a2 sin2 θ = a2 cos2 θ, and the root disappears

The last row runs the other way about, giving x in terms of the new letter rather than the new letter in terms of x. Both directions are allowed. What matters is that the integrand, the dx and any limits all finish in the same variable.

A substitution that does not simplify the integrand is the wrong one, and testing a candidate takes a line of working. In ∫(4x − 1)/(2x + 1)5 dx the substitution u = 4x − 1 gives ∫8u/(u + 3)5 du, a linear expression over the fifth power of a linear expression, which has the same structure as the original. Try the other candidate instead.

WORKED EXAMPLE

Choosing the substitution

Find ∫(4x − 1)/(2x + 1)5 dx.

The difficulty is the bracket in the denominator, so send that to a single letter: u = 2x + 1, which gives x = (u − 1)/2 and dx = du/2.

The numerator follows from the same relabelling, 4x − 1 = 2(u − 1) − 1 = 2u − 3, so the integral becomes ∫((2u − 3)/u5)(du/2) = ½∫(2u−4 − 3u−5) du.

Integrating each power, ½(−(2/3)u−3 + (3/4)u−4) = −1/(3u3) + 3/(8u4).

Back in x, the integral is −1/(3(2x + 1)3) + 3/(8(2x + 1)4) + c.

Differentiating the answer back gives 2/(2x + 1)4 − 3/(2x + 1)5, and over a single denominator that is (4x − 1)/(2x + 1)5 again.

WORKED EXAMPLE

A root of a difference of two squares

Find the exact value of ∫03 √(9 − x2) dx.

The inner function 9 − x2 has derivative −2x, and no x stands outside the root to play that part, so there is no chain to reverse, and no index law reaches inside a root of a difference. An identity does reach inside it, and that is the reason for choosing x = 3 sin θ: it turns 9 − x2 into 9 − 9 sin2 θ = 9 cos2 θ, whose root is 3 cos θ with no root sign left standing.

Differentiating the substitution gives dx = 3 cos θ dθ, and the limits convert along with everything else. x = 0 needs sin θ = 0, so θ = 0, and x = 3 needs sin θ = 1, so θ = π/2. Across 0 ≤ θ ≤ π/2 the cosine is positive, which is what allows the root to be 3 cos θ rather than ±3 cos θ.

The integral is now ∫0π/2 3 cos θ × 3 cos θ dθ = 9∫0π/2 cos2 θ dθ, and the identity cos2 θ = ½ + ½ cos 2θ from the standard functions lesson finishes it.

9[θ/2 + (sin 2θ)/4] from 0 to π/2 = 9(π/4 + 0) = 9π/4.

The result can be checked geometrically: y = √(9 − x2) is the upper half of the circle of radius 3, so this integral is a quarter of that circle, and a quarter of 9π is 9π/4.

GUIDED PRACTICE

A root in the denominator

Find ∫1/(1 + √x) dx, choosing the substitution for yourself, before opening the working.

Show the working

The root is the only non-rational part, so take it as the new variable: u = √x, so x = u2 and dx = 2u du, with u ≥ 0.

The integral becomes ∫(1/(1 + u)) × 2u du = 2∫u/(1 + u) du, which is not a standard form until the fraction is divided out: u/(1 + u) = 1 − 1/(1 + u).

Integrating, 2(u − ln|1 + u|), and on x ≥ 0 the bracket 1 + √x is positive, so the modulus can go.

Back in x, the integral is 2√x − 2 ln(1 + √x) + c, which differentiates back to 1/(1 + √x) in two lines.

Substituting for a root converts the integrand into a rational function whenever the root is the only non-rational part. Dividing out the fraction afterwards is algebra rather than calculus, and it is required before integrating.

Integration by parts

The product rule reverses into parts, printed in the booklet as

∫udvdxdx=uv−∫vdudxdx\text{∫} u \frac{dv}{dx} \, dx = uv − \text{∫} v \frac{du}{dx} \, dxIN THE FORMULAE BOOKLET

One factor is differentiated and the other integrated, which replaces the original integral by a new one. Choose to differentiate the factor that simplifies: x becomes 1, ln x becomes 1/x. Integrating the two factors separately and multiplying is not valid: for x and ex it gives (x2/2)ex, whose derivative is not xex.

WORKED EXAMPLE

The standard parts question

Find ∫xex dx.

Differentiate the x, which simplifies to 1, and integrate the ex, which costs nothing. Parts gives xex − ∫ex dx.

∫xex dx = (x − 1)ex + c.

The method replaced the product by ∫ex dx. With the roles exchanged the new integral is more complicated than the original, which indicates the wrong choice.

The parts computation for the logarithm laid out line by line: ln x written as 1 times ln x, the 1 integrated and the log differentiated, the new integral collapsing to the integral of 1, and the checked answer x ln x minus x plus c.
FIG. 2∫ln x dx by parts, writing ln x as 1 × ln x. Differentiate the logarithm, integrate the 1, and the result is x ln x − x + c, for x > 0.

INDEPENDENT PRACTICE

The logarithm's own integral

Find ∫ln x dx.

Show the working

Write the integrand as 1 × ln x, then differentiate the ln x and integrate the 1.

Parts gives x ln x − ∫x × (1/x) dx = x ln x − ∫1 dx.

∫ln x dx = x ln x − x + c for x > 0, and differentiating back gives x/x + ln x − 1 = ln x.

Writing the integrand as 1 × ln x is what makes parts applicable. Edexcel 9MA0 8.5 names this integral, so learn the result as well as the method.

When once is not enough

Edexcel 9MA0 8.5 includes more than one application of parts, and ∫x2ex dx is the standard example. Differentiating x2 gives 2x, so the new integral still contains a product; apply parts again to it. Each application reduces the power by one, so a polynomial factor of degree n requires n applications.

WORKED EXAMPLE

Parts, twice

Find ∫x2ex dx.

First pass, differentiating x2: x2ex − ∫2xex dx.

The remaining integral is the worked example above, doubled: ∫2xex dx = 2(x − 1)ex.

So ∫x2ex dx = x2ex − 2(x − 1)ex + c = (x2 − 2x + 2)ex + c.

On the second application a bracket containing a subtraction is itself subtracted, so expand it in full rather than distributing the minus sign mentally.

ASSESSMENT FOCUS

  • Check first for a function multiplied by its own derivative, which integrates by inspection without a substitution.
  • Where no substitution is given, choose it from the structure: for a power or a root of a linear expression take that expression as u; for a root of x take u = √x; for √(a2 − x2) take x = a sin θ, since the Pythagorean identity removes the root.
  • A candidate substitution that leaves the integrand with the same structure is the wrong one; show the line that establishes this and try another.
  • In a substitution, convert integrand, dx and limits together, and state that the limits have been converted. Limits left in terms of x evaluate the wrong integral.
  • In parts, differentiate the factor that simplifies. If the new integral is harder than the old one, the roles were the wrong way round.
  • ∫tan x dx = −ln|cos x| + c may be quoted, and it follows in one line from the f'/f pattern with f = cos x.
  • A second application of parts subtracts a whole bracket. Write the bracket out before expanding it.
  • Check every antiderivative by differentiating it back to the integrand.

CHECK YOURSELF

Find the exact value of ∫01 xex dx.

Show a hint

Parts, then substitute both limits into (x − 1)ex.

Show the answer

Parts gives the antiderivative (x − 1)ex.

Evaluating: (1 − 1)e − (0 − 1) × 1 = 0 + 1 = 1.

The value is exactly 1. Substitute the lower limit into the bracket in full, since it contributes −(0 − 1) × 1 = +1.

A function multiplied by its own derivative integrates by reversing a chain rule, by substitution or by inspection.

When no substitution is given, choose it from the structure: a linear bracket becomes u, a root of x becomes u = √x, and √(a2 − x2) becomes x = a sin θ.

Parts replaces one integral by another: differentiate the factor that simplifies, and apply it again where the new integral is still a product.

WORKBOOK

Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.

15 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the integration by substitution and by parts questions page.

USED LATER IN

CHECK YOUR PROGRESS

Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.

  • Spot reverse chain rule patterns, f'/f and f' times a power of f, at sight.
  • Choose a substitution from the shape of the integrand, including x = a sin θ for a root of a difference of two squares.
  • Run full substitutions, converting integrand, dx and limits together.
  • Integrate by parts, choosing which factor to differentiate, including ∫ln x dx.
  • Apply parts twice where one pass is not enough.

Open the full revision checklist to see every objective in the course in one place.