Integration by Substitution: Method and Worked Examples

By Engr. Henry Akpan

Undoing the Chain Rule

Differentiating (x² + 1)⁶ with the chain rule gives 6(x² + 1)⁵ × 2x. So integrating 2x(x² + 1)⁵ should take us back to (x² + 1)⁶ ÷ 6. But how do you spot this, and how do you handle integrals where the pattern is less obvious? The answer is integration by substitution, the most widely used technique for integrals that the basic rules cannot handle directly. This tutorial, for MTH 101/102 and Further Mathematics, covers the method step by step: choosing the substitution, changing dx, the standard patterns f′(x)[f(x)]ⁿ and f′(x)/f(x), linear substitutions, definite integrals with changed limits, trigonometric substitutions for square roots, and tips for choosing u. It builds on the tutorial on integration rules.

The Method

To evaluate ∫ f(x) dx by substitution:

  1. Choose u, usually the "inner" function, such as the expression inside brackets, under a root, in a denominator or in an exponent.
  2. Differentiate to find du/dx, and rearrange it to express dx in terms of du.
  3. Substitute everything, so that the integral contains only u and du, with no x left.
  4. Integrate with respect to u.
  5. Substitute back to write the answer in terms of x, and add the constant C.

Check any answer by differentiating it: you should get back the original integrand.

Worked Example 1: the Classic Pattern

Find ∫ 2x(x² + 1)⁵ dx.

  1. Let u = x² + 1.
  2. Then du/dx = 2x, so du = 2x dx.
  3. The integral becomes ∫ u⁵ du. The 2x dx has been replaced exactly by du.
  4. Integrate: u⁶ ÷ 6 + C.
  5. Substitute back: (x² + 1)⁶ ÷ 6 + C.

Check: d/dx[(x² + 1)⁶/6] = 6(x² + 1)⁵ × 2x ÷ 6 = 2x(x² + 1)⁵.

Worked Example 2: Adjusting a Constant

Find ∫ x√(x² + 4) dx.

Let u = x² + 4, so du = 2x dx, and x dx = ½ du.

∫ x√(x² + 4) dx = ∫ ½ u^(1/2) du = ½ × u^(3/2) ÷ (3/2) + C = ⅓u^(3/2) + C.

So the answer is ⅓(x² + 4)^(3/2) + C.

A missing constant factor can always be fixed this way. But a missing x cannot: ∫ √(x² + 4) dx has no x outside the root to pair with du, so this substitution fails, and a different method is needed.

Worked Example 3: Exponentials

Find ∫ x e^(x²) dx.

Let u = x², so du = 2x dx, and x dx = ½ du.

∫ ½ eᵘ du = ½eᵘ + C = ½e^(x²) + C.

The Pattern f′(x)/f(x)

When the numerator is the derivative of the denominator, substituting u = denominator always gives a logarithm:

∫ f′(x) ÷ f(x) dx = ln|f(x)| + C

Worked example 4

Find (a) ∫ 2x ÷ (x² + 1) dx (b) ∫ tan x dx.

(a) The numerator 2x is the derivative of x² + 1, so the answer is ln(x² + 1) + C. (No modulus is needed, because x² + 1 is always positive.)

(b) tan x = sin x ÷ cos x. Let u = cos x, so du = −sin x dx. Then ∫ tan x dx = −∫ du/u = −ln|u| + C = −ln|cos x| + C, which can also be written ln|sec x| + C.

Linear Substitutions

For a function of (ax + b), the substitution u = ax + b gives du = a dx, so:

∫ f(ax + b) dx = (1/a) F(ax + b) + C, where F is an antiderivative of f.

Worked example 5

  • ∫ cos(3x + 1) dx = ⅓ sin(3x + 1) + C
  • ∫ (2x − 5)⁷ dx = (2x − 5)⁸ ÷ (8 × 2) + C = (2x − 5)⁸ ÷ 16 + C
  • ∫ e^(4x) dx = ¼ e^(4x) + C

After a little practice, linear substitutions can be done in your head: integrate as usual, then divide by the coefficient of x.

Worked example 6: rewriting x in terms of u

Find ∫ x ÷ (x + 1) dx.

Let u = x + 1, so x = u − 1 and dx = du. The integral becomes ∫ (u − 1)/u du = ∫ (1 − 1/u) du = u − ln|u| + C.

Substituting back: (x + 1) − ln|x + 1| + C, which is x − ln|x + 1| + C, since the extra 1 can be absorbed into the constant.

Definite Integrals: Change the Limits

For a definite integral, it is easiest to change the limits from x-values to u-values as you substitute. Then you never need to substitute back.

