Module 3: Integration By Substitution

The chain rule says that

LaTeX: \frac{dF(G(x))}{dx}=F'(G(x))\cdot G'(x),dF(G(x))dx=F(G(x))G(x),

so that

LaTeX: \int F'(G(x))\cdot G'(x) dx= F(G(x))+C.F(G(x))G(x)dx=F(G(x))+C.

We are going to rewrite this with notation you may be more familiar with.
Let's set LaTeX: u=G(x)u=G(x), and agree to write

LaTeX: du=G'(x)dxdu=G(x)dx

LaTeX: \int F'(G(x))G'(x) \; dx=\int F'(u)du=F(u)+C=F(G(x))+CF(G(x))G(x)dx=F(u)du=F(u)+C=F(G(x))+C

2.1 A Few Examples

1. Compute LaTeX: \int (1-3x)^{47}dx(13x)47dx This integral currently does not have the form of any of the basic integrals that we mentioned in the introduction section.

If we replace LaTeX: 1-3x13x by LaTeX: uu, we have:

LaTeX: u=1-3x \Rightarrow du=(-3)dx \Rightarrow dx=\frac{du}{-3} u=13xdu=(3)dxdx=du3

LaTeX:  \int (1-3x)^{47}dx=\int u^{47}\frac{du}{-3}=\frac{-1}{3}\int u^{47}du(13x)47dx=u47du3=13u47du

LaTeX: \int u^{47}duu47du is in the form we know how to compute.

LaTeX: \int (1-3x)^{47}dx=\frac{-1}{3}\int u^{47}du=\frac{-1}{3}\cdot\frac{1}{48}u^{48}+C=\frac{-1}{3}\cdot\frac{1}{48}(1-3x)^{48}+C\\(\int (1-3x)^{47}dx=\frac{-1}{3}\int u^{47}du=\frac{-1}{3}\cdot\frac{1}{48}u^{48}+C=\frac{-1}{3}\cdot\frac{1}{48}(1-3x)^{48}+C\\)

2. Compute LaTeX: \int \frac{\ln x}{x} \; dxlnxxdx.

If we set LaTeX: u=\ln xu=lnx, then we will have LaTeX: du=\frac{1}{x}dxdu=1xdx and LaTeX: dx=xdudx=xdu. Therefore, 

LaTeX: \int \frac{\ln x}{x} \; dx=\int \frac{u}{x}\;x\;du=\int u\; du=\frac{1}{2}u^2+C=\frac{1}{2}\ln^2(x)+C\\(\int \frac{\ln x}{x} \; dx=\int \frac{u}{x}\;x\;du=\int u\; du=\frac{1}{2}u^2+C=\frac{1}{2}\ln^2(x)+C\\)

3. Compute LaTeX: \int \left((x^2-1)(x+1)^{\frac{-2}{3}} \right)\; dx ((x21)(x+1)23)dx.

a) Here is one approach. Let's first do some algebraic manipulation and rewrite the integral. 

LaTeX: \begin{align*} \int \left((x^2-1)(x+1)^{\frac{-2}{3}} \right)\; dx &= \int \left((x-1)(x+1)(x+1)^{\frac{-2}{3}} \right)\; dx\\
	&= \int \left((x-1)(x+1)^{\frac{1}{3}} \right)\; dx\\
	\end{align*}((x21)(x+1)23)dx=((x1)(x+1)(x+1)23)dx=((x1)(x+1)13)dx

If we let LaTeX: u=x-1u=x1 then LaTeX: du=dxdu=dx and LaTeX: x+1 = u + 2x+1=u+2.

LaTeX: \begin{align*}
	\int \left((x-1)(x+1)^{\frac{1}{3}} \right)\; dx&=\int u(u+2)^{\frac{1}{3}} \; du.\\
	\end{align*}((x1)(x+1)13)dx=u(u+2)13du.

Let LaTeX: v=u+2v=u+2 then LaTeX: dv=dudv=du and LaTeX: u=v-2.u=v2.

LaTeX: \begin{align*}
	\int \left((x-1)(x+1)^{\frac{1}{3}} \right)\; dx&=\int u(u+2)^{\frac{1}{3}} \; du.\\
	&=\int (v-2)v^{\frac{1}{3}} \; dv\\
	&=\int v^{\frac{4}{3}}-2v^{\frac{1}{3}}\; dv\\
	&=\frac{1}{\frac{4}{3}+1}v^{\frac{4}{3}+1}-\frac{2}{\frac{1}{3}+1}v^{\frac{1}{3}+1}+C\\
	&=\frac{1}{\frac{4}{3}+1}(u+2)^{\frac{4}{3}+1}-\frac{2}{\frac{1}{3}+1}(u+2)^{\frac{1}{3}+1}+C\\
	&=\frac{1}{\frac{4}{3}+1}(x+1)^{\frac{4}{3}+1}-\frac{2}{\frac{1}{3}+1}(x+1)^{\frac{1}{3}+1}+C\\
	\end{align*}((x1)(x+1)13)dx=u(u+2)13du.=(v2)v13dv=v432v13dv=143+1v43+1213+1v13+1+C=143+1(u+2)43+1213+1(u+2)13+1+C=143+1(x+1)43+1213+1(x+1)13+1+C

