Mathematics/Lessons/Integration/Integration by Substitution
Pure · Integration · Year 2

Integration by Substitution

Every substitution is the chain rule read backwards — rename the messy inner function, and the integral simplifies itself.

10 min read 5 worked examples

Formalising the reverse chain rule

The previous lesson spotted composite-function patterns by inspection, whenever the "extra" factor was exactly $f'(x)$. Integration by substitution makes that idea rigorous and mechanical — introducing a new variable $u$ for the inner function, and carefully converting every part of the integral, including $dx$ itself, into $u$. This handles cases the reverse chain rule can't reach directly, where the outer factor isn't a clean constant multiple of the inner function's derivative.

The substitution is chosen so that $u$ and its derivative $\dfrac{du}{dx}$ together account for everything inside the integral. Since $\dfrac{du}{dx}$ behaves algebraically like a fraction here, it can be rearranged to give $dx$ in terms of $du$, allowing the whole integral to be rewritten purely in terms of $u$.

The method

To evaluate $\displaystyle\int f(x)\,dx$ using the substitution $u=g(x)$:

1) Differentiate to get $\dfrac{du}{dx}$, then rearrange to write $dx = \dfrac{du}{\,du/dx\,}$. 2) Replace every $x$-term (including $dx$) with its $u$-equivalent. 3) Integrate with respect to $u$. 4) Substitute $u=g(x)$ back in, to give the answer in terms of $x$.

Definite integrals: changing the limits

For a definite integral $\int_a^b f(x)\,dx$, there are two valid approaches once a substitution $u=g(x)$ is introduced. Either integrate to get an antiderivative in terms of $u$, substitute back to $x$, and apply the original limits — or, more efficiently, convert the limits themselves into $u$-values using $u=g(x)$, and evaluate the entire definite integral in terms of $u$ without ever substituting back.

Changing the limits

If $u=g(x)$, then when $x=a$, $u=g(a)$; when $x=b$, $u=g(b)$. The new limits are $g(a)$ and $g(b)$ — and crucially, they don't need to be reconverted, since the final numerical answer is the same regardless of which variable it was computed in.

Worked example 1

Substitution with a linear inner function
Find $\displaystyle\int (3x+1)^5\,dx$.
MethodLet u equal the inner function, rewrite dx, then integrate
1
Let $u=3x+1$.
This is the expression being raised to a power — the natural inner function.
2
$\dfrac{du}{dx}=3 \Rightarrow dx = \dfrac{du}{3}$.
Rearrange the derivative to express dx in terms of du.
3
$\displaystyle\int (3x+1)^5\,dx = \int u^5 \cdot \dfrac{du}{3} = \dfrac13\int u^5\,du$.
Substitute both the power and dx.
4
$=\dfrac13 \cdot \dfrac{u^6}{6}+c = \dfrac{u^6}{18}+c$.
Integrate using the power rule.
5
$=\dfrac{(3x+1)^6}{18}+c$.
Substitute back to x.
▪ solved
Quick check

Differentiating $\dfrac{(3x+1)^6}{18}$ using the chain rule gives $\dfrac{6(3x+1)^5 \cdot 3}{18} = (3x+1)^5$ — confirming the answer, and showing exactly why substitution reverses the chain rule.

Worked example 2

Definite integral with changed limits
Find $\displaystyle\int_0^2 x(x^2+1)^3\,dx$ using the substitution $u=x^2+1$.
MethodConvert the limits into u-values, then integrate entirely in u
1
$u=x^2+1 \Rightarrow \dfrac{du}{dx}=2x \Rightarrow x\,dx = \dfrac{du}{2}$.
The factor of x in the integrand matches (up to a constant) du/dx.
2
When $x=0$, $u=1$. When $x=2$, $u=5$.
Convert both limits from x-values to u-values.
3
$\displaystyle\int_0^2 x(x^2+1)^3\,dx = \int_1^5 u^3 \cdot \dfrac{du}{2} = \dfrac12\int_1^5 u^3\,du$.
Rewrite entirely in u, including the new limits.
4
$=\dfrac12\Big[\dfrac{u^4}{4}\Big]_1^5 = \dfrac12\Big(\dfrac{625}{4}-\dfrac14\Big) = \dfrac12 \cdot \dfrac{624}{4} = 78$.
Evaluate directly in u — no need to substitute back to x.
▪ solved

Worked example 3

A fraction with a matching numerator
Find $\displaystyle\int \dfrac{4x}{x^2+3}\,dx$.
MethodSubstitute for the denominator, converting the numerator and dx together
1
Let $u=x^2+3$.
The denominator is the natural choice of inner function.
2
$\dfrac{du}{dx}=2x \Rightarrow 4x\,dx = 2\,du$.
Rearrange, then scale by 2 to match the numerator's coefficient of x exactly.
3
$\displaystyle\int \dfrac{4x}{x^2+3}\,dx = \int \dfrac{2\,du}{u} = 2\int\dfrac1u\,du$.
Rewrite entirely in u — the 4x·dx pair becomes 2du directly.
4
$=2\ln|u|+c = 2\ln|x^2+3|+c$.
Integrate using the standard 1/u result, then substitute back to x.
5
Since $x^2+3>0$ for all real $x$, this simplifies to $2\ln(x^2+3)+c$.
The modulus can be dropped when the expression is always positive.
▪ solved

