# Taylor remainder theorem

Discussion in 'Math' started by silvrstring, May 23, 2008.

1. ### silvrstring Thread Starter Active Member

Mar 27, 2008
159
0
Hi. I'm going over some notes from class, and I just realized that I only have examples of the Taylor Remainder theorem in reference to trig funcs.

Rn(x)=f^(n+1)c(x-a)^(n+1)/(n+1)! where c is some number between x and a. (Sorry, I know there's gotta be a better way put that in here).

Now I'm supposed to find a max M for f^(n+1)c which is no problem with sine cosine stuff. But I don't know what to do outside of those types.

Example:

say f(x)=sqrt(x) and I find the third order Taylor polynomial at x=9 and use it to evaluate sqrt(9.2). Then I want to use the remainder theorem.

I know I need to find the 4th derivative of sqrt(x) in this case, but I'm at a loss for how to find M here. Would it just be 9.2? I don't know. I forgot to ask in class yesterday.

If anybody has an example, or an explanation of c or M, I would really appreciate it. Thanks.

Apr 15, 2008
471
0
3. ### Mark44 Well-Known Member

Nov 26, 2007
626
1
Let me help you a bit with your notation, and to make sure you understand that you will be evaluating the fourth derivative of f at some number c:
You want to find a number c in some interval for which f''''(c) is largest. I.e., M = f''''(c) for some number c.

You can also represent this as f$^{(4)}$(c). The parentheses around the exponent are used to distinguish, in this case, the fourth derivative from the fourth power of f.

The general remainder should look like this:
Rn = f$^{(n + 1)}$(c) [(x - a)$^{(n + 1)}$ / (n + 1)!.

For the problem you're working, with a Taylor series of degree 3.
R3 = f$^{(4)}$(c) [(x - a)$^{(4)}$ / (4)!. Here x will be 9.2, and a will be some convenient value (9 comes to mind).

Since f(x) = sqrt(x), you want to find the largest value of the fourth derivative of f, on the interval [9, 9.2]. M is not going to be 9.2. Look at the graph of f''''(x) on that interval, and pick a value of c in [9, 9.2] that gives the largest value. It will most likely be the left endpoint or the right endpoint, provided that f'''' is decreasing on the interval, or increasing on the interval, respectively. M = f''''(c), where c is the value in [9, 9.2] that gives the largest value of f''''. Keep in mind that you're calculating an estimate, so you have some wiggle room on the value you use for M. You don't have to use the exact largest value; you can use a value that is slightly larger if necessary.

Hope that helps,
Mark

4. ### Ratch New Member

Mar 20, 2007
1,068
4
silvrstring,

You are asking about the Lagrange form of the Taylor series remainder.

The function is Sqrt(x), x=9.2, a=9 .

The first 4 Taylor series expansion terms around a=9 is:
3+1/6*(x-9)-(1/216)*(x-9)^2+(1/3888)*(x-9)^3+R

Where R = (-5/128)*((x-9)^4)/c^7/2 and c is between 9.0 and 9.2

Evaluating the first 4 terms of the Taylor we get 3.033150206

Evaluation R at c = 9.0 and 9.2 , we get -2.857796068*10^(-8) and -2.646199733*10^(-8) respectively. The largest absolute value M occurs at c = 9.0 which is 2.857796068*10^(-8) . Therefore the error from using only 4 terms of the Taylor series of the square root will not exceed 0.00000002857796068, which is accurate to 7 decimal places.

From above, the computed value from the Taylor series is 3.033150206. The correct value of Sqrt(9.2) to 9 decimal places is 3.033150178. The difference is 2.8*10^(-8). I hope this helps you. Ratch

Last edited: May 23, 2008
5. ### silvrstring Thread Starter Active Member

Mar 27, 2008
159
0
Thanks guys. I think I got it. I just now evaluated it with a second degree polynomial to see if I'm doing it right. I'll work it through the next derivative to see if I get the same answer.

If you get a chance, maybe you can tell me if I did it right. I attatched it.

File size:
282.1 KB
Views:
57
6. ### Mark44 Well-Known Member

Nov 26, 2007
626
1
I didn't check very closely, but your work seems good. The result from the calculator in Windows is 3.0033314835362412922024507137191, so that tends to confirm your result and your error estimate.

Minor point that I just thought of...

The remainder is given as Rn = f$^{(n+1}$ (c) times other stuff, for some c between x and a. It's usually not practical to find the number c, so we just about never get an exact value for Rn. What we do instead is get an upper bound on Rn by getting an upper bound on f$^{(n+1}$ (x) for x in the interval of question.

So instead of Rn = <some exact value>, we settle for
Rn <= <a slightly less precise value>.

For the sake of simplicity, I am assuming that the function and its derivatives are nonnegative. In cases where this is not a valid assumption, you need to work with absolute values, as shown in the wikipedia link that Caveman sent.

Mark

7. ### silvrstring Thread Starter Active Member

Mar 27, 2008
159
0
Nope. Didn't have. I think I was evaluating c wrong. If c^(7/2) >= 9^(7/2), then c(-7/2) <= 9^(-7/2). Which would mean c^(-7/2) is at most (1/2187).

f^4(x) = (-15/16)x^(-7/2). So M = abs[(-15/16)*9^(-7/2)] = 5/11664.
Then [M*(9.02-9)^4] / 4! = 2.8578 x 10^-12 = error estimate

Is that right? It looks more like what you have. I think I got it. Getting closer anyway.

Last edited: May 23, 2008
8. ### Mark44 Well-Known Member

Nov 26, 2007
626
1
That's exactly what I got, which is approx. 4.2866941 X 10$^{-4}$.
The part to the left of the equals is right, but the number on the right is 10,000 times too small. The reason for this is that you used 9.02 instead of 9.2. Take a look at your first post.

So R4 <= 2.857796 X 10$^{-8}$.

9. ### Ratch New Member

Mar 20, 2007
1,068
4
Mark44,

For the Sqrt(x) function, the sign of the derivative alternates with each single step increase of order.

I hope you mean to use absolute values only with the result of the remainder, and not the series terms themselves. Ratch

10. ### Mark44 Well-Known Member

Nov 26, 2007
626
1
My bad -- every other derivative of the sqrt function from the second on is negative. And yes, I meant the absolute value applied only to the remainder term.
Mark

11. ### Ratch New Member

Mar 20, 2007
1,068
4
silvrstring,

The Taylor series terms are 3/2+(1/6)*x-(1/216)*(x-9)^2 which evaluates to 3.033148148 at x = 9.2

The Lagrange remainder term is 0.0004999999999/c^(5/2) . The values are 0.000002057613169 and 0.000001947603004 when c is 9.0 and 9.2 respectively. Your answer should be accurate to 5 decimal places for 3 Taylor series terms. The difference between the computed and true value at 9 decimal places is -0.000002030, which is within the the maximum error estimate M of 0.000002057613169.
Ratch

Last edited: May 23, 2008
12. ### silvrstring Thread Starter Active Member

Mar 27, 2008
159
0
Thanks for your help guys. Think I got it now. Yes, I did post sqrt(9.2) originally. Sorry about that Mark. And yes, I am using the abs value. Forgot to mention that.

Thanks again, Mark44 and Ratch, for your help. I really appreciate it.