Remark: The power of LaTeX: \frac{1}{3}  13 of LaTeX: (x+1)(x+1) added complexity to our solution and required us to use substitution twice. Check out the next approach.

b) If we let LaTeX: u=x+1u=x+1 then LaTeX: du=dxdu=dx and LaTeX: x-1=u-2.x1=u2.

LaTeX: \begin{align*}
	\int \left((x-1)(x+1)^{\frac{1}{3}} \right)\; dx&=\int (u-2)(u)^{\frac{1}{3}} \; du\\
	&=\int u^{\frac{4}{3}}-2u^{\frac{1}{3}}\; du\\
	&=\frac{1}{\frac{4}{3}+1}u^{\frac{4}{3}+1}-\frac{2}{\frac{1}{3}+1}u^{\frac{1}{3}+1}+C\\
	&=\frac{1}{\frac{4}{3}+1}(x+1)^{\frac{4}{3}+1}-\frac{2}{\frac{1}{3}+1}(x+1)^{\frac{1}{3}+1}+C\\
	\end{align*}((x1)(x+1)13)dx=(u2)(u)13du=u432u13du=143+1u43+1213+1u13+1+C=143+1(x+1)43+1213+1(x+1)13+1+C

Remark: Both approaches are equally valid and correct. One has fewer steps. How do we decide on the choice of LaTeX: uu? It takes practice, experience, and not being afraid of trying different options. Check out the next approach for the same problem!

c) If LaTeX: u=\frac{1}{x+1}u=1x+1 then LaTeX: du=(-1)(1+x)^{-2}dx=-u^2\;dxdu=(1)(1+x)2dx=u2dx. Hence LaTeX: dx=-\frac{1}{u^2}\; dudx=1u2du.

LaTeX: \begin{align*} \int \left((x^2-1)(x+1)^{\frac{-2}{3}} \right)\; dx&=\int (x-1)(x+1)^{\frac{1}{3}}\;dx\\
&=\int\left(\frac{1}{u}-2\right)\frac{1}{u^{\frac{1}{3}}} \left(-\frac{1}{u^2}\right)\; du\\
&=-\int\left( u^{\frac{-10}{3}}-2u^{\frac{-7}{3}}\right)du\\
&=-\left(\left(\frac{1}{\frac{-10}{3}+1}\right)u^{\frac{-10}{3}+1}-2 \left(\frac{1}{\frac{-7}{3}+1}\right)u^{\frac{-7}{3}+1}\right)+C\\
&=-\left(\left(\frac{1}{\frac{-10}{3}+1}\right)\left(\frac{1}{x+1}\right)^{\frac{-10}{3}+1}-2\left(\frac{1}{\frac{-7}{3}+1}\right)\left(\frac{1}{x+1}\right)^{\frac{-7}{3}+1}\right)+C\\
\end{align*}((x21)(x+1)23)dx=(x1)(x+1)13dx=(1u2)1u13(1u2)du=(u1032u73)du=((1103+1)u103+12(173+1)u73+1)+C=((1103+1)(1x+1)103+12(173+1)(1x+1)73+1)+C

Remark: We do NOT need any further simplification. However, in order to convince ourselves that the third approach gives us the same answer as the first two tries, let's do some algebraic manipulations.

LaTeX: \begin{align*} 
-\left(\left(\frac{1}{\frac{-10}{3}+1}\right)\left(\frac{1}{x+1}\right)^{\frac{-10}{3}+1}-2\left(\frac{1}{\frac{-7}{3}+1}\right)\left(\frac{1}{x+1}\right)^{\frac{-7}{3}+1}\right)+C&=\\
-\left(\left(\frac{1}{\frac{-7}{3}}\right)\left(\frac{1}{x+1}\right)^{\frac{-7}{3}}-2\left(\frac{1}{\frac{-4}{3}}\right)\left(\frac{1}{x+1}\right)^{\frac{-4}{3}}\right)+C&=\\
\frac{1}{\frac{7}{3}}(x+1)^{\frac{7}{3}}-2\frac{1}{\frac{4}{3}}(x+1)^{\frac{4}{3}}+C&=\\
\frac{1}{\frac{4}{3}+1}(x+1)^{\frac{4}{3}+1}-\frac{2}{\frac{1}{3}+1}(x+1)^{\frac{1}{3}+1}+C.&\\
\end{align*}((1103+1)(1x+1)103+12(173+1)(1x+1)73+1)+C=((173)(1x+1)732(143)(1x+1)43)+C=173(x+1)732143(x+1)43+C=143+1(x+1)43+1213+1(x+1)13+1+C.

