Chalk−1

Math · Calculus I · Concept

Integration by substitution (u-substitution)

Integration by substitution reverses the chain rule. When an integrand contains an inner function g⁡(x) and its derivative g′(x), set u=g⁡(x), so that d⁢u=g′(x) d⁢x. Integrate in u, then put g⁡(x) back in place of u. For a definite integral, change the limits to values of u instead.

Try one — Chalk checks each line

A concrete case

Guess, check, adjust

Find a function whose derivative is 2⁢x⁢(x2+1)5. Nothing in the table of basic antiderivatives fits, but the expression looks like the end of a chain rule. The power 5 sits on x2+1, and 2⁢x, the derivative of x2+1, sits beside it.

Guess (x2+1)6, one power higher. The chain rule gives its derivative as 6⁢(x2+1)5⋅2⁢x, which is 12⁢x⁢(x2+1)5. The guess has the right shape and is 6 times too big. Divide it by 6, and (x2+1)6/6 has derivative 2⁢x⁢(x2+1)5 exactly.

Test it at x=1, where the target 2⁢x⁢(x2+1)5 is 2⋅25=64. The candidate is 26/6≈10.66667 at x=1 and about 10.73086 at x=1.001. It climbs about 0.0642 over a step of 0.001, a rate of about 64.2, close to 64.

The guess worked because the derivative of the inside was sitting in the integrand. Substitution turns that guess into a method.

dd⁢x(x2+1)66=6⁢(x2+1)5⋅2⁢x6=2⁢x⁢(x2+1)5
dd⁢x(x2+1)66=6⁢(x2+1)5⋅2⁢x6=2⁢x⁢(x2+1)5

The rule

The substitution rule

Integration by substitution, also called u-substitution, undoes the chain rule. It applies when the integrand is a function of some inside expression g⁡(x), multiplied by g′(x), the inside’s derivative.

Give the inside its own letter, u=g⁡(x). Its derivative d⁢u⁢/⁢d⁢x=g′(x) is written in differential form as d⁢u=g′(x) d⁢x, which says how a small change in x moves u. Every piece of the integrand then has a version in u. f⁡(g⁡(x)) becomes f⁡(u), and g′(x) d⁢x becomes d⁢u. If F is an antiderivative of f, the integral is F⁢(u)+C, and putting g⁡(x) back for u gives F⁢(g⁡(x))+C.

∫f⁡(g⁡(x))g′(x)d⁢x=∫f⁡(u)d⁢u
∫f⁡(g⁡(x))g′(x)d⁢x=∫f⁡(u)d⁢u

Choosing u

Look for an inside expression whose derivative also appears as a factor, perhaps up to a constant. The inside of a power, a root, an exponential or a trigonometric function is usually the right choice. The table lists common cases.

Common choices of u
Integrandud⁢u
2⁢x⁢(x2+1)5x2+12⁢x d⁢x
x ex2x22⁢x d⁢x
x2x3+1x3+13x2 d⁢x
cos(3⁢x)3⁢x3 d⁢x
sin3xcosxsinxcosx d⁢x

Why it works

Why it works

Differentiate the answer F⁢(g⁡(x)) with the chain rule. The outside’s derivative at the inside is F′(g⁡(x)), which is f⁡(g⁡(x)), and the inside’s derivative is g′(x). Their product f⁡(g⁡(x))g′(x) is exactly the integrand, so F⁢(g⁡(x))+C is its antiderivative. Substitution is the chain rule run backward.

The differential d⁢u=g′(x) d⁢x is bookkeeping that keeps the rates straight. With u=x2+1, a step from x=1 to x=1.001 moves u from 2 to 2.002001. That change, 0.002001, is close to g′(1)⋅0.001=0.002. d⁢u=2⁢x d⁢x records that u moves 2⁢x times as fast as x, which is why the factor 2⁢x d⁢x can be replaced by d⁢u.

dd⁢xF(g⁡(x))=F′(g⁡(x))g′(x)=f(g⁡(x))g′(x)
dd⁢xF(g⁡(x))=F′(g⁡(x))g′(x)=f(g⁡(x))g′(x)

The method

The method in six steps

The table works through ∫xcos(x2) d⁢x. After step 3 no x may be left. If one is, the choice of u does not fit, and another u or another method is needed.

∫xcos(x2)d⁢x=12∫cosud⁢u=12sin(x2)+C
∫xcos(x2)d⁢x=12∫cosud⁢u=12sin(x2)+C
Substitution on the integral of xcos(x2)
StepWhat to doFor ∫xcos(x2) d⁢x
1Choose u, an inside whose derivative appearsu=x2
2Find d⁢ud⁢u =2⁢x d⁢x, so x d⁢x =d⁢u⁢/2
3Rewrite every part in u, d⁢x included∫cosu⋅d⁢u⁢/2
4Integrate in u12sinu+C
5Put the inside back12sin(x2)+C
6Check by differentiating12cos(x2)⋅2⁢x =xcos(x2)

