# Power Series e^x

• Jun 3rd 2011, 12:53 PM
ashleysmithd
Power Series e^x
Hi,

I've been learning how to use the power series for e^x, however I'm confused as to what level of 'accuracy' you are supposed to go to.

For instance, the question:

Determine the value of 5e^0.5, correct to 5 significant figures, by using the power series for e^x.

As I begin to multiply 0.5 by the power 2 and divide by the factorial 2, I add one to the power and factorial every time and this increases the accuracy of my answer. However there is no telling how accurate a question (like the one above) wants my answer to be. I could multiply 0.5 by the power of a billion and divide by the factorial of a billion if I wanted, theoretically I think it's infinite.

Am I missing some kind of rule here? Answering this question without knowing how accurate it needs to be seems impossible.

If someone can help me out here that would be great.

cheers.
• Jun 3rd 2011, 02:27 PM
Stro
$\displaystyle e=\sum_{n=0}^{\infty}\frac{1}{n!} = 1+ \frac{1}{1!}+\frac{1}{2!}+\frac{1}{3!}+\frac{1}{4! }+...$

$\displaystyle e^{x}=\sum_{n=0}^{\infty}\frac{x^n}{n!} = 1+ \frac{x}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x ^4}{4!}+...$

$\displaystyle 5e^{.5}=5*\sum_{n=0}^{\infty}\frac{.5^n}{n!} = 5\left(1+ \frac{.5}{1!}+\frac{.5^2}{2!}+\frac{.5^3}{3!}+ \frac{.5^4}{4!}+... \right)$

Something like this perhaps?

Based on what you said here "Determine the value of 5e^0.5, correct to 5 significant figures, by using the power series for e^x" it seems you know how accurate it needs to be? Just find out how many n you need to expand the series ($\displaystyle \frac{.5^n}{n!}$) for 5 significant figure accuracy of your final approximation of 5e^0.5.
• Jun 3rd 2011, 07:54 PM
chisigma
Quote:

Originally Posted by ashleysmithd
Hi,

I've been learning how to use the power series for e^x, however I'm confused as to what level of 'accuracy' you are supposed to go to.

For instance, the question:

Determine the value of 5e^0.5, correct to 5 significant figures, by using the power series for e^x.

As I begin to multiply 0.5 by the power 2 and divide by the factorial 2, I add one to the power and factorial every time and this increases the accuracy of my answer. However there is no telling how accurate a question (like the one above) wants my answer to be. I could multiply 0.5 by the power of a billion and divide by the factorial of a billion if I wanted, theoretically I think it's infinite.

Am I missing some kind of rule here? Answering this question without knowing how accurate it needs to be seems impossible.

If someone can help me out here that would be great.

cheers.

A little trick... the series expansion of $\displaystyle e^{-x}$...

$\displaystyle e^{-x} = 1-x+\frac{x^{2}}{2} - \frac{x^{3}}{6} +...$ (1)

... is 'alternate sign' and that means that, if You stop the sum at the n-th term, the error will be $\displaystyle |\varepsilon|< \frac{x^{n+1}}{(n+1)!}$. So You can compute first $\displaystyle e^{-x}$ with the desired accuracy and then obtain $\displaystyle e^{x} = \frac{1}{e^{-x}}$ ...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$
• Jun 4th 2011, 08:30 AM
HallsofIvy
Quote:

Originally Posted by ashleysmithd
Hi,

I've been learning how to use the power series for e^x, however I'm confused as to what level of 'accuracy' you are supposed to go to.

For instance, the question:

Determine the value of 5e^0.5, correct to 5 significant figures, by using the power series for e^x.

As I begin to multiply 0.5 by the power 2 and divide by the factorial 2, I add one to the power and factorial every time and this increases the accuracy of my answer. However there is no telling how accurate a question (like the one above) wants my answer to be. I could multiply 0.5 by the power of a billion and divide by the factorial of a billion if I wanted, theoretically I think it's infinite.

???? The problem says "correct to 5 significant figures" which means the error must be less than 0.000001.

Quote:

Am I missing some kind of rule here? Answering this question without knowing how accurate it needs to be seems impossible.

If someone can help me out here that would be great.

cheers.
• Jun 4th 2011, 11:12 AM
ashleysmithd
Ok I think I understand.. basically keep the sum going until the first 5 significant figures do not change.

Overlooked that one. thanks.
• Jun 4th 2011, 12:02 PM
HallsofIvy
Quote:

Originally Posted by ashleysmithd
Ok I think I understand.. basically keep the sum going until the first 5 significant figures do not change.

Overlooked that one. thanks.

Or you could use the "error formula" for Tayor's series: The error in using k terms of the Taylor's series is less than
$\displaystyle \frac{M_{k+1}}{(k+1)!}|x-x_0|^{k+1}$
where "$\displaystyle M_{k+1}$" is a upper bound on the k+1 derivative of f between x and $\displaystyle x_0$. In this case the function is $\displaystyle 5e^x$ which has all derivatives equal to $\displaystyle 5e^x$. Since e is less than 3, $\displaystyle 5e^x$ is always less than $\displaystyle 5(3)^x$so that its maximum value is less than $\displaystyle 5(3)^{1/2}= 8.660$. That is, the error after k terms is less than $\displaystyle \frac{8.660}{(k+1)!}(0.5^k)$. You should be able to estimate the size of k that makes that less than 0.00001.