Suppose we want to evaluate an integral of the form $\int f(g(x))g'(x)dx\tag{a}$ To this end, let $$g(x)=u.$$ Finding the differential of both sides, we have

$g'(x)dx=du.\tag{b}$ If we substitute (b) into (a), we will have $\bbox[#F2F2F2,5px,border:2px solid black]{\int f(\underbrace{g(x)}_{u})\underbrace{g'(x)dx}_{du}=\int f(u)du.\tag{c}}$ This equation supplies us with a method for determining integrals in a large number of cases in which the form of the integral is not obvious.

Theorem 1. (The Substitution Rule): Suppose $$g(x)$$ is a differentiable function the range of which is an interval $$I$$, and $$f$$ is a function defined on $$I$$. Also suppose $$F(x)=\int f(x)dx$$ for $$x\in I$$. Then if $$u=g(x),$$ we have $\int f(g(x))g'(x)dx=\int f(u)du=F(u)+C=F(g(x))+C.$

#### Show the proof …

Because $$F’=f$$ it follows from the chain rule that \begin{aligned} \frac{d}{dx}F(g(x)) & =F'(g(x))g'(x)\\ & =f(g(x))g'(x).\end{aligned} It follows from the definition of antiderivative (or integral) that \begin{align*} \int f(g(x))g'(x)dx & =F(g(x))+C\\ & =F(u)+C\tag{{u=g(x)}}\\ & =\int F'(u)du\\ & =\int f(u)du. \end{align*}

• Because traditionally the letter $$u$$ is used in the Substitution Rule, it is sometimes called $$u$$-substituiton, but instead of $$u$$, we can use any letter such as $$t,w,\theta,$$ etc.
Example 1

Evaluate $${\displaystyle \int(x^{2}+3)^{17}x\ dx}$$.

Solution 1

Let $$u=x^{2}+3$$, thus $$du=2xdx,$$ or $$\frac{1}{2}du=xdx$$. Now we can rewrite the integral as \begin{aligned} {\displaystyle \int\underbrace{(x^{2}+3)^{17}}_{u^{17}}\underbrace{xdx}_{\frac{1}{2}du}} & =\int\frac{1}{2}u^{17}du\\ & =\frac{1}{2}\frac{u^{18}}{18}+C\\ & =\frac{1}{36}(x^{2}+3)^{18}+C.\end{aligned}

Example 2

Evaluate $${\displaystyle \int x^{2}\sqrt{x^{3}+1}\ dx}$$.

Solution 2

Let $$u=x^{3}+1$$. Then $$du=3x^{2}\ dx$$ or $$x^{2}dx=\frac{1}{3}du$$, and \begin{align*} \int x^{2}\sqrt{x^{3}+1}\ dx & =\int\sqrt{\underbrace{x^{3}+1}_{=u}}\ \overbrace{x^{2}dx}^{\frac{1}{3}du}\\ & =\int\frac{1}{3}\sqrt{u}\ du\\ & =\frac{1}{3}\int u^{1/2}du\tag{{u^{1/2}=\sqrt{u}}}\\ & =\frac{1}{3}\left(\frac{2}{3}u^{3/2}\right)+C\tag{{\int u^{\alpha}du=\frac{1}{\alpha+1}u^{\alpha+1}+C}}\\ & =\frac{2}{9}(x^{3}+1)^{3/2}+C.\tag{{u=x^{3}+1}} \end{align*}

Formula (c) may be stated as an algorithm as follows

1. Choose $$u$$, say put $$g(x)=u$$.
2. Compute $$du=g'(x)dx$$.
3. Substitute $$u$$ and $$du$$ in the integral. At this step, everything should be expressed in terms of $$u$$ and no $$x$$ should be present in the integral. If it is not possible, make another choice for $$u$$.
4. Evaluate the resulting integral.
5. Replace $$u$$ by $$g(x)$$ and express the final result in terms of $$x$$.
Example 3

Evaluate $\int\sin ax\ dx,\quad\text{and}\quad\int\cos ax\ dx.$

Solution 3