Adjust for a constant factor

If the leftover factor matches d⁢u only up to a constant, divide by that constant. With u=x2, d⁢u=2⁢x d⁢x, so x d⁢x=d⁢u⁢/2. Only a constant can be moved this way, because a constant passes through an integral and a variable does not.

∫xex2d⁢x=12∫eud⁢u=12ex2+C

Definite integrals: change the limits

For a definite integral, convert the limits along with everything else. x=a becomes u=g⁡(a), and x=b becomes u=g⁡(b). Then evaluate in u and never go back to x.

The other route finishes the indefinite integral, puts g⁡(x) back, and uses the original limits in x. Either route works. Mixing them, with u-limits in an antiderivative in x or x-limits in one in u, gives a wrong number.

∫abf⁡(g⁡(x))g′(x)d⁢x=∫g⁡(a)g⁡(b)f⁡(u)d⁢u
∫abf⁡(g⁡(x))g′(x)d⁢x=∫g⁡(a)g⁡(b)f⁡(u)d⁢u

Where it breaks

Where it breaks

Substitution needs the inside’s derivative to be present, up to a constant factor. ∫x ex2 d⁢x has it, since x is half of 2⁢x. ∫ex2 d⁢x does not, and no substitution helps. Dividing by 2⁢x to force a fit, as in ex2/⁢(2⁢x)+C, fails the check, because the quotient rule leaves an extra term. ex2 has no antiderivative built from the usual functions at all.

A product is not always a chain. In ∫x ex d⁢x, neither factor is the derivative of something inside the other. Setting u=x changes nothing, and the integral needs integration by parts. Of the three look-alikes in the table, only the first is a chain.

The pattern ∫d⁢u⁢/⁢u=ln∣⁢u⁢∣+C keeps its absolute value. It may be dropped only where u is positive, as it is for u=x2+1.

Three integrals that look alike
IntegralWhat it needsResult
∫x ex2 d⁢xSubstitution, u=x212ex2+C
∫x ex d⁢xIntegration by parts(x−1)ex+C
∫ex2 d⁢xNo formula from the usual functionsLeft as an integral

Check your answer

Check your answer

A substitution answer is an antiderivative in x, so it can be tested like any other.

Run the chain rule on your answer. It should return the integrand exactly, constants included. Differentiating (x2+1)6/3 gives 4⁢x⁢(x2+1)5, twice the integrand 2⁢x⁢(x2+1)5, which exposes a dropped factor at once.

For a definite integral, take both routes. ∫02 x⁢(x2+1)3 d⁢x in u, with limits 1 and 5, and in x, with (x2+1)4/8 and limits 0 and 2, both give 78.

Expect answers that look different. ∫sinxcosx d⁢x is 12sin2x+C with u=sinx, and −12cos2x+C with u=cosx. The two differ by the constant 12, because sin2x+cos2x=1, so both are right.

To have Chalk check the work, write it in a Math box. Put the integral on the first row and your antiderivative, with its +C, on the row below. The Checker marks it ✓ when its derivative is the integrand and ✗ when it isn’t, even the forced ex2/⁢(2⁢x)+C under ∫ex2 d⁢x. Rows for u and d⁢u in between are checked too. An answer left in u is checked against the u row above it, so under ∫x2(x3+1)5 d⁢x and u=x3+1 the wrong u6/6+C reads ✗. With no u row it reads ?, and it still has to go back to x. Under u=x3+1, the row x2 d⁢x=d⁢u reads ✗ “Doesn’t match du = u′(x) dx.”, and x2 d⁢x=d⁢u⁢/3 reads ✓.

For a definite integral, write the integral in x equal to the integral in u on one row, so the Checker compares the two. A u-integral on a row of its own is checked only as itself. Chalk compares them when both integrands are polynomials with any constant inside the integral, as in ∫15 (u3/2) d⁢u, and for some others, such as sin2xcosx and 2⁢t⁢/⁢(t2+1). For the rest, such as x ex2, it marks that row “?”, because it can’t follow that step of an integral yet. The rows that evaluate the u-integral are still checked. A u-integral that keeps the x limits but is true on its own keeps its ✓. A note gives the limits that belong to u, such as “x from 0 to 1 is u from 1 to 2.”