Worked example 7

Evaluate ∫ x(x² + 1)³ dx from x = 0 to x = 2.

Let u = x² + 1, so x dx = ½ du. When x = 0, u = 1. When x = 2, u = 5.

∫ ½u³ du from u = 1 to 5 = [u⁴ ÷ 8] from 1 to 5 = (625 − 1) ÷ 8 = 78.

Worked example 8

Evaluate ∫ sin²x cos x dx from 0 to π/2.

Let u = sin x, so du = cos x dx. When x = 0, u = 0. When x = π/2, u = 1.

∫ u² du from 0 to 1 = [u³/3] from 0 to 1 = ⅓.

Trigonometric Substitutions

Square roots of the form √(a² − x²) or a² + x² in a denominator can often be removed by a trigonometric substitution, using the identities sin²θ + cos²θ = 1 and 1 + tan²θ = sec²θ.

  • For √(a² − x²), let x = a sin θ.
  • For a² + x², let x = a tan θ.

Worked example 9

Find ∫ 1 ÷ √(1 − x²) dx.

Let x = sin θ, so dx = cos θ dθ, and √(1 − sin²θ) = cos θ. The integral becomes ∫ cos θ ÷ cos θ dθ = ∫ 1 dθ = θ + C.

Since θ = sin⁻¹x, the answer is sin⁻¹x + C.

Worked example 10

Evaluate ∫ 1 ÷ (1 + x²) dx from 0 to 1.

Let x = tan θ, so dx = sec²θ dθ, and 1 + tan²θ = sec²θ. The integral becomes ∫ 1 dθ. The limits become θ = 0 and θ = π/4.

The answer is π/4. This gives a famous way of calculating π from an integral.

Worked example 11: area of a circle

Evaluate ∫ √(4 − x²) dx from 0 to 2, and interpret the result.

Let x = 2 sin θ, so dx = 2 cos θ dθ and √(4 − x²) = 2 cos θ. The limits become 0 and π/2.

∫ 4cos²θ dθ = ∫ 2(1 + cos 2θ) dθ = [2θ + sin 2θ] from 0 to π/2 = π.

The curve y = √(4 − x²) is the upper half of a circle of radius 2, so this integral is the area of a quarter of that circle: ¼ × π × 2² = π, as expected.

Tips for Choosing u

  • Look for a function and its derivative both appearing, up to a constant factor: (x² + 1) with x, sin x with cos x, ln x with 1/x, or eˣ with eˣ.
  • Try the inside of a bracket, a root, a denominator or an exponent.
  • If the substitution leaves some x behind, try expressing it in terms of u, as in example 6. If that still fails, try another u or another method, such as integration by parts or partial fractions.

Common Mistakes with Integration by Substitution

  • Forgetting to replace dx, as in ∫ u⁵ dx. Every dx must become an expression in du.
  • Leaving a mixture of x and u in the integral.
  • Keeping the x-limits after substituting in a definite integral. Either change them to u-values or substitute back first.
  • Forgetting the constant C in indefinite integrals, or the modulus in ln|u|.
  • Trying to fix a missing variable as if it were a constant. Only constant factors can be moved outside the integral.

Integration by Substitution: Practice Questions

  1. Find ∫ 3x²(x³ + 2)⁴ dx.
  2. Find ∫ cos x ÷ sin x dx.
  3. Find ∫ e^(5x − 2) dx.
  4. Find ∫ (ln x) ÷ x dx.
  5. Evaluate ∫ 2x ÷ (x² + 1)² dx from 0 to 1.
  6. Find ∫ x ÷ √(x² + 9) dx.

Answers: 1. Let u = x³ + 2: (x³ + 2)⁵ ÷ 5 + C. 2. ln|sin x| + C. 3. ⅕e^(5x − 2) + C. 4. Let u = ln x: ½(ln x)² + C. 5. Let u = x² + 1, with limits 1 to 2: [−1/u] from 1 to 2 = −½ + 1 = ½. 6. Let u = x² + 9: √(x² + 9) + C.

Conclusion

Integration by substitution reverses the chain rule. Choose u (usually the inner function), express dx in terms of du, rewrite the integral entirely in u, integrate, and substitute back. Key patterns are ∫ f′(x)[f(x)]ⁿ dx, ∫ f′(x)/f(x) dx = ln|f(x)| + C, and linear substitutions, where you divide by the coefficient of x. For definite integrals, change the limits to u-values. Trigonometric substitutions such as x = a sin θ and x = a tan θ handle √(a² − x²) and a² + x², giving results such as sin⁻¹x, tan⁻¹x and the area of a circle.

Related Tutorials