# U-substitution

## Introduction

The method of  $u$ -substitution is used to simplify the function you are integrating so that you can easily recognize it's antiderivative.

This method is closely related to the chain rule for derivatives.

One question that is frequently asked is "How do you know what substitution to make?" In general, this is a difficult question to answer since it is dependent on the integral. The best way to master  $u$ -substitution is to work out as many problems as possible. This will help you:

(1) understand the  $u$ -substitution method and

(2) correctly identify the necessary substitution.

NOTE: After you plug-in your substitution, all of the  $x$ 's in your integral should be gone. The only variables remaining in your integral should be  $u$ 's.

## Warm-Up

Evaluate the following indefinite integrals.

1)   $\int (8x+5)e^{4x^{2}+5x+3}~dx$ Solution:
Let  $u=4x^{2}+5x+3.$ Then,  $du=(8x+5)~dx.$ Plugging these into our integral, we get  $\int e^{u}~du,$ which we know how to integrate.
So, we get
${\begin{array}{rcl}\displaystyle {\int (8x+5)e^{4x^{2}+5x+3}~dx}&=&\displaystyle {\int e^{u}~du}\\&&\\&=&\displaystyle {e^{u}+C}\\&&\\&=&\displaystyle {e^{4x^{2}+5x+3}+C.}\\\end{array}}$ $e^{4x^{2}+5x+3}+C$ 2)   $\int {\frac {x}{\sqrt {1-2x^{2}}}}~dx$ Solution:
Let  $u=1-2x^{2}.$ Then,  $du=-4x~dx.$ Hence,  ${\frac {du}{-4}}=x~dx.$ Plugging these into our integral, we get
${\begin{array}{rcl}\displaystyle {\int {\frac {x}{\sqrt {1-2x^{2}}}}~dx}&=&\displaystyle {\int -{\frac {1}{4}}~u^{-{\frac {1}{2}}}~du}\\&&\\&=&\displaystyle {-{\frac {1}{2}}u^{\frac {1}{2}}+C}\\&&\\&=&\displaystyle {-{\frac {1}{2}}{\sqrt {1-2x^{2}}}+C.}\\\end{array}}$ $-{\frac {1}{2}}{\sqrt {1-2x^{2}}}+C$ 3)   $\int {\frac {\sin(\ln x)}{x}}~dx$ Solution:
Let  $u=\ln(x).$ Then,  $du={\frac {1}{x}}~dx.$ Plugging these into our integral, we get
${\begin{array}{rcl}\displaystyle {\int {\frac {\sin(\ln x)}{x}}~dx}&=&\displaystyle {\int \sin(u)~du}\\&&\\&=&\displaystyle {-\cos(u)+C}\\&&\\&=&\displaystyle {-\cos(\ln x)+C.}\\\end{array}}$ $-\cos(\ln x)+C$ 4)   $\int xe^{x^{2}}~dx$ Solution:
Let  $u=x^{2}.$ Then,  $du=2x~dx$ and  ${\frac {du}{2}}=x~dx.$ Plugging these into our integral, we get
${\begin{array}{rcl}\displaystyle {\int xe^{x^{2}}~dx}&=&\displaystyle {\int {\frac {1}{2}}e^{u}~du}\\&&\\&=&\displaystyle {{\frac {1}{2}}e^{u}+C}\\&&\\&=&\displaystyle {{\frac {1}{2}}e^{x^{2}}+C.}\\\end{array}}$ ${\frac {1}{2}}e^{x^{2}}+C$ ## Exercise 1

Evaluate the indefinite integral  $\int {\frac {2}{y^{2}+4}}~dy.$ First, we factor out  $4$ out of the denominator.

So, we have

${\begin{array}{rcl}\displaystyle {\int {\frac {2}{y^{2}+4}}~dy}&=&\displaystyle {{\frac {1}{4}}\int {\frac {2}{{\frac {y^{2}}{4}}+1}}~dy}\\&&\\&=&\displaystyle {{\frac {1}{2}}\int {\frac {1}{({\frac {y}{2}})^{2}+1}}~dy.}\\\end{array}}$ Now, we use  $u$ -substitution. Let  $u={\frac {y}{2}}.$ Then,  $du={\frac {1}{2}}~dy$ and  $2~du=dy.$ Plugging these into our integral, we get

