Need someone to verify if my solution for a calculus problem is correct

PowerMacG5

Diamond Member
Apr 14, 2002
7,701
0
0
The question states:
Write the first n+1 terms of the Taylor series about a=0 for f(x)=e^x with the Lagrange form of the remainder. What is the least number of terms needed to get the value of 1/e with an error less than 10^-3?

So what I did was as follows.
f(x)=e^x=1+x+x^2/2!+x^3/3!=x^4/4!+...+x^n/n!+((e^c)/(n+1)!)*x^(n+1)

where ((e^c)/(n+1)!)*x^(n+1)! is the lagrange form of the remainder.

So this is what I did to get the error:
Rn(-1) <= 0.0005

abs(Rn(-1))<= abs(M*(x^(n+1))/(n+1)!)
abs(Rn(-1))<=abs((1/e)/(n+1)!) // Can remove x^(n+1) because the abs((-1)^(n+1)) = 1 and M = 1/e on the Interval I=[-2, -1]

Then I said that you can replace 1/e with 1 because 1 is obviously larger than 1/e and the inequality will still hold true. So you get:
abs(Rn(-1)) <= 1/(n+1)!
1/(n+1)! <=0.0005
(n+1)! >= 2000

So with this I then said that the lowest n >= 2000 is 6 because 6! = 720, while 7! = 5040, so (n+1) = 7, so n=6

This taylor approximation gets me 0.368056
And the approximate value of 1/e given by my calculator is 0.367879

So is my solution correct, and am I correct in saying that the taylor approximation must go out to n=6 terms? Thanks in advance.