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 du=g′(x) dx. Integrate in u, then put g(x) back in place of u. For a definite integral, change the limits to values of u instead.
Find a function whose derivative is 2x(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 2x, 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⋅2x, which is 12x(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 2x(x2+1)5 exactly.
Test it at x=1, where the target 2x(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.
dxd6(x2+1)6=66(x2+1)5⋅2x=2x(x2+1)5
dxd6(x2+1)6=66(x2+1)5⋅2x=2x(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 du/dx=g′(x) is written in differential form as du=g′(x) dx, 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) dx becomes du. 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)dx=∫f(u)du
∫f(g(x))g′(x)dx=∫f(u)du
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
Integrand
u
du
2x(x2+1)5
x2+1
2xdx
xex2
x2
2xdx
x2√x3+1
x3+1
3x2dx
cos(3x)
3x
3 dx
sin3xcosx
sinx
cosxdx
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 du=g′(x) dx 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.du=2xdx records that u moves 2x times as fast as x, which is why the factor 2xdx can be replaced by du.
dxdF(g(x))=F′(g(x))g′(x)=f(g(x))g′(x)
dxdF(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) dx. 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)dx=21∫cosudu=21sin(x2)+C
∫xcos(x2)dx=21∫cosudu=21sin(x2)+C
Substitution on the integral of xcos(x2)
Step
What to do
For ∫xcos(x2) dx
1
Choose u, an inside whose derivative appears
u=x2
2
Find du
du=2xdx, so xdx=du/2
3
Rewrite every part in u,dx included
∫cosu⋅du/2
4
Integrate in u
21sinu+C
5
Put the inside back
21sin(x2)+C
6
Check by differentiating
21cos(x2)⋅2x=xcos(x2)
Adjust for a constant factor
If the leftover factor matches du only up to a constant, divide by that constant. With u=x2,du=2xdx, so xdx=du/2. Only a constant can be moved this way, because a constant passes through an integral and a variable does not.
∫xex2dx=21∫eudu=21ex2+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)dx=∫g(a)g(b)f(u)du
∫abf(g(x))g′(x)dx=∫g(a)g(b)f(u)du
Where it breaks
Where it breaks
Substitution needs the inside’s derivative to be present, up to a constant factor. ∫xex2dx has it, since x is half of 2x.∫ex2dx does not, and no substitution helps. Dividing by 2x to force a fit, as in ex2/(2x)+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 ∫xexdx, 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 ∫du/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
Integral
What it needs
Result
∫xex2dx
Substitution, u=x2
21ex2+C
∫xexdx
Integration by parts
(x−1)ex+C
∫ex2dx
No formula from the usual functions
Left 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 4x(x2+1)5, twice the integrand 2x(x2+1)5, which exposes a dropped factor at once.
For a definite integral, take both routes. ∫02x(x2+1)3dx 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. ∫sinxcosxdx is 21sin2x+C with u=sinx,and −21cos2x+C with u=cosx. The two differ by the constant 21, 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/(2x)+C under ∫ex2dx. Rows for u and du in between are checked too. An answer left in u is checked against the u row above it, so under ∫x2(x3+1)5dx 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 x2dx=du reads ✗ “Doesn’t match du = u′(x) dx.”, and x2dx=du/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) du, and for some others, such as sin2xcosx and 2t/(t2+1). For the rest, such as xex2, 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,du=2xdx. Can that u finish ∫x3√x2+1dx, where x3 is not a constant times 2x?
Yes. Split x3 as x2⋅x. The xdx is du/2, and the leftover x2 is u−1, so the integral becomes (1/2)∫(u−1)√udu, 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 du=g′(x) dx look like multiplying du/dx=g′(x) through by dx. 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 dx=3cosθdθ.
Leaving part of the integrand in x. After the substitution, every factor, dx included, must be in u. With u=x3,∫x2cos(x3) dx becomes (1/3)∫cosudu, with no x2 left over.
Dropping a constant factor. With u=x2+1,du=2xdx, so xdx is du/2, not du.∫x(x2+1)3dx is (x2+1)4/8+C, and leaving out the 1/2 gives (x2+1)4/4+C, twice too big.
Moving a variable outside the integral to make du fit. ∫ex2dx is not ex2/(2x)+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 ∫02x(x2+1)3dx with u=x2+1, the limits become 1and 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 ∫2x(x2+1)5dx, and (x2+1)6/6+C is the answer.
Choosing the outside as u. In ∫2x(x2+1)5dx,u=(x2+1)5 gives du=10x(x2+1)4dx, 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 du=g′(x) dx, 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) dx, the whole family of antiderivatives of f, written with +C, such as ∫2xdx=x2+C. It has no limits of integration.
Integrand
The function being integrated: the expression whose values contribute to the accumulation. In ∫f(x) dx,f(x) is the integrand and x is the integration variable.