${\begin{array}{rcl}\displaystyle {\int {\frac {2}{y^{2}+4}}~dy}&=&\displaystyle {{\frac {1}{2}}\int {\frac {2}{u^{2}+1}}~du}\\&&\\&=&\displaystyle {\int {\frac {1}{u^{2}+1}}~du}\\&&\\&=&\displaystyle {\arctan(u)+C}\\&&\\&=&\displaystyle {\arctan {\bigg (}{\frac {y}{2}}{\bigg )}+C.}\\\end{array}}$ So, we have

$\int {\frac {2}{y^{2}+4}}~dy=\arctan {\bigg (}{\frac {y}{2}}{\bigg )}+C.$ ## Exercise 2

Evaluate the indefinite integral  $\int {\frac {\cos(x)}{(5+\sin x)^{2}}}~dx.$ Let  $u=5+\sin(x).$ Then,  $u=\cos(x)~dx.$ Plugging these into our integral, we get

${\begin{array}{rcl}\displaystyle {\int {\frac {\cos(x)}{(5+\sin x)^{2}}}~dx}&=&\displaystyle {\int {\frac {1}{u^{2}}}~du}\\&&\\&=&\displaystyle {-{\frac {1}{u}}+C}\\&&\\&=&\displaystyle {-{\frac {1}{5+\sin(x)}}+C.}\end{array}}$ So, we have

$\int {\frac {\cos(x)}{(5+\sin x)^{2}}}~dx=-{\frac {1}{5+\sin(x)}}+C.$ ## Exercise 3

Evaluate the indefinite integral  $\int {\frac {x+5}{2x+3}}~dx.$ Here, the substitution is not obvious.

Let  $u=2x+3.$ Then,  $du=2~dx$ and  ${\frac {du}{2}}=dx.$ Now, we need a way of getting rid of  $x+5$ in the numerator.

Solving for  $x$ in the first equation, we get  $x={\frac {1}{2}}u-{\frac {3}{2}}.$ Plugging these into our integral, we get

${\begin{array}{rcl}\displaystyle {\int {\frac {x+5}{2x+3}}~dx}&=&\displaystyle {\int {\frac {({\frac {1}{2}}u-{\frac {3}{2}})+5}{2u}}~du}\\&&\\&=&\displaystyle {{\frac {1}{2}}\int {\frac {{\frac {1}{2}}u+{\frac {7}{2}}}{u}}~du}\\&&\\&=&\displaystyle {{\frac {1}{4}}\int {\frac {u+7}{u}}~du}\\&&\\&=&\displaystyle {{\frac {1}{4}}\int 1+{\frac {7}{u}}~du}\\&&\\&=&\displaystyle {{\frac {1}{4}}(u+7\ln |u|)+C}\\&&\\&=&\displaystyle {{\frac {1}{4}}(2x+3+7\ln |2x+3|)+C.}\\\end{array}}$ So, we get

$\int {\frac {x+5}{2x+3}}~dx={\frac {1}{4}}(2x+3+7\ln |2x+3|)+C.$ ## Exercise 4

Evaluate the indefinite integral  $\int {\frac {x^{2}+4}{x+2}}~dx.$ Let  $u=x+2.$ Then,  $du=dx.$ Now, we need a way of replacing  $x^{2}+4.$ If we solve for  $x$ in our first equation, we get  $x=u-2.$ Now, we square both sides of this last equation to get  $x^{2}=(u-2)^{2}.$ Plugging in to our integral, we get

${\begin{array}{rcl}\displaystyle {\int {\frac {x^{2}+4}{x+2}}~dx}&=&\displaystyle {\int {\frac {(u-2)^{2}+4}{u}}~du}\\&&\\&=&\displaystyle {\int {\frac {u^{2}-4u+4+4}{u}}~du}\\&&\\&=&\displaystyle {\int {\frac {u^{2}-4u+8}{u}}~du}\\&&\\&=&\displaystyle {\int u-4+{\frac {8}{u}}~du}\\&&\\&=&\displaystyle {{\frac {u^{2}}{2}}-4u+8\ln |u|+C}\\&&\\&=&\displaystyle {{\frac {(x+2)^{2}}{2}}-4(x+2)+8\ln |x+2|+C.}\\\end{array}}$ So, we have

$\int {\frac {x^{2}+4}{x+2}}~dx={\frac {(x+2)^{2}}{2}}-4(x+2)+8\ln |x+2|+C.$ 