With u=x2+1, d⁢u=2⁢x d⁢x. Can that u finish ∫x3x2+1 d⁢x, where x3 is not a constant times 2⁢x?

Yes. Split x3 as x2⋅x. The x d⁢x is d⁢u⁢/2, and the leftover x2 is u−1, so the integral becomes (1⁢/2)∫(u−1)u d⁢u, with no x left. It comes to (x2+1)5⁢/2/5−(x2+1)3⁢/2/3+C. A leftover factor is fine when it can be written in u.

The chain rule backward, and substitution the other way

Each differentiation rule, read backward, gives an integration method. Substitution is the chain rule backward, and integration by parts is the product rule backward.

Leibniz notation makes d⁢u=g′(x) d⁢x look like multiplying d⁢u⁢/⁢d⁢x=g′(x) through by d⁢x. The chain rule is what justifies it, not algebra on fractions. The definite version follows the same way. F⁢(g⁡(x)) is an antiderivative of the integrand, so the integral from a to b is F⁢(g⁡(b))−F⁢(g⁡(a)), which is the integral of f from g⁡(a) to g⁡(b).

Substitution can also run the other way, replacing x with an expression in a new variable. Trigonometric substitution sets x=3sinθ, for θ between −π⁢/2 and π⁢/2, to turn 9−x2 into 3cosθ. The bookkeeping is the same, with d⁢x=3cosθ d⁢θ.

∫abf(g⁡(x))g′(x)d⁢x=F(g⁡(b))−F(g⁡(a))=∫g⁡(a)g⁡(b)f⁡(u)d⁢u
∫abf(g⁡(x))g′(x)d⁢x=F(g⁡(b))−F(g⁡(a))=∫g⁡(a)g⁡(b)f⁡(u)d⁢u

Common mistakes

  • Leaving part of the integrand in x. After the substitution, every factor, d⁢x included, must be in u. With u=x3, ∫x2cos(x3) d⁢x becomes (1⁢/3)∫cosu d⁢u, with no x2 left over.
  • Dropping a constant factor. With u=x2+1, d⁢u=2⁢x d⁢x, so x d⁢x is d⁢u⁢/2, not d⁢u. ∫x⁢(x2+1)3 d⁢x is (x2+1)4/8+C, and leaving out the 12 gives (x2+1)4/4+C, twice too big.
  • Moving a variable outside the integral to make d⁢u fit. ∫ex2 d⁢x is not ex2/⁢(2⁢x)+C. Only constants pass through an integral, so a leftover variable means another u or another method.
  • Keeping the old limits after switching to u. In ∫02 x⁢(x2+1)3 d⁢x with u=x2+1, the limits become 1 and 5. Evaluating u4/8 from 0 to 2 gives 2 instead of 78.
  • Stopping in u. An indefinite integral in x needs an answer in x. u6/6+C is unfinished for ∫2⁢x⁢(x2+1)5 d⁢x, and (x2+1)6/6+C is the answer.
  • Choosing the outside as u. In ∫2⁢x⁢(x2+1)5 d⁢x, u=(x2+1)5 gives d⁢u=10⁢x⁢(x2+1)4 d⁢x, which matches nothing left in the integrand. The inside, x2+1, is the choice whose derivative is present.

Key terms

Integration by substitution
A method that reverses the chain rule: when an integrand has the form f⁡(g⁡(x))⋅g′(x), set u=g⁡(x), so d⁢u=g′(x) d⁢x, and integrate f⁡(u) instead. A definite integral also converts its limits to u-values.
Chain rule
The rule for differentiating a function inside another function: [f⁡(g⁡(x))]′ =f′(g⁡(x))⋅g′(x). Differentiate the outside, keeping the inside as it is, then multiply by the derivative of the inside.
Antiderivative
A function whose derivative is the given function, such as x3 for 3x2. Any two antiderivatives on one interval differ by a constant, which is why answers carry +C.
Indefinite integral
∫f⁡(x) d⁢x, the whole family of antiderivatives of f, written with +C, such as ∫2⁢x d⁢x=x2+C. It has no limits of integration.
Integrand
The function being integrated: the expression whose values contribute to the accumulation. In ∫f⁡(x) d⁢x, f⁡(x) is the integrand and x is the integration variable.

Work through an example

Find ∫2⁢x⁢(x2+1)5 d⁢x.

Integrate 2⁢x⁢(x2+1)5 by substitution →

Handle a constant factor in u-substitution →

Change the limits in a definite substitution →

Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Check it by differentiating in Math Check the antiderivative in Math Check u and du in Math Study the 5 key terms Open worked example on a board Substitution in Math Reference

Your existing work stays on this device. Examples open as editable copies.