Let $$u=ax$$. Then $$du=a\ dx$$ and \begin{aligned} \int\sin ax\ dx & =\frac{1}{a}\int\sin u\ du\\ & =-\frac{1}{a}\cos u+C\\ & =-\frac{1}{a}\cos ax+C.\end{aligned} Similarly $\int\cos ax\ dx=\frac{1}{a}\sin ax+C.$

A simple substitution is so useful that is worth noting explicitly.

Theorem 2.  If $$\int f(u)du=F(u)+C$$, then $\int f(ax+b)\,dx=\frac{1}{a}F(ax+b)+C,$where $$a$$ and $$b$$ are two constants.

#### Show the proof …

Let $$u=ax+b$$. Then $$du=a\ dx$$ or $$dx=\frac{1}{a}du$$ and \begin{align*} \int f(ax+b)dx & =\int\frac{1}{a}f(u)\ du\\ & =\frac{1}{a}F(u)+C\\ & =\frac{1}{a}F(ax+b)+C\tag{{u=ax+b}} \end{align*}

Example 4

Evaluate (a)$${\displaystyle \int\sec^{2}(x-1)dx}$$ (b) $${\displaystyle \int\sin(2x-\pi/4)}dx$$.

Solution 4

(a) Because $$\int\sec^{2}x\ dx=\tan x+C$$, it follows from the above theorem that $\int\sec^{2}(x-1)\ dx=\tan(x-1)+C.$ (b) Since $$\int\sin x\ dx=-\cos x+C$$, the above theorem gives $\int\sin(2x-\pi/4)\ dx=-\frac{1}{2}\cos(2x-\pi/4)+C$

Example 5

Evaluate$${\displaystyle \int\cos^{2}x\ \sin x\ dx}$$.

Solution 5

Let $$u=\cos x$$. Then $du=-\sin xdx$ and \begin{aligned} \int\cos^{2}x\sin xdx & =-\int u^{2}du\\ & =-\frac{u^{3}}{3}+C\\ & =-\frac{1}{3}\cos^{3}x+C.\end{aligned}

Example 6

Evaluate $\int\tan x\ dx.$

Solution 6

Recall that $$\tan x=\sin x/\cos x$$. Let $$u=\cos x$$. Then $du=-\sin x\ dx$ and \begin{aligned} \int\tan x\ dx & =\int\frac{\sin x}{\cos x}dx\\ & =\int\frac{-du}{u}\\ & =-\ln|u|+C\\ & =-\ln|\cos x|+C.\end{aligned} Recall that $$\ln x^{\alpha}=\alpha\ln x$$. So \begin{aligned} -\ln|\cos x|+C & =\ln\left(|\cos x|^{-1}\right)+C\\ & =\ln|\sec x|+C.\end{aligned} Therefore, the result can also be written as $\int\tan x\ dx=\ln|\sec x|+C.$