Remark: Let's reemphasize that this algebraic manipulations was not needed to compute the integral. This third approach was chosen to show, there are multiple ways of doing a LaTeX: u-usubstitution problem and some of them are not obvious at all, like the last one.

4. Compute LaTeX: \int \frac{\sin(2x)}{\sqrt{1+\cos(2x)}}\; dxsin(2x)1+cos(2x)dx

a) We let LaTeX: u=sin(2x)u=sin(2x), then LaTeX: du=2cos(2x)dxdu=2cos(2x)dx

LaTeX: \begin{align*}
	\int \frac{\sin(2x)}{\sqrt{1+\cos(2x)}}\; dx&= \int \frac{u}{\sqrt{1+\cos(2x)}}\frac{du}{2\cos(2x)}
	\end{align*}sin(2x)1+cos(2x)dx=u1+cos(2x)du2cos(2x)

It is hard to imagine what to do next to get rid of LaTeX: xx. So we will try another approach!

b) We let LaTeX: u=cos(2x), u=cos(2x), then LaTeX: du=-2sin(2x)dx.du=2sin(2x)dx.

LaTeX: \begin{align*}
		\int \frac{\sin(2x)}{\sqrt{1+\cos(2x)}}\; dx&= \frac{-1}{2}\int \frac{-2\sin(2x)\; dx}{\sqrt{1+\cos(2x)}}\\
		&=\frac{-1}{2} \int \frac{du}{\sqrt{1+u}}
	\end{align*}sin(2x)1+cos(2x)dx=122sin(2x)dx1+cos(2x)=12du1+u

The expression on the line above is not exactly of the forms we know. So once again we use substitution. We let LaTeX:  v=1+uv=1+u. Then LaTeX:  dv=dudv=du and we have

LaTeX: \begin{align*}
		\int \frac{\sin(2x)}{\sqrt{1+\cos(2x)}}\; dx&= \frac{-1}{2}\int \frac{1}{\sqrt{1+u}}\; du\\
		&=\frac{-1}{2}\int \frac{1}{\sqrt{v}}\; dv\\
		&=\frac{-1}{2}\int v^{\frac{-1}{2}}\; dv\\
		&=\left(\frac{-1}{2}\right)\left(\frac{1}{\frac{-1}{2}+1}\right)v^{\frac{-1}{2}+1}+C\\
		&=\left(\frac{-1}{2}\right)\left(\frac{1}{\frac{-1}{2}+1}\right)(1+u)^{\frac{-1}{2}+1}+C\\
		&=\left(\frac{-1}{2}\right)\left(\frac{1}{\frac{-1}{2}+1}\right)(1+\cos(2x))^{\frac{-1}{2}+1}+C\\
	\end{align*}sin(2x)1+cos(2x)dx=1211+udu=121vdv=12v12dv=(12)(112+1)v12+1+C=(12)(112+1)(1+u)12+1+C=(12)(112+1)(1+cos(2x))12+1+C

With a bit of reflection on this solution, we may notice a streamlined solution as described below.

c) We let LaTeX:  u=1+\cos(2x)u=1+cos(2x). Then LaTeX:  du=-2\sin(2x) dxdu=2sin(2x)dx.

LaTeX: \begin{align*}
		\int \frac{\sin(2x)}{\sqrt{1+\cos(2x)}}\; dx&= \int \frac{\sin(2x)}{\sqrt{u}}\frac{-du}{2\sin(2x)}\\
		&=\frac{-1}{2}\int \frac{1}{\sqrt{u}}\; du\\
		%&=\frac{-1}{2}\int \frac{1}{\sqrt{v}}\; dv\\
		&=\frac{-1}{2}\int u^{\frac{-1}{2}}\; du\\
		&=\left(\frac{-1}{2}\right)\left(\frac{1}{\frac{-1}{2}+1}\right)u^{\frac{-1}{2}+1}+C\\
		%&=\left(\frac{-1}{2}\right)\left(\frac{1}{\frac{-1}{2}+1}\right)(1+u)^{\frac{-1}{2}+1}+C\\
		&=\left(\frac{-1}{2}\right)\left(\frac{1}{\frac{-1}{2}+1}\right)(1+\cos(2x))^{\frac{-1}{2}+1}+C\\
	\end{align*}sin(2x)1+cos(2x)dx=sin(2x)udu2sin(2x)=121udu=12u12du=(12)(112+1)u12+1+C=(12)(112+1)(1+cos(2x))12+1+C