Calc1231W9T3 - Lagrange formula for the remainder

Tuesday, 18 September 2018

10:22 PM

Machine generated alternative text:
The Taylor polynomial is a nice simple way to approximate a function. However simplicity comes at the cost of accuracy Lagrange's form for the remainder gives crude but easy-to-calculate 
bounds for this accuracy 
By Taylor's theorem, given a point = a and a function f with n + 1 continuous derivatives we can write 
f@) = pn(æ) + Rn+l(c), 
where pn is the nth degree Taylor polynomial about x = a, and the remainder term is given by the integral 
f(n+l) — t)ndt. 
1 
Rn+l (x) 
n! 
This is exactly the error between f and pn, but it is difficult to look at, and difficult to compute. Another expression for the remainder term is Lagrange's form for the remainder 
Rn+l (x) = f(n+l) ( C) 
for some c between a and If we can find a bound for f (n +1) (c) then this can be used to bound the remainder term Rn+l (x). 
ex then the 3rd Talyor polynomial for f about x = 0 is 
For example, consider x in the range [—0.01, 0]. If f@) 
Lagrange's form for the reminder term is 
4 
4! 
where 
O (a function of c). 
Where c is a real number where —0.01 < < c < 0. The maximum value of f (4) (c) is 17 which is achieved when 
Using this we can bound the error term

 

Machine generated alternative text:
Consider the function f(x) 
By Taylor's theorem 
and its relation to the degree 2 Taylor polynomial P2@) at = 1: 
f@) 
The Lagrange form of the remainder gives 
= P2(x) + R3(x). 
3 
= (x -31,) 
where c is between 
R3(x) 
O and x _ But 
This is a special case where the Lagrange form of the remainder can be calculated exactly:

 

Machine generated alternative text:
4 
3 
2 
-2 
30 
P30(x) 
2TT 
Suppose you have an unknown mystery function f(x) The GeoGebra app above does not show the function f(x), but it does show (in blue) the nth degree Taylor polynomial pn(x) for 
f@) about the point x = 0 . The mystery function f(x) lies somewhere in the grey shaded area; which is the area beftveen the functions 
and pn@) + 
i) What is the smallest value of n such that pn@) has three stationary points? 
4 
ii) What is our best guess for -1 
iii) What is our best guess for f (—T/2)? 
iv) Ah ha' The mystery function is

 

Machine generated alternative text:
30 
P30(x) 
—2TT 
4 
3 
2 
-2 
2TT 
Hopefully you solved the mystery and discovered that the Taylor polynomials pn (x) were for f@) = cos(x) about the point = O. 
But where did those helpful grey functions come 
from? The Lagrange form for the remainder' This is 
Rn+l(x) _ x 
for some c between 0 and Notice that f (n +1) (x) = ± cos(x) or ± sin@) so 
If(n+l) 
Using this we can bound the remainder term by 
Hence 
cos(x) S pn(x) + 
(1) 
Let's use this to calculate some values of cos(2)_ 
i) Rounded to 3 decimal places 
Our bound on Lagrange's form for the remainder gives us (rounded to 3 decimal places) 
25 
5! 
-0.333. 
= 0.267.

 

Machine generated alternative text:
So, using equation (1): 
-.6 
This does not tell us much about the value of cos(2) 
O S cos(2) 
ii) A better approximation to cos(2) will be given by the 8th degree Taylor polynomial (rounded to 5 decimal places) 
P8(2) 
—0.41587. 
And Lagrange's form for the remainder gives us the bound (rounded to 5 decimal places) 
which is quite small. So; using equation (1): 
-0.41728 
29 
= 0.00141 
9! 
O cos(2) < 
These bounds agree in the first two decimal places! It is not possible to round this number since the third digit of cos(2) is not clear from this analysis. But we do know the value of cos(2) in 
the first two decimal places: 
cos(2) — 
Note: The decimal O.abc• • • truncated to two decimal places is O.ab 
-.41 
O (truncated to two decimal places)

 

Machine generated alternative text:
Consider the integral 
But don't consider it for too long. _ this integral is impossible to evaluate exactly 
2 
at x = 0 of degree 4. 
We can use the Taylor polynomial for e¯ 
P4(x) — 
Integrating Taylor polynomial we get 
We find this is a pretty close to Maple's numerical calculation of the integral 
1 
1 
dc 
2 
dc. 
23/30 
So this simple polynomial calculation gets us to within 3 
O 
1 = 0.7468241330 
percent of the this value of I.

 

 

Created with Microsoft OneNote 2016.