$\bbox[#F2F2F2,5px,border:2px solid black]{\int\tan x\ dx=\ln|\sec x|+C\quad\text{or}\quad-\ln|\cos x|+C}$

Example 7

Evaluate $\int\sec x \tan x\,dx.$

Solution 7

Previously, we had provided this integral: $\int \sec x\tan x\, dx=\sec x+C$. We can verify this formula by differentiating the answer. Without guessing the answer, we can integrate it by substitution:

Recall that $\sec x=1/\cos x$ and $\tan x=\sin x/\cos x$. Therefore,

\begin{align}
\int \sec x\tan x\, dx&=\int \frac{1}{\cos x}\frac{\sin x}{\cos x}\,dx\\
&=\int\frac{\sin x}{\cos^2 x}dx\\
&=\int \frac{-du}{u^2}\quad &&{\small (u=\cos x,\ du=-\sin x\,dx)}\\
&=-(-1)u^{-1}+C=\frac{1}{u}+C\\
&=\sec x+C.
\end{align}

Example 8

Evaluate $\int \csc x \cot x\,dx.$

Solution 8

Previously, we had provided this integral: $\int \csc x\cot x\, dx=-\csc x+C$. We can verify this formula by differentiating the answer. Instead of guessing the answer, because $\csc x=1/\sin x$ and $\cot x=\cos x/\sin x$, we can evaluate this integral by making the substitution $u=\sin x$:

\begin{align}
\int \csc x\cot x\, dx&=\int \frac{1}{\sin x}\frac{\cos x}{\sin x}\,dx\\
&=\int\frac{\cos x}{\sin^2 x}dx\\
&=\int \frac{-du}{u^2}\quad &&{\small (u=\sin x,\ du=\cos x\,dx)}\\
&=-u^{-1}+C=-\frac{1}{u}+C\\
&=-\csc x+C.
\end{align}

Example 9

Evaluate $\int\frac{1}{a^{2}+x^{2}}dx.$

Solution 9

$\int\frac{1}{a^{2}+x^{2}}dx=\frac{1}{a^{2}}\int\frac{1}{1+\left(\frac{x}{a}\right)^{2}}dx.$ Let $$u=x/a$$. Then $dx=a\ du$ and \begin{aligned} \frac{1}{a^{2}}\int\frac{1}{1+(x/a)^{2}}dx & =\frac{1}{a^{2}}\int\frac{1}{1+u^{2}}a\ du\\ & =\frac{1}{a}\arctan u+C\\ & =\frac{1}{a}\arctan\frac{x}{a}+C.\end{aligned} To evaluate $$\int\frac{1}{1+(x/a)^{2}}dx$$, we could simply use Theorem above.

Example 10

Evaluate $\displaystyle{\int\frac{x}{x^4+1}dx}$.

Solution 10
Let $u=x^2$. Then $du=2x\,dx$ and
\begin{align}
\int\frac{x}{x^4+1}dx&=\int \frac{1}{u^2+1}\overbrace{\frac{du}{2}}^{xdx}\\
&=\frac{1}{2}\arctan u+C\\
&=\frac{1}{2}\arctan x^2+C.\tag{$u=x^2$}
\end{align}
Example 11

Evaluate $\int\frac{1}{x^{2}+2x+5}dx.$ [Hint: Complete the square in the denominator]

Solution 11

By completing the square in the denominator, we have \begin{aligned} \int\frac{1}{x^{2}+2x+5}dx & =\int\frac{dx}{(x^{2}+2x+1)+4}\\ & =\int\frac{dx}{(x+2)^{2}+2^{2}}.\end{aligned} Now let $$u=x+2$$. Then $$du=dx$$ and \begin{align*} \int\frac{dx}{(x+2)^{2}+1} & =\int\frac{du}{u^{2}+4}\\ & =\frac{1}{2}\arctan\frac{u}{2}+C\tag{from previous example}\\ & =\frac{1}{2}\arctan\frac{x+2}{2}+C. \end{align*}

Example 12

Evaluate $${\displaystyle \int a^{x}dx}$$.

Solution 12

Let $$a^{x}=e^{u}$$. Taking the natural logarithm of each side, we get \begin{aligned} \ln(a^{x}) & =\ln e^{u}\\ x\ln a & =u.\end{aligned} Thus $x\ln a=u\Rightarrow\ln a\,dx=du.$ Now we can write \begin{aligned} \int a^{x}dx & =\int e^{u}\frac{du}{\ln a}\\ & =\frac{1}{\ln a}e^{u}+C\\ & =\frac{1}{\ln a}a^{x}+C.\end{aligned}

Example 13

Evaluate $\int e^{ax}dx.$

Solution 13

We can directly use Theorem above or use the substitution $$u=ax$$. The substitution leads to $du=a\ dx$ and \begin{aligned} \int e^{ax}dx & =\int e^{u}\frac{du}{a}\\ & =\frac{1}{a}\int e^{u}du\\ & =\frac{1}{a}e^{u}+C\\ & =\frac{1}{a}e^{ax}+C.\end{aligned}

Example 14

Evaluate $\int\frac{e^{x}}{1+e^{2x}}dx.$

Solution 14

Note that the substitution $$u=1+e^{2x}$$ does not work because $$du=2e^{2x}dx(\neq e^{x}dx)$$ does not appear in the numerator. But if we notice that $$1+e^{2x}=1+(e^{x})^{2}$$, we can make the subtitution $$u=e^{x}$$ to make the denominator of the form $$1+u^{2}$$. Then $u=e^{x}\Rightarrow du=e^{x}\ dx$ and \begin{align*} \int\frac{e^{x}}{1+e^{2x}}dx & =\int\frac{du}{1+u^{2}}\\ & =\arctan u+C\\ & =\arctan e^{x}+C.\tag{{u=e^{x}}} \end{align*}

Example 15

Evaluate $${\displaystyle \int\sinh x\ dx}$$ and $${\displaystyle \int\cosh x\ dx}$$.

Solution 15

Because $$(\cosh x)’=\sinh x$$, we know that $\int\sinh x\ dx=\cosh x+C.$ Also we can use the definition of $$\sinh x$$ for evaluation of the integral: $\sinh x=\frac{e^{x}-e^{-x}}{2}$ [Recall that $$\sinh x$$ (similar to $$\sin x$$) is an odd function, so it is half of $$e^x{\color{red}-}e^{-x}$$ and $$\cosh x$$ (similar to $$\cos x$$) is an even function, so it is half of $$e^x{\color{red}+}e^{-x}$$.] \begin{aligned} \int\sinh x\ dx & =\frac{1}{2}\int(e^{x}-e^{-x})\ dx\\ & =\frac{1}{2}\left[e^{x}-(-e^{-x})\right]+C\\ & =\cosh x+C\end{aligned} Similarly we can show $\int\cosh x\ dx=\sinh x+C.$

$\bbox[#F2F2F2,5px,border:2px solid black]{\begin{array}{c} {\displaystyle \int\sinh x\ dx=\cosh x+C}\\ {\displaystyle \int\cosh x\ dx=\sinh x+C} \end{array}}$

Example 16

Evaluate $${\displaystyle \int\tanh x\ dx}$$.

Solution 16

$\int\tanh x\ dx=\int\frac{\sinh x}{\cosh x}dx.$ Let $$u=\cosh x$$. Then $$du=\sinh x\ dx$$ and \begin{aligned} \int\frac{\sinh x}{\cosh x}dx & =\int\frac{du}{u}\\ & =\ln|u|+C\\ & =\ln|\cosh x|+C.\end{aligned} Because $$\cosh x=(e^{x}+e^{-x})/2>0$$, so $$|\cosh x|=\cosh x$$ and $\int\tanh x\ dx=\ln(\cosh x)+C.$

Example 17

Evaluate $\int\frac{\sqrt[x]{7}}{x^{2}}dx.$

Solution 17

Note that $$\sqrt[x]{7}=7^{1/x}.$$ If we let $$\frac{1}{x}=u$$, because $\frac{1}{x}=u\Rightarrow-\frac{1}{x^{2}}dx=du,$ we have $\int\frac{\sqrt[x]{7}}{x^{2}}dx=-\int7^{u}du=-\frac{1}{\ln7}7^{u}+C=-\frac{1}{\ln7}\sqrt[x]{7}+C.$

Example 18

Evaluate $\int\frac{dx}{x\ln x}.$

Solution 18

Let $$u=\ln x$$, then $du=\frac{1}{x}dx$ and \begin{align*} \int\underbrace{\frac{1}{\ln x}}_{u}\underbrace{\frac{1}{x}dx}_{du} & =\int\frac{du}{u}\\ & =\ln|u|+C\\ & =\ln|\ln x|+C\tag{{u=\ln x}} \end{align*}

Example 19

Evaluate $\int\frac{\sin(\ln x)}{x}dx.$

Solution 19

Let $$u=\ln x$$, then $du=\frac{1}{x}dx.$ So \begin{aligned} \int\frac{\sin(\ln x)}{x}dx & =\int\sin u\ du\\ & =-\cos u+C\\ & =-\cos(\ln x)+C.\end{aligned}

Example 20

Evaluate $\int\frac{x}{1+x^{4}}\arctan x^{\text{2}}\ dx.$

Solution 20

Let $$u=\arctan x^{2}$$, then \begin{aligned} du & =2x\frac{1}{1+(x^{2})^{2}}dx\\ & =\frac{2x}{1+x^{4}}dx.\end{aligned} Therefore \begin{aligned} \int\frac{x}{1+x^{4}}\arctan x^{2}\ dx & =\int\frac{1}{2}\underbrace{\arctan x^{2}}_{u}\underbrace{\frac{2x}{1+x^{4}}dx}_{du}\\ & =\frac{1}{4}u^{2}+C\\ & =\frac{1}{4}\arctan^{2}x^{2}+C.\end{aligned}