User:Egm6341.s11.team4.BM/HW1

= Problem 1: Limits and Taylor Series=

Given
Refer to Lecture slide for the problem statement


 * {| style="width:70%" border="0" align="center"



f(x) = \frac{e^x - 1}{x} $$ $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.

Find
1. Find the limit of the function as x approaches zero.


 * {| style="width:70%" border="0" align="center"



\lim_{x \rightarrow 0}f(x)=\frac{e^{x}-1}{x} $$
 * $$\displaystyle


 * }.
 * }.

2. Plot the function over the range from zero to one inclusive
 * {| style="width:70%" border="0" align="center"



f(x)=\frac{e^{x}-1}{x},\ x\in[0,1] $$
 * $$\displaystyle




 * }.

Solution
1. Function Limit

Before employing the Taylor series method of evaluating the limit for the function as x approaches zero, we will use the traditional L'Hopital's rule.


 * {| style="width:70%" border="0" align="center"

\lim_{x \rightarrow 0}\frac{e^{x}-1}{x} $$ Now, seeing that both the numerator and the denominator trend towards zero as x approaches zero, we will take the derivatives of both the numerator and the denominator.
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.


 * {| style="width:70%" border="0" align="center"

\lim_{x \rightarrow 0}\frac{e^{x}}{1} $$
 * $$\displaystyle
 * $$\displaystyle

Evaluating the numerator at x equals zero we find
 * }.
 * }.


 * {| style="width:70%" border="0" align="center"

$$\displaystyle \frac{1}{1}=1 $$ $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle
 * style= |
 * }.
 * }.

L'Hopital's rule clearly tells us that the limit of the function approaches one. We will now seek a similar answer using the Taylor series expansion method as demonstrated in class.

We will begin with the Taylor series expansion for $$\displaystyle e^x $$ about zero.


 * {| style="width:70%" border="0" align="center"



\begin{align} e^x \approx \sum_{i=0}^n \frac{x^i}{i!} \\ \end{align} $$
 * $$\displaystyle


 * }.
 * }.

This Taylor series expansion to the n-th order can be displayed so simply since $$\displaystyle e^x $$ evaluated at zero is one and every derivative of the function $$\displaystyle e^x $$ is the function itself. As n goes to infinity this function becomes an equality.

Furthermore, we can evaluate the first term in the summation to get


 * {| style="width:70%" border="0" align="center"



\begin{align} e^x \approx 1+\sum_{i=1}^n \frac{x^i}{i!} \\ \end{align} $$
 * $$\displaystyle


 * }.
 * }.

We can algebraically rearrange this equation to get


 * {| style="width:70%" border="0" align="center"



\begin{align} e^x -1 \approx \sum_{i=1}^n \frac{x^i}{i!} \\ \end{align} $$
 * $$\displaystyle


 * }.
 * }.

Now we have the Taylor expansion of our numerator. To find the Taylor series expansion of our original function we simply need to divide both sides of the above equation by x.


 * {| style="width:70%" border="0" align="center"



\begin{align} \frac{e^x -1}{x} \approx \sum_{i=1}^n \frac{x^{i-1}}{i!} \\ \end{align} $$
 * $$\displaystyle


 * }.
 * }.

The left hand side of this equation is our function $$\displaystyle f(x)$$. The right hand side is a Taylor series approximation of the function. For n=$$\infty$$ this can be expressed as


 * {| style="width:70%" border="0" align="center"



\begin{align} \frac{e^x -1}{x} &= \sum_{i=1}^\infty \frac{x^{i-1}}{i!} \\ \end{align} $$
 * $$\displaystyle


 * }.
 * }.

Inspecting the Taylor series approximation we can see that, when evaluated at $$x=0$$, the numerator will be zero for every i except i=1. Mathematically, this can be expressed by pulling out the term i=1 from our summation, leaving the summation from 2 to infinity.


 * {| style="width:70%" border="0" align="center"



\begin{align} \lim_{x \rightarrow 0} \frac{e^x -1}{x} &= \frac{0^{0}}{0!}+\cancelto{0}{\sum_{i=2}^\infty \frac{0^{i-1}}{i!} }
 * $$\displaystyle

\end{align} $$


 * }.
 * }.

This leads us to our final conclusion (Equation 2), consistent with our expectations via L'Hopital's rule, that


 * {| style="width:70%" border="0" align="center"

$$\displaystyle \lim_{x \rightarrow 0} f(x) = \frac{e^x - 1}{x}=1 $$ $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle
 * style= |
 * }.
 * }.

2. Function Plot

The function f(x) is then plotted over the span [0,1] to graphically make clear how the function approaches 1 as x approaches 0. Two functions are plotted for this purpose. First, we will plot the function itself. This function, due to a discontinuity, is not evaluated at 0. Next, we will plot our Taylor series approximation using a value of n=30. Though this value is chosen arbitrarily to minimize computational expense, it is shown in problem 2 that this selection is sufficiently large to make the approximation error negligible. The Taylor series expansion, expressing no discontinuities, is evaluated over the entirety of the span [0,1].

Matlab Code:

Plots:



The evaluation of the original function.



The evaluation of the Taylor series approximation of the function.

Both the Taylor series approximation and the function itself clearly show that the value of the function as x approaches zero is one.

= Contributing Team Members =

Egm6341.s11.Team4.BM 10:27, 17 January 2011 (UTC)

= References =

[] I have relied heavily on Team 4's HW1 report from last year as a stylistic guide. I followed the Taylor Series expansion for the function as derived in class. In order to improve upon their representation of this information, I added the comparison method using L'Hopital's rule and removed the ellipses notation in favor of a closed form summation notation.