Taylor remainder

Starter question
Find the fourth order Taylor approximation of
sin(x), around pi/4
Starter question
We
ar
e he
re
Find the fourth order Taylor approximation of
sin(x), around pi/4
sin(pi/4)=cos(pi/4)= sqrt 0.5
Starter question
Find the fourth order Taylor approximation of
sin(x), around pi/4
We
are
here
sin(pi/4)=cos(pi/4)= sqrt 0.5
f ( x)≈ f (a)+
f ' (a)
f ' ' (a)
f ' ' ' (a)
f ' ' ' ' (a)
2
3
4
( x−a)+
( x−a) +
( x−a) +
( x−a)
1!
2!
3!
4!
Starter question
Find the fourth order Taylor approximation of
sin(x), around pi/4
We
are
here
sin(pi/4)=cos(pi/4)= sqrt 0.5
f ' (a)
f ' ' (a)
f ' ' ' (a)
f ' ' ' ' (a)
2
3
4
( x−a)+
( x−a) +
( x−a) +
( x−a)
1!
2!
3!
4!
cos( π )
−sin( π )
−cos( π )
sin( π )
2
2
2
2
sin( x)≈sin( π )+
( x−a)+
( x−a)2+
( x−a)3 +
( x−a)4
2
1!
2!
3!
4!
f ( x)≈ f (a)+
Starter question
Find the fourth order Taylor approximation of
sin(x), around pi/4
We
are
here
sin(pi/4)=cos(pi/4)= sqrt 0.5
f ' (a)
f ' ' (a)
f ' ' ' (a)
f ' ' ' ' (a)
2
3
4
( x−a)+
( x−a) +
( x−a) +
( x−a)
1!
2!
3!
4!
cos( π )
−sin( π )
−cos( π )
sin( π )
2
2
2
2
sin( x)≈sin( π )+
( x−a)+
( x−a)2+
( x−a)3 +
( x−a)4
2
1!
2!
3!
4!
√ 0.5 ( x−a)+ −√ 0.5 ( x−a)2 + −√ 0.5 ( x−a)3 + √ 0.5 ( x−a)4
sin( x)≈ √ 0.5+
1!
2!
3!
4!
f ( x)≈ f (a)+
Today:
●
●
●
●
●
Today we are going to learn the Taylor remainder theorem.
Taylor's remainder theorem is really clever, and puts bounds on how bounds
our errors are allowed to be.
In this lecturer I will NOT be proving the remainder theorem, or anything
similar... BUT if anyone is interested, I will be putting a proof of the theorem
up on the website, along with clicker questions and lecturer notes from
previous lectures.
BTW- I've seen the next midterm, and there may be questions which give
results like ln(3) or log_2(27). If you get this, don't panic. Just right ln(3) or
whatever as part of your answer. Things like sqrt(2) times ln(7) are perfectly
legit answers, even if you don't know what they are in decimal form.
ALSO- we will have a guest lecturer next Thursday. He is currently enrolled
in the Math 599 course, and is training to be a lecturer. This is the course I
had to take last year before they'd let me give lecturers to you. Please be
courteous and give him all the attention you would give me. If you are
confused ask questions.
Motivation
●
●
So when we are approximating a function, one of the most important
questions we should be asking is “What's the worse that could
happen?” If we know we need mm precision, and our approximation
function only has cm accuracy, we have a problem. If it has
nanometer accuracy, then all is well.
We write
f ( x)= f (a)+
●
f ' (a)
f ' ' (a)
2
( x−a)+
( x−a) +...+R ( x )
1!
2!
Here R(x) is a magical remainder function handed down by Zeus. R is
the perfect function to make the above equation exact. Because R
represents how much error we make when approximating, it could be
very useful for us to figure out R.
Luckily We have Taylor's remainder theorem along to help us.
Taylor remainder theorem.
Given a SMOOTH function f ( x ) and a N th order taylor approximation g ( x)
approximated around a point a , the Maximum error found at a point x
is bounded by the formula:
N +1
( x−a)
∣R ( x)∣≤ M
( N +1)!
Where M is a number such that M ≥∣ f
t between x and a .
(n+1)
(Smooth means ``has enough derivatives'' )
(t )∣ For all
Okay. Great.
What the heck did all that mean?
●
So now that I've stated the theorem, lets unpack it a
bit.
1) Taylor's remainder theorem tells you how big the
error can be on your taylor approximation.
●
●
●
●
2) It only works if you know the N+1th derivative.
3) It only works if you are trying to approximate a
function that is reasonably smooth.
If you have an upper bound on how big the n+1 th
derivative is in a particular area, you can use that to
tell you something about the error.
Okay- lets try it out.
Example
●
●
●
Remember our function from the start of the lessonsin(x), approximated near pi/4.
We had the fourth order Taylor approximation.
What is the maximum possible error in our expansion
when we are approximating x=10?
●
First check: Is our function smooth? Yes.
●
2nd set: Do we know the Nth +1 derivative? cos(x)
●
3rd step: Do we have an upper bound on |cos(x)|? Yes|cos(x)|<=1
●
Horray, we can use theorem.
●
R(x) <= 1 times (10-pi/4)^5 / 5!
Clicker question
●
Suppose we have a 8 order expansion of f ( x)=e
around zero. What is the maximum possible error in
−2
our estimate of e ?
th
A) R≤0
512
C) R≤
9!
B) R≤∞
256
D) R≤
8!
x
Clicker question
●
Suppose we have a 8 order expansion of f ( x)=e
around zero. What is the maximum possible error in
−2
our estimate of e ?
th
B) R≤∞
A) R≤0
512 1×2
C) R≤
=
9!
9!
9
256
D) R≤
8!
x
Clicker question
●
Suppose we have a linear expansion of f ( x)=tan−1 ( x)
around zero. What is a possible upper bound on the
possible error in our estimate of tan−1 (0.5) ?
5
A) R≤
128
B) R≤1/ 4
1
C) R≤
32
1
D) R≤
8
Clicker question
●
Suppose we have a linear expansion of f ( x)=tan−1 ( x)
around zero. What is a possible upper bound on the
possible error in our estimate of tan−1 (0.5) ?
5
A) R≤
128
B) R≤1/ 4
1
C) R≤
32
1
D) R≤
8
Clicker question
●
−2
Suppose we have a cubic approximation of f ( x)=x
around 1. What does Taylor's remainder theorem tell
us about our estimate of (−0.4)−2 ?
65
A) R≤
4!
C) R≤12
16
B) R≤
4!
83
D) R≤
4!
Clicker question
●
−2
Suppose we have a cubic approximation of f ( x)=x
around 1. What does Taylor's remainder theorem tell
us about our estimate of (−0.4)−2 ?
65
A) R≤
4!
16
B) R≤
4!
83
D) R≤
C) R≤12
4!
E) None of the above!
Remember, Taylor's approximation
formula only applies if smooth!