Substitution reverses the chain rule. You replace a tricky inner expression with u, so the integral becomes a simple one in u.
Before you start
This page is easier if you are comfortable with:
What this topic covers
Choose u so that its derivative appears in the integrand, replace dx using du, integrate, then substitute back (integration by substitution formula). It is the reverse of the chain rule, and works well with integrals of the form f′/f and integrals of f′(x) times f(x) to the power n.
Each part of this topic has its own page with the formula, worked examples and a solver: Integral of a power, Fundamental theorem of calculus, Area under a curve, Area between two curves, Integral of e^{kx}, Integral of 1/x, Integral of sin kx and cos kx, Integral of sec² kx, Integral of f′(x)/f(x), Integral of (ax + b)^n.
Closely related topics: Integration, Areas and volumes by integration, Differentiation, Partial fractions.
What is it used for?
Substitution simplifies an integral by replacing part of it with a new variable u. It reverses the chain rule.
- Integrating a function of a function, such as x(x² + 1)³.
- Integrating powers of sine and cosine.
- Changing limits to evaluate definite integrals.
How to solve it
- Choose u as the inner function whose derivative also appears in the integrand.
- Find du/dx and rewrite dx in terms of du.
- Replace everything in x with u.
- Integrate with respect to u.
- Substitute back to x and differentiate to check.
Worked examples
The examples marked with a button were worked out by the solver on this page. You can try each one yourself.
Example 1: integrate x*(x^2+1)^3 by substitution
Worked out by the solver on this page. Press the button to try it yourself.
Integration by substitution Answer checked
Answer
8(x2+1)4+CChoose the substitution
Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
u=x2+1
Differentiate u
dxdu=2x ⇒ du=(2x)dx
Rewrite the whole integral in terms of u
All the x terms cancel with du.
∫x(x2+1)3dx=∫2u3du
Integrate with respect to u
=8u4+C
Put x back (u = (x^2+1))
=8(x2+1)4+C
Check: differentiate the answer
Compared numerically at several x values.
dxd(8(x2+1)4)=x(x2+1)3 ✓
Example 2: integrate cos(x)*sin(x)^3 by substitution
Worked out by the solver on this page. Press the button to try it yourself.
Integration by substitution Answer checked
Answer
4sin(x)4+CChoose the substitution
Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
u=sin(x)
Differentiate u
dxdu=cos(x) ⇒ du=(cos(x))dx
Rewrite the whole integral in terms of u
All the x terms cancel with du.
∫cos(x)sin(x)3dx=∫u3du
Integrate with respect to u
=4u4+C
Put x back (u = sin(x))
=4sin(x)4+C
Check: differentiate the answer
Compared numerically at several x values.
dxd(4sin(x)4)=cos(x)sin(x)3 ✓
Example 3: integrate sin(2x) by substitution
Worked out by the solver on this page. Press the button to try it yourself.
Integration by substitution Answer checked
Answer
−2cos(2x)+CChoose the substitution
Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
u=2x
Differentiate u
dxdu=2 ⇒ du=(2)dx
Rewrite the whole integral in terms of u
All the x terms cancel with du.
∫sin(2x)dx=∫2sin(u)du
Integrate with respect to u
=−2cos(u)+C
Put x back (u = (2*x))
=−2cos(2x)+C
Check: differentiate the answer
Compared numerically at several x values.
dxd(−2cos(2x))=sin(2x) ✓
Example 4: integrate x/(x^2+1) by substitution
Worked out by the solver on this page. Press the button to try it yourself.
Integration by substitution Answer checked
Answer
2ln(x2+1)+CChoose the substitution
Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
u=x2+1
Differentiate u
dxdu=2x ⇒ du=(2x)dx
Rewrite the whole integral in terms of u
All the x terms cancel with du.
∫x2+1xdx=∫2u1du
Integrate with respect to u
=2ln(u)+C
Put x back (u = (x^2+1))
=2ln(x2+1)+C
Check: differentiate the answer
Compared numerically at several x values.
dxd(2ln(x2+1))=x2+1x ✓
Special cases
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
Power of a bracket
∫x(x² + 1)³ dx = (x² + 1)⁴/8 + C
u = x² + 1.
Trig
∫cos x sin³x dx = sin⁴x/4 + C
u = sin x.
Ratio
∫x/(x² + 1) dx = ½ ln(x² + 1) + C
u = x² + 1.
Linear inside
∫sin 2x dx = −½ cos 2x + C
u = 2x.
Word problems
Let u be the inner function, find du/dx, replace dx, integrate in u, and substitute back.
Bracket
Integrate x(x² + 1)³.
- ux² + 1, du = 2x dx
- Integral½∫u³ du
- Result(x² + 1)⁴/8 + C
- Check: differentiate to get x(x² + 1)³ ✓2
Trig
Integrate cos x sin³x.
- usin x, du = cos x dx
- Integral∫u³ du = u⁴/4
- Check: ✓0.25
Ratio Higher
Integrate x/(x² + 1).
- ux² + 1
- Integral½∫du/u = ½ ln u
- Check: ✓0.3466
Definite Higher
Evaluate ∫₀¹ x(x² + 1)³ dx.
- New limitsu = 1 to 2
- ½ ∫u³ du½ [u⁴/4]
- Evaluate(16 − 1)/8
- Check: 1.875 ✓1.875
Common mistakes
Forgetting to change dx
∫u³ dx ✗
replace dx with du/(2x) ✓
Express everything in u.
Not changing the limits
old limits in u ✗
new limits ✓
Convert them.
Choosing a u that does not simplify
u = x ✗
u = inner function ✓
Look for the derivative present.
Dropping the constant factor
u⁴/4 ✗
u⁴/8 ✓
Include the ½ from du = 2x dx.
Exam tips
u = inner function.
Replace dx.
Convert limits.
Back-substitute for indefinite integrals.
Check by differentiating.
Practice questions
Try each one on paper, then open the answer. Use the solver above to see the full working.
1. ∫₀¹ 2x(x² + 1)² dx Foundation
2.3333
2. ∫₀^{π/2} cos x sin x dx Foundation
0.5
3. ∫₁² 2x/(x² + 1) dx (4 dp) Foundation
0.9163
4. ∫₀¹ e^(2x) dx (4 dp) Higher
3.1945
5. New upper limit for u = x² + 1 when x = 2 Higher
5
6. New upper limit for u = 3x when x = 4 Higher
12
Practice generator
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
Key terms
- Substitution
- Replacing an expression by u.
- Inner function
- The function inside another.
- du/dx
- Derivative of u.
- Limits
- Change with u.
- Reverse chain rule
- The idea behind it.
- Back-substitute
- Return to x.
Frequently asked questions
What is integration by substitution?
Replacing part of the integrand with u to make it simpler.
How do I choose u?
Pick the inner function whose derivative also appears.
What happens to the limits?
Convert them to values of u.
Which page covers the formula?
integration by substitution formula.
Which page covers f′/f?
integral of f′/f.
Which page covers powers of f?
integral of f′(x) times f(x) to the power n.