Integration by Substitution

This post is part of a series.

Complicated integrals can sometimes be made simpler through the method of substitution. Substitution involves condensing an expression of $x$ into a single variable, say $u$, and then expressing the integral in terms of $u$ instead of $x$.


To make the idea of substitution more concrete, consider the integral $\int (3x+1)^8 \, dx$. We may be tempted to use the power rule, and say that the integral evaluates to $\frac{1}{9}(3x+1)^9$. But if we differentiate to check our result, we see that, because of the chain rule, the derivative of this expression is not equal to the function inside the integral.

$\begin{align*} \left[ \frac{1}{9}(3x+1)^9 \right]' &= \frac{1}{9} \left[ (3x+1)^9 \right]' \\ &= \frac{1}{9} \cdot 9(3x+1)^8 ( 3x+1 )' \\ &= (3x+1)^8 ( 3) \\ &= 3(3x+1)^8 \\ &\neq (3x+1)^8 \end{align*}$

To turn the integral into one that can be solved with the power rule, we condense the $3x+1$ expression into a single variable $u$, through the substitution $u=3x+1$.

$\begin{align*} \int (3x+1)^8 \, dx &= \int u^8 \, dx \end{align*}$

Before we apply the power rule, we need to take care of one issue: the differential is still $dx$, and we need it to be $du$. In general, we can’t just replace the $dx$ differential with a $du$ differential. However, by interpreting the derivative as a fraction, we can solve for the $dx$ differential in terms of the $du$ differential.

$\begin{align*} \frac{du}{dx} &= (3x+1)' \\ \frac{du}{dx} &= 3 \\ du &= 3dx \\ \frac{1}{3}du &= dx \\ dx &= \frac{1}{3} du \end{align*}$

Once our integral is fully expressed in terms of $u$, we can solve it via the power rule, and then substitute $u=3x+1$ again to write our answer in terms of $x$.

$\begin{align*} \int u^8 \, dx &= \int u^8 \cdot \frac{1}{3}\, du \\ &= \frac{1}{3} \int u^8 \, du \\ &= \frac{1}{3} \cdot \frac{1}{9}u^9 + C \\ &= \frac{1}{27}u^9 + C \\ &= \frac{1}{27}(3x+1)^9 + C \end{align*}$

We verify that the derivative of the result is indeed the original function within the integral.

$\begin{align*} \left[ \frac{1}{27}(3x+1)^9 \right]' &= \frac{1}{27} \left[ (3x+1)^9 \right]' \\ &= \frac{1}{27} \cdot 9(3x+1)^8 ( 3x+1 )' \\ &= \frac{1}{3} (3x+1)^8 ( 3) \\ &= (3x+1)^8 \end{align*}$

Choosing the Right Substitution

The key to substitution is choosing the right substitution. But how can we tell what is the right substitution? For example, in the integral below, should we substitute $u=\sin x$ or $u=\cos x$?

$\begin{align*} \int \sin^2x \cos x \, dx \end{align*}$

Whenever we are torn between multiple substitution choices, we should choose the substitution whose derivative will cancel out other terms in the integral.

In this case, we should choose $u=\sin x$, because the derivative $u’=\cos x$ will cancel out the existing $\cos x$ inside the integral. On the other hand, would not work, because the derivative $u’=-\sin x$ would not fully cancel the existing $\sin^2 x$ inside the integral.

Choosing $u=\sin x$, we have $\frac{du}{dx} = \cos x$, so $dx = \frac{1}{\cos x} du$. Substituting into the integral, we are able to evaluate.

$\begin{align*} \int \sin^2 x \cos x \, dx &= \int u^2 \cos x \cdot \frac{1}{\cos x} du \\ &= \int u^2 du \\ &= \frac{1}{3}u^3 + C \\ &= \frac{1}{3} \sin^3 x + C \end{align*}$


Evaluate each integral using substitution. (You can view the solution by clicking on the problem.)

$\begin{align*} 1) \hspace{.5cm} \int \sqrt{x+2} \, dx \end{align*}$
$\begin{align*} \frac{2}{3} (x+2)^\frac{3}{2} + C \end{align*}$

$\begin{align*} 2) \hspace{.5cm} \int (4x+3)^8 \, dx \end{align*}$
$\begin{align*} \frac{1}{36} (4x+3)^9 + C \end{align*}$

$\begin{align*} 3) \hspace{.5cm} \int \frac{x}{\sqrt{1-x^2}} \, dx \end{align*}$
$\begin{align*} -\sqrt{1-x^2} + C \end{align*}$

$\begin{align*} 4) \hspace{.5cm} \int \frac{3x^2}{(x^3-5)^3} \, dx \end{align*}$
$\begin{align*} -\frac{1}{2(x^3-5)^2} + C \end{align*}$

$\begin{align*} 5) \hspace{.5cm} \int \sec^2 x \tan^2 x \, dx \end{align*}$
$\begin{align*} \frac{1}{3} \tan^3 x + C \end{align*}$

$\begin{align*} 6) \hspace{.5cm} \int \frac{\cos x}{\sqrt{\sin x}} \, dx \end{align*}$
$\begin{align*} 2\sqrt{\sin x} + C \end{align*}$

$\begin{align*} 7) \hspace{.5cm} \int \frac{\sec^2 x \tan x}{(\sec^2 x + 1)^4} \, dx \end{align*}$
$\begin{align*} -\frac{1}{6(\sec^2 x + 1)^3} + C \end{align*}$

$\begin{align*} 8) \hspace{.5cm} \int \cos (\cos x) \sin x \, dx \end{align*}$
$\begin{align*} -\sin (\cos x) + C \end{align*}$

$\begin{align*} 9) \hspace{.5cm} \int x^2 e^{x^3+1} \, dx \end{align*}$
$\begin{align*} \frac{1}{3} e^{x^3+1} + C \end{align*}$

$\begin{align*} 10) \hspace{.5cm} \int \frac{\csc^2 x}{e^{\cot x}} \, dx \end{align*}$
$\begin{align*} e^{-\cot x} + C \end{align*}$

$\begin{align*} 11) \hspace{.5cm} \int \frac{x^2 e^{\sqrt{x^3-1}} }{\sqrt{x^3-1} } \, dx \end{align*}$
$\begin{align*} \frac{2}{3} e^{\sqrt{x^3-1} }+C \end{align*}$

$\begin{align*} 12) \hspace{.5cm} \int e^{x+e^x}\, dx \end{align*}$
$\begin{align*} e^{e^x} + C \end{align*}$

$\begin{align*} 13) \hspace{.5cm} \int \frac{e^x}{1+e^{2x}} \, dx \end{align*}$
$\begin{align*} \arctan (e^x) + C \end{align*}$

$\begin{align*} 14) \hspace{.5cm} \int \frac{1}{x \sqrt{1-(\ln x)^2} } \, dx \end{align*}$
$\begin{align*} \arcsin (\ln x) + C \end{align*}$

$\begin{align*} 15) \hspace{.5cm} \int \frac{1}{\sqrt{x-x^2}}\, dx \end{align*}$
$\begin{align*} 2\arcsin \sqrt{x} + C \end{align*}$

$\begin{align*} 16) \hspace{.5cm} \int \frac{x}{x^4+1} \, dx \end{align*}$
$\begin{align*} \frac{1}{2} \arctan x^2 + C \end{align*}$

This post is part of a series.