Worked example 4

Substitution with a trig integrand · Challenge
Find $\displaystyle\int \sin^3x\cos x\,dx$.
MethodLet u equal the "inner" repeated factor, sin x, then integrate a power of u
1
Let $u=\sin x$.
sin x appears raised to a power, with its derivative (cos x) also present.
2
$\dfrac{du}{dx}=\cos x \Rightarrow du = \cos x\,dx$.
The cos x factor in the integrand is exactly du.
3
$\displaystyle\int \sin^3x\cos x\,dx = \int u^3\,du$.
Rewrite entirely in u — the cos x · dx pair becomes du directly.
4
$=\dfrac{u^4}{4}+c$.
Integrate using the power rule.
5
$=\dfrac{\sin^4x}{4}+c$.
Substitute back to x.
▪ solved
Look deeper — spotting hidden substitutions

No algebraic composite function like $(3x+1)^5$ appears here — yet the same principle applies, since $\sin x$ (raised to a power) and its derivative $\cos x$ both sit inside the integrand. Substitution works whenever an integral contains a function and (a multiple of) its own derivative, whatever form that function takes.

Worked example 5

A trigonometric substitution, giving an inverse sine · Challenge
Find $\displaystyle\int \dfrac{1}{\sqrt{4-x^2}}\,dx$ using the substitution $x=2\sin\theta$.
MethodSubstitute x in terms of θ so the square root simplifies via an identity
1
Let $x=2\sin\theta$, so $\dfrac{dx}{d\theta}=2\cos\theta \Rightarrow dx = 2\cos\theta\,d\theta$.
This time it's x, not u, that's substituted — chosen to match the $\sqrt{4-x^2}$ shape.
2
$4-x^2 = 4-4\sin^2\theta = 4(1-\sin^2\theta) = 4\cos^2\theta$, so $\sqrt{4-x^2}=2\cos\theta$.
Apply $\sin^2\theta+\cos^2\theta=1$ to clear the square root entirely.
3
$\displaystyle\int \dfrac{1}{\sqrt{4-x^2}}\,dx = \int \dfrac{1}{2\cos\theta}\cdot2\cos\theta\,d\theta = \int 1\,d\theta$.
Both the $2\cos\theta$ terms cancel completely, leaving the simplest possible integral.
4
$=\theta+c$.
Integrate with respect to θ.
5
Since $x=2\sin\theta$, $\sin\theta=\dfrac{x}{2}$, so $\theta=\arcsin\!\Big(\dfrac{x}{2}\Big)$.
Rearrange the original substitution to convert θ back to x.
6
$\displaystyle\int \dfrac{1}{\sqrt{4-x^2}}\,dx = \arcsin\!\Big(\dfrac{x}{2}\Big)+c$.
State the final answer in terms of x.
▪ solved
Quick check

Differentiating $\arcsin\!\big(\frac{x}{2}\big)$ gives $\dfrac{1}{\sqrt{1-(x/2)^2}}\cdot\dfrac12 = \dfrac{1}{2\sqrt{1-x^2/4}} = \dfrac{1}{\sqrt{4-x^2}}$ — confirming the answer.

Recognising when a trig substitution is needed

An integrand containing $\sqrt{a^2-x^2}$ → substitute $x=a\sin\theta$, giving $\displaystyle\int\frac{dx}{\sqrt{a^2-x^2}}=\arcsin\!\Big(\frac{x}{a}\Big)+c$.

An integrand containing $a^2+x^2$ → substitute $x=a\tan\theta$, giving $\displaystyle\int\frac{dx}{a^2+x^2}=\frac1a\arctan\!\Big(\frac{x}{a}\Big)+c$.

Common mistake

Forgetting to convert $dx$ into an expression involving $du$, and instead substituting only the "obvious" part of the integrand. Every $x$ — including the one hidden inside $dx$ — must be rewritten in terms of $u$ before integrating; skipping this step leaves a mixed-variable expression that cannot be integrated correctly.

Check yourself

Find $\displaystyle\int_0^1 \dfrac{6x^2}{x^3+1}\,dx$.
(Hint: substitute u = x³ + 1 and change the limits.)

Method
1
Let $u=x^3+1$, so $\dfrac{du}{dx}=3x^2 \Rightarrow 6x^2\,dx = 2\,du$.
Set up the substitution.
2
When $x=0$, $u=1$; when $x=1$, $u=2$.
Convert the limits.
3
$\displaystyle\int_0^1\dfrac{6x^2}{x^3+1}\,dx = \int_1^2 \dfrac{2}{u}\,du = 2\big[\ln|u|\big]_1^2 = 2(\ln2-\ln1) = 2\ln2$.
Integrate and evaluate; ln 1 = 0.
▪ solved