Integration by substitution

Integration by substitution, or uu-substitution, is the integral version of the chain rule.

Last edited: 2026-07-16. Improved notation to be free of isolated  dx\d x or  du\d u

Contents

Use

Let F(x)F(x) and G(x)G(x) be antiderivatives of f(x)f(x) and g(x)g(x), respectively.

 ∫f(G(x))⋅g(x) dx= ∫f(u) du= F(G(x))+C\begin{align*} &\,\int f(G(x)) \cdot g(x)\d x \\ =&\, \int f(u)\d u \\ =&\, F(G(x)) + C \end{align*}

where

u=G(x), du dx=g(x)u = G(x), \frac{\d u}{\d x} = g(x)

The definite integral version is

 ∫x1x2f(G(x))⋅g(x) dx= ∫G(x1)G(x2)f(u) du= F(G(x2))−F(G(x1))\begin{align*} &\,\int_{x_1}^{x_2} f(G(x)) \cdot g(x)\d x \\ =&\, \int_{G(x_1)}^{G(x_2)} f(u)\d u \\ =&\, F(G(x_2)) - F(G(x_1)) \end{align*}

Note: IB does not accept  du=g(x) dx\d u = g(x) \d x.

For indefinite integrals, your answer must be in terms of the original variable (typically xx).

For definite integrals, change the limits of integration accordingly.

G(x)=uG(x) = u, but we cannot use the same variable both in the integrand and in the limits of integration.

Substitutions for integrals not in the form ∫k⋅f(G(x))⋅g(x) dx\int k\cdot f(G(x)) \cdot g(x)\d x are given in the question.

Integrals of the form

∫f(ax+b) dx\int f(ax + b)\d x

can directly apply the property mentioned in indefinite integrals#Properties.

derived formulas

These are derived using substitution. For definite integrals, the limits of integration remain same as the original integral.

∫f(ax+b) dx=1aF(ax+b)+C\int f(ax+b)\d x = \frac 1a F(ax+b) + C
∫1x2+a2 dx=1aarctan⁡xa+C\int \frac{1}{x^2 + a^2}\d x = \frac 1a \arctan \frac xa + C
∫1a2−x2 dx=arcsin⁡xa+C, ∣x∣<a\int \frac{1}{\sqrt{a^2 - x^2}}\d x = \arcsin \frac xa + C,\, \lvert x\rvert < a
∫f′(x)ef(x) dx=ef(x)+C\int f^\prime(x) \e^{f(x)}\d x = \e^{f(x)} + C

The following can be proved using substitution, but it is not assessed.

∫abf(x) dx=∫abf(a+b−x) dx\int_a^b f(x)\d x = \int_a^b f(a + b - x)\d x

Examples

Example: Simplify

∫sin⁡2x1+3cos⁡2x dx\int \frac{\sin 2x}{\sqrt{1 + 3\cos^2 x}}\d x

From double angle identity for sine sin⁡2x=2sin⁡xcos⁡x\sin 2x = 2 \sin x \cos x.

I=∫sin⁡2x1+3cos⁡2x dx=∫2sin⁡xcos⁡x1+3cos⁡2x dx\begin{align*} I &= \int \frac{\sin 2x}{\sqrt{1 + 3\cos^2 x}}\d x \\ &= \int \frac{2 \sin x \cos x}{\sqrt{1 + 3\cos^2 x}}\d x \end{align*}

Also

Let u=1+3cos⁡2x, du dx=−6sin⁡xcos⁡xu = 1 + 3\cos^2 x, \frac{\d u}{\d x} = -6\sin x\cos x

We want to make a −6sin⁡xcos⁡x-6 \sin x\cos x appear, so multiply integrand by −3-3 but also divide the integral by −3-3.

I=−13∫−6sin⁡xcos⁡x1+3cos⁡2x dx=−13∫ duu12=−13∫u−12 du=−13⋅2u12+C=−231+3cos⁡2x+C■\begin{align*} I &= -\frac13 \int \frac{-6 \sin x \cos x}{\sqrt{1 + 3\cos^2 x}}\d x \\ &= -\frac13 \int \frac{\d u}{u^{\frac12}} \\ &= -\frac13 \int {u^{-\frac12}} \d u \\ &= -\frac13 \cdot 2u^{\frac12} + C \\ &= -\frac23 \sqrt{1 + 3\cos^2x} + C \qed \end{align*}

Example: Evaluate

∫e2e8 dxxln⁡x\int_{\e^2}^{\e^8} \frac{\d x}{x\ln x}

Let u=ln⁡x, du dx=1xu = \ln x, \frac{\d u}{\d x} = \frac 1x

For definite integrals, we also have to change the limits of integration from x1,x2x_1, x_2 to u1,u2u_1, u_2.

u1=ln⁡(e2)=2,u2=ln⁡(e8)=8u_1 = \ln (\e^2) = 2, u_2 = \ln (\e^8) = 8
I=∫e2e8 dxxln⁡x=∫281u du=ln⁡∣u∣∣28=ln⁡8−ln⁡2=ln⁡(82)=ln⁡4■\begin{align*}I &= \int_{\e^2}^{\e^8} \frac{\d x}{x\ln x} \\ &= \int_{2}^{8} \frac{1}{u}\d u \\ &= \ln \lvert u\rvert\Big\vert_{2}^{8} \\ &= \ln 8 - \ln 2 \\ &= \ln \left(\frac82\right) \\ &= \ln 4 \qed \end{align*}

HL Examples

HL involves integration by substitution not in the form of ∫k⋅f(G(x))⋅g(x) dx{\int k\cdot f(G(x)) \cdot g(x)\d x}. IB will provide the substitutions.

