Integration by substitution

Substitution reverses the chain rule. You replace a tricky inner expression with u, so the integral becomes a simple one in u.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

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.

How to solve it

  1. Choose u as the inner function whose derivative also appears in the integrand.
  2. Find du/dx and rewrite dx in terms of du.
  3. Replace everything in x with u.
  4. Integrate with respect to u.
  5. 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
(x2+1)48+C\frac{\left(x^{2}+1\right)^{4}}{8} + C
  1. Choose the substitution
    Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
  2. Differentiate u
  3. Rewrite the whole integral in terms of u
    All the x terms cancel with du.
  4. Integrate with respect to u
  5. Put x back (u = (x^2+1))
  6. Check: differentiate the answer
    Compared numerically at several x values.

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
sin⁡(x)44+C\frac{\sin\left(x\right)^{4}}{4} + C
  1. Choose the substitution
    Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
  2. Differentiate u
  3. Rewrite the whole integral in terms of u
    All the x terms cancel with du.
  4. Integrate with respect to u
  5. Put x back (u = sin(x))
  6. Check: differentiate the answer
    Compared numerically at several x values.

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
−cos⁡(2x)2+C-\frac{\cos\left(2 x\right)}{2} + C
  1. Choose the substitution
    Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
  2. Differentiate u
  3. Rewrite the whole integral in terms of u
    All the x terms cancel with du.
  4. Integrate with respect to u
  5. Put x back (u = (2*x))
  6. Check: differentiate the answer
    Compared numerically at several x values.

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
ln⁡(x2+1)2+C\frac{\ln\left(x^{2}+1\right)}{2} + C
  1. Choose the substitution
    Pick the inner function: its derivative should appear (up to a number) elsewhere in the integrand.
  2. Differentiate u
  3. Rewrite the whole integral in terms of u
    All the x terms cancel with du.
  4. Integrate with respect to u
  5. Put x back (u = (x^2+1))
  6. Check: differentiate the answer
    Compared numerically at several x values.

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)³.

  1. ux² + 1, du = 2x dx
  2. Integral½∫u³ du
  3. Result(x² + 1)⁴/8 + C
  4. Check: differentiate to get x(x² + 1)³ ✓2

Trig

Integrate cos x sin³x.

  1. usin x, du = cos x dx
  2. Integral∫u³ du = u⁴/4
  3. Check: ✓0.25

Ratio Higher

Integrate x/(x² + 1).

  1. ux² + 1
  2. Integral½∫du/u = ½ ln u
  3. Check: ✓0.3466

Definite Higher

Evaluate ∫₀¹ x(x² + 1)³ dx.

  1. New limitsu = 1 to 2
  2. ½ ∫u³ du½ [u⁴/4]
  3. Evaluate(16 − 1)/8
  4. 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

  1. u = inner function.
  2. Replace dx.
  3. Convert limits.
  4. Back-substitute for indefinite integrals.
  5. 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.

More in Calculus and the formula sheets.