# Difference between revisions of "009B Sample Final 1, Problem 6"

Evaluate the improper integrals:

(a)   ${\displaystyle \int _{0}^{\infty }xe^{-x}~dx}$

(b)   ${\displaystyle \int _{1}^{4}{\frac {dx}{\sqrt {4-x}}}}$

Foundations:
1. How could you write   ${\displaystyle \int _{0}^{\infty }f(x)~dx}$ so that you can integrate?

You can write   ${\displaystyle \int _{0}^{\infty }f(x)~dx=\lim _{a\rightarrow \infty }\int _{0}^{a}f(x)~dx.}$

2. How could you write   ${\displaystyle \int _{-1}^{1}{\frac {1}{x}}~dx?}$

The problem is that  ${\displaystyle {\frac {1}{x}}}$  is not continuous at  ${\displaystyle x=0.}$

So, you can write  ${\displaystyle \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  ${\displaystyle \int xe^{x}\,dx?}$

You can use integration by parts.

Let  ${\displaystyle u=x}$  and  ${\displaystyle dv=e^{x}dx.}$

Solution:

(a)

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

${\displaystyle \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  ${\displaystyle u}$-substitution.
Let  ${\displaystyle u=-x.}$  Then,  ${\displaystyle du=-dx.}$
Since the integral is a definite integral, we need to change the bounds of integration.
Plugging in our values into the equation  ${\displaystyle u=-x,}$  we get
${\displaystyle u_{1}=0}$  and  ${\displaystyle u_{2}=-a.}$
Thus, the integral becomes

${\displaystyle {\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

${\displaystyle {\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

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

${\displaystyle \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

${\displaystyle {\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)    ${\displaystyle 1}$
(b)    ${\displaystyle 2{\sqrt {3}}}$