Example: By using the substitution x=3sin⁡θx = 3 \sin \theta, simplify

∫9−x2x2 dx\int \frac{\sqrt{9-x^2}}{x^2} \d x

 dx dθ=3cos⁡θ\frac{\d x}{\d \theta} = 3\cos \theta

The numerator becomes 9−(3sin⁡θ)2=9−9sin⁡2θ=9cos⁡2θ=3cos⁡θ\sqrt{9-(3\sin\theta)^2} = \sqrt{9-9\sin^2\theta} = \sqrt{9\cos^2\theta} = 3\cos\theta, using the Pythagorean identity.

The denominator becomes (3sin⁡θ)2=9sin⁡2θ(3\sin\theta)^2 = 9\sin^2\theta.

I=∫3cos⁡θ9sin⁡2θ(3cos⁡θ dθ)I=∫cos⁡2θsin⁡2θ dθI=∫cot⁡2θ dθ\begin{align*} I &= \int \frac{3\cos\theta}{9\sin^2\theta} \left(3\cos \theta \d \theta\right) \\ I &= \int \frac{\cos^2\theta}{\sin^2\theta} \d\theta \\ I &= \int \cot^2\theta\d\theta \end{align*}

Checking our HL derivative tables, there is no function listed with a derivative of cot⁡2x\cot^2x, but we do have

 d dxcot⁡x=−cosec⁡2x\frac\d{\d x} \cot x = -\cosec^2 x

and a variant of Pythagorean identity

1+cot⁡2θ=cosec⁡2θ1 + \cot^2 \theta = \cosec^2 \theta
I=∫cot⁡2θ dθ=∫cosec⁡2θ−1 dθ=−cot⁡θ−θ\begin{align*} I &= \int \cot^2\theta\d\theta \\ &= \int \cosec^2\theta - 1 \d\theta \\ &= -\cot \theta - \theta \\ \end{align*}

We need the indefinite integral in terms of original variable xx. Using sin⁡θ=x3\sin\theta = \frac{x}{3}, it corresponds to a triangle with opposite xx and hypotenuse 33. The adjacent is 9−x2≥0\sqrt{9 - x^2}\geq 0. A non-negative adjacent side means sin⁡\sin and cot⁡\cot have the same sign.

cot⁡θ=adjacentopposite=9−x2x\cot \theta = \frac{\text{adjacent}}{\text{opposite}} = \frac{\sqrt{9 - x^2}}{x}

It can be confirmed that indeed sin⁡\sin and cot⁡\cot have the same sign (as xx).

The original integral evaluates to

I=−9−x2x−arcsin⁡x3+C■I = -\frac{\sqrt{9 - x^2}}{x} - \arcsin{\frac x3} + C\qed

which conveniently involve range of arcsin⁡\arcsin corresponding to angles with non-negative adjacent side on the unit circle, ie xx-axis. This makes x=3sin⁡θx = 3\sin\theta a better choice than x=3cos⁡θx = 3\cos\theta. The former is more apt to deal with both positive and negative values of xx.

Example: By using the substitution u=sin⁡2x−3u = \sin^2 x - 3, evaluate

∫0π2−4sin⁡xcos⁡xsin⁡4x−6sin⁡2x+25 dx\int_0^\frac{\pi}{2} \frac{-4\sin x\cos x}{\sin^4x - 6\sin^2 x + 25}\d x

We have  du dx=2sin⁡xcos⁡x\frac{\d u}{\d x} = {2\sin x\cos x}, with limits of integration

u1=sin⁡2(0)−3=−3u_1 = {\sin^2 (0) - 3} = -3
u2=sin⁡2(π2)−3=−2u_2 = {\sin^2 \left(\frac{\pi}{2}\right) - 3} = -2

Rewrite the denominator as (sin⁡2x−3)2+(4)2(\sin^2 x - 3)^2 +(4)^2, by completing the square, then apply

∫1x2+a2 dx=1aarctan⁡xa+C\int \frac{1}{x^2 + a^2}\d x = \frac 1a \arctan \frac xa + C
 ∫0π2−4sin⁡xcos⁡xsin⁡2x−6sin⁡x+25 dx= ∫0π2−2(2sin⁡xcos⁡x)(sin⁡2x−3)2+(4)2 dx= ∫−3−2−2 duu2+42= 14arctan⁡u4∣−3−2⋅(−2)= (arctan⁡(−24)−arctan⁡(−34))⋅−12= (−arctan⁡(12)+arctan⁡(34))⋅−12= 12arctan⁡(12)−12arctan⁡(34)■\begin{align*}&\,\int_0^\frac{\pi}{2} \frac{-4\sin x\cos x}{\sin^2x - 6\sin x + 25}\d x \\ =&\, \int_0^\frac{\pi}{2} \frac{-2(2\sin x\cos x)}{(\sin^2 x - 3)^2 + (4)^2}\d x \\ =&\, \int_{-3}^{-2} \frac{-2\d u}{u^2 + 4^2} \\ =&\, \frac 14\arctan \frac u4 \Big\vert_{-3}^{-2} \cdot (-2) \\ =&\, \left(\arctan \left(-\frac{2}{4}\right) - \arctan \left(-\frac{3}{4}\right)\right) \cdot \frac{-1}{2} \\ =&\, \left(-\arctan \left(\frac{1}{2}\right) + \arctan \left(\frac{3}{4}\right)\right) \cdot \frac{-1}{2} \\ =&\, \frac 12 \arctan \left(\frac{1}{2}\right) - \frac12\arctan \left(\frac{3}{4}\right) \qed \end{align*}

Tip: arctan⁡\arctan is odd, such that arctan⁡(−x)=−arctan⁡(x)\arctan (-x) = -\arctan (x)