# 009B Sample Final 1, Problem 6

Evaluate the improper integrals:

(a)   $\int _{0}^{\infty }xe^{-x}~dx$ (b)   $\int _{1}^{4}{\frac {dx}{\sqrt {4-x}}}$ Foundations:
1. How could you write   $\int _{0}^{\infty }f(x)~dx$ so that you can integrate?

You can write   $\int _{0}^{\infty }f(x)~dx=\lim _{a\rightarrow \infty }\int _{0}^{a}f(x)~dx.$ 2. How could you write   $\int _{-1}^{1}{\frac {1}{x}}~dx?$ The problem is that  ${\frac {1}{x}}$ is not continuous at  $x=0.$ So, you can write  $\int _{-1}^{1}{\frac {1}{x}}~dx=\lim _{a\rightarrow 0^{-}}\int _{-1}^{a}{\frac {1}{x}}~dx+\lim _{a\rightarrow 0^{+}}\int _{a}^{1}{\frac {1}{x}}~dx.$ 3. How would you integrate  $\int xe^{x}\,dx?$ You can use integration by parts.

Let  $u=x$ and  $dv=e^{x}dx.$ Solution:

(a)

Step 1:
First, we write  $\int _{0}^{\infty }xe^{-x}~dx=\lim _{a\rightarrow \infty }\int _{0}^{a}xe^{-x}~dx.$ Now, we proceed using integration by parts.
Let  $u=x$ and  $dv=e^{-x}dx.$ Then,  $du=dx$ and  $v=-e^{-x}.$ Thus, the integral becomes

$\int _{0}^{\infty }xe^{-x}~dx=\lim _{a\rightarrow \infty }\left.-xe^{-x}\right|_{0}^{a}-\int _{0}^{a}-e^{-x}\,dx.$ Step 2:
For the remaining integral, we need to use  $u$ -substitution.
Let  $u=-x.$ Then,  $du=-dx.$ Since the integral is a definite integral, we need to change the bounds of integration.
Plugging in our values into the equation  $u=-x,$ we get
$u_{1}=0$ and  $u_{2}=-a.$ Thus, the integral becomes

${\begin{array}{rcl}\displaystyle {\int _{0}^{\infty }xe^{-x}~dx}&=&\displaystyle {\lim _{a\rightarrow \infty }-xe^{-x}{\bigg |}_{0}^{a}-\int _{0}^{-a}e^{u}~du}\\&&\\&=&\displaystyle {\lim _{a\rightarrow \infty }-xe^{-x}{\bigg |}_{0}^{a}-e^{u}{\bigg |}_{0}^{-a}}\\&&\\&=&\displaystyle {\lim _{a\rightarrow \infty }-ae^{-a}-(e^{-a}-1)}.\\\end{array}}$ Step 3:
Now, we evaluate to get

${\begin{array}{rcl}\displaystyle {\int _{0}^{\infty }xe^{-x}~dx}&=&\displaystyle {\lim _{a\rightarrow \infty }-ae^{-a}-(e^{-a}-1)}\\&&\\&=&\displaystyle {\lim _{a\rightarrow \infty }{\frac {-a}{e^{a}}}-{\frac {1}{e^{a}}}+1}\\&&\\&=&\displaystyle {\lim _{a\rightarrow \infty }{\frac {-a-1}{e^{a}}}+1}.\\\end{array}}$ Using L'Hôpital's Rule, we get

${\begin{array}{rcl}\displaystyle {\int _{0}^{\infty }xe^{-x}~dx}&=&\displaystyle {\lim _{a\rightarrow \infty }{\frac {-1}{e^{a}}}+1}\\&&\\&=&\displaystyle {0+1}\\&&\\&=&\displaystyle {1}.\\\end{array}}$ (b)

Step 1:
First, we write  $\int _{1}^{4}{\frac {dx}{\sqrt {4-x}}}=\lim _{a\rightarrow 4^{-}}\int _{1}^{a}{\frac {dx}{\sqrt {4-x}}}.$ Now, we proceed by  $u$ -substitution.
We let  $u=4-x.$ Then,  $du=-dx.$ Since the integral is a definite integral, we need to change the bounds of integration.
Plugging in our values into the equation  $u=4-x,$ we get
$u_{1}=4-1=3$ and  $u_{2}=4-a.$ Thus, the integral becomes

$\int _{1}^{4}{\frac {dx}{\sqrt {4-x}}}\,=\,\lim _{a\rightarrow 4^{-}}\int _{3}^{4-a}{\frac {-1}{\sqrt {u}}}~du.$ Step 2:
We integrate to get

${\begin{array}{rcl}\displaystyle {\int _{1}^{4}{\frac {dx}{\sqrt {4-x}}}}&=&\displaystyle {\lim _{a\rightarrow 4^{-}}-2u^{\frac {1}{2}}{\bigg |}_{3}^{4-a}}\\&&\\&=&\displaystyle {\lim _{a\rightarrow 4^{-}}-2{\sqrt {4-a}}+2{\sqrt {3}}}\\&&\\&=&\displaystyle {2{\sqrt {3}}}.\\\end{array}}$ (a)    $1$ (b)    $2{\sqrt {3}}$ 