Error or remainder of a Taylor polynomial approximation Understanding the properties of the remainder or error function for an Nth degree Taylor approximation of a function
Error or remainder of a Taylor polynomial approximation
- Let's say that we have some function f of x, and let me graph an arbitrary f of x... that's my y axis, and that's my x axis...
- and maybe f of x looks something like that...
- and what I want to do is approximate f of x with a Taylor Polynomial centered around "x" is equal to "a"
- so this is the x axis, this is the y axis, so I want a Taylor Polynomial centered around there
- You've seen how this works; the Taylor Polynomial comes out of the idea
- that for all of the derivatives up to and including
- the degree of the polynomial, those derivatives of that polynomial
- evaluated at "a" should be equal to the derivatives of our function
- evaluated at "a". And that polynomial evaluated at "a" should also
- be equal to that function evaluated at "a".
- So our polynomial, our Taylor Polynomial approximation, would look something like this;
- So I'll call it p of x, and sometimes you might see a subscript
- of big N there to say it's an nth degree approximation and sometimes
- you'll see something like this, something like N comma a to say it's an nth degree approximation centered a
- at a. Actually I'll write that right now... maybe we'll lose it
- if we have to keep writing it over and over, but you should assume
- that it's an nth degree polynomial centered at "a",
- and it's going to look like this; it is going to be f of "a" plus
- f prime of a, f prime of a, times x minus a, plus f prime prime of "a"
- times x minus a squared over (either you could write two or two factorial, there's the same value)
- I'll write two factorial, you could write divided by one factorial over here if you like.
- And then plus go to the third derivative of f at a times x minus a to the third power,
- (I think you see where this is going) over three factorial,
- and you keep going, I'll go to this line right here, all the way
- to your nth degree term, which is the nth derivative of f evaluated at a
- times x minus a to the n over n factorial.
- And this polynomial right over here, this nth degree polynimal centered at "a",
- it's definitely f of a is going to be the same, or p of a is going to be the same thing
- as f of a, and you can verify that, because all of these other terms have
- an x minus a here, so if you put an a in the polynomial, all of these other
- terms are going to be zero, and you'll have p of a is equal to f of a, let me write that down
- : p of a is equal to f of a. And so it might look something like this.
- It's going to fit the curve better the more of these terms
- that we actually have. So it might look something like this.
- I'll try my best to show what it might look like.
- And what I want to do in this video, since this is all review,
- I have this polynomial that's approximating this function,
- the more terms I have the higher degree of this polynomial,
- the better that it will fit this curve the further that I get away from "a".
- But what I want to do in this video is think about, if we can bound
- how good it's fitting this function as we move away
- from "a". So what I want to do is define a remainder function,
- or sometimes I've seen textbooks call it an error function.
- And I'm going to call this, hmm, just so you're consistent with
- all the different notations you might see in a book... some people will call this
- a remainder function for an nth degree polynomial centered at "a",
- sometimes you'll see this as an "error" function,
- but the "error" function is sometimes avoided because
- it looks like "expected value" from probability,
- but you'll see this often, this is e for error, r for remainder
- and sometimes they will also have the subscripts over there like that,
- and what we'll do is define this function to be the difference between
- f of x and our approximation of f of x for any given x.
- So it's really just going to be (doing the same colors), it's going to be
- f of x minus p of x. Where this is an nth degree polynomial
- centered at "a". So for example, if someone were to ask:
- or if you wanted to visualize, "what are they talking about":
- if they're saying the error of this nth degree polynomial centered at "a"
- when we are at x is equal to b. What is this thing equal to,
- or how should you think about this. Well, if b is right over here,
- so the error of b is going to be f of b minus the polynomial at b.
- So, f of be there, the polynomial is right over there, so it will be
- this distance right over here. So if you measure the error at a,
- it would actually be zero, because the polynomial and the function
- are the same there. F of a is equal to p of a, so there error at "a" is equal to zero.
- Let me actually write that down, because it's an interesting property.
- It will help us bound it eventually, so let me write that. The error function at "a"
- , and for the rest of this video you can assume that I could write a subscript for the nth
- degree polynomial centered at "a". I'm just going to not write that every
- time just to save ourselves some writing. So the error at "a" is equal to
- f of a minus p of a, and once again I won't write the sub n and sub a, you can just assume it
- , this is an nth degree polynomial centered at "a",
- and these two things are equal to each other. So this is going to be equal to zero
- , and we see that right over here. The distance between
- the two functions is zero there. Now let's think about something else.
- Let's think about what the derivative of the error function evaluated at "a" is.
- That's going to be the derivative of our function at "a" minus the first deriviative of our polynomial at "a".
- If we assume that this is higher than degree one, we know that
- these derivatives are going to be the same at "a". You can try to take the first
- derivative here. If you take the first derivative of this whole
- mess, and this is actually why Taylor Polynomials are so useful,
- is that up to and including the degree of the polynomial,
- when you evaluate the derivatives of your polynomial at
- "a" they're going to be the same as the derivatives of the function at "a".
- That's what makes it start to be a good approximation.
- But if you took a derivative here, this term right here will disappear,
- it will go to zero, I'll cross it out for now, this term right over here
- will be just f prime of "a", and then all of these other terms are going
- to be left with some type of an x minus a in them. And so when you
- evaluate it at "a" all the terms with an x minus a disappear because
- you have an a minus a on them... this one already disappeared,
- and you're literally just left with p prime of a will equal to f prime of a.
- And we've seen that before. So let me write that.
- So because we know that p prime of a is equal to f prime of a
- when we evaluate the error function, the derivative of the error function at "a"
- that also is going to be equal to zero. And this general property
- right over here, is true up to and including n. So let me write this down.
- So, we already know that p of a is equal to f of a, we already know that
- p prime of a is equal to f prime of a, this really comes straight
- out of the definition of polynomials, and this is going to be true
- all the way until the nth derivative of our polynomial is evaluated at "a",
- not everywhere, just evaluated at "a", is going to be equal to the nth
- derivative of our function evaluated at "a".
- So what that tells us is that we could keep doing this with the error function
- all the way to the nth derivative of the error function evaluated at "a"
- is going to be equal to the nth derivative of f evaluated at "a" minus
- the nth derivative of our polynomial evaluated at "a".
- And we already said that these are going to be equal to each other
- up to the nth derivative when we evaluate them at "a".
- So these are all going to be equal to zero. So this is an interesting property.
- but it's also going to be useful when we start to try to bound this error function.
- And that's the whole point of where I'm trying to go with this video, and
- probably the next video
- We're going to bound it so we know how good of an estimate we have
- especially as we go further and further from where we are centered...
- from where our approximation is centered.
- Now let's think about when we take a derivative beyond that.
- Let's think about what happens when we take the (n+1)th derivative.
- What is the (n+1)th derivative of our error function. And not even
- if I'm just evaluating at "a". If I just say generally, the error function
- e of x... what's the n+1th derivative of it. Well, it's going to be the
- n+1th derivative of our function minus the n+1th derivative of...
- we're not just evaluating at "a" here either, let me write an x there...
- of our function... I'm literally just taking the n+1th derivative of
- both sides of this equation right over here.
- So it's literally the n+1th derivative of our function minus
- the n+1th derivative of our nth degree polynomial.
- The n+1th derivative of our nth degree polynomial.
- Once again, I could write an n here, I could write an a here to show
- it's an nth degree centered at "a".
- Now, what is the n+1th derivative of an nth degree polynomial?
- If you want some hints, take the second derivative of y equal to x.
- It's a first degree polynomial... take the second derivative, you're going to get
- a zero. Take the 3rd derivative of y equal x squared.
- The first derivative is 2x, the second derivative is 2, the third derivative is zero.
- In general, if you take an n+1th derivative, of an nth degree polynomial,
- and you can prove it for yourself, you can even prove it generally,
- but I think it might make a little sense to you, it's going to be equal to zero.
- So this thing right here, this is an n+1th derivative of an nth degree polynomial.
- This is going to be equal to zero. So the n+1th derivative of our error function,
- or our remainder function you could call it, is equal to
- the n+1th derivative of our function. What we can continue in the next video,
- is figure out, at least can we bound this, and if we're able to bound this,
- if we're able to figure out an upper bound on its magnitude,
- actually what we want to do is bound its overall magnitude, to bound
- its absolute value.
- If we can determine that it is less than or equal to some value m...
- if we can actually bound it, maybe we can do a bit of calculus,
- we can keep integrating it, and maybe we can go back to
- the original function, and maybe we can bound that in some way.
Be specific, and indicate a time in the video:
At 5:31, how is the moon large enough to block the sun? Isn't the sun way larger?
Have something that's not a question about this content?
This discussion area is not meant for answering homework questions.
Share a tip
When naming a variable, it is okay to use most letters, but some are reserved, like 'e', which represents the value 2.7831...
Thank the author
This is great, I finally understand quadratic functions!
Have something that's not a tip or thanks about this content?
This discussion area is not meant for answering homework questions.
At 2:33, Sal said "single bonds" but meant "covalent bonds."
For general discussions about Khan Academy, visit our Reddit discussion page.
Here are posts to avoid making. If you do encounter them, flag them for attention from our Guardians.
- disrespectful or offensive
- an advertisement
- low quality
- not about the video topic
- soliciting votes or seeking badges
- a homework question
- a duplicate answer
- repeatedly making the same post
- a tip or thanks in Questions
- a question in Tips & Thanks
- an answer that should be its own question