If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Taylor polynomial remainder (part 2)

AP.CALC:
LIM‑8 (EU)
,
LIM‑8.C (LO)
,
LIM‑8.C.1 (EK)

## Video transcript

in the last video we started to explore the notion of an error function not to be confused with expected value because it really does look like the same notation but here he is for error and we could also cut you'll sometimes see it referred to as a remainder function and we saw it's really just the difference as we the difference between the function and our approximation of the function so for example this this distance right over here that is our error that is our error at the X is equal to B and what we really care about is the absolute value of it because at some points f of X might be larger than the polynomial sometimes a polynomial might be larger than f of X what we care is the absolute distance between them and so what I want to do in this video is try to bound try to bound our error at some B try to bound our error so say it's less than or equal to some constant value try to bound it at B for some B is greater than a we're just going to assume that B is greater than a and we saw some tantalizing we got to a bit of a tantalizing result that seems like we might be able to bound it in the last video we saw that the n plus 1 derivative of our error function is equal to the n plus 1 derivative of our function or that their absolute values would also be equal to it so if we can somehow bound the n plus 1 derivative of our function over some interval an interval that matters to us an interval that maybe has B in it then we can at least bound the n plus 1 derivative of our error function and then maybe we can do a little bit of integration to bound the error itself at some value B so let's see if we can do that well let's just assume let's just assume that we're in a reality where we do know something about the n plus 1 derivative of f of X let's say we do know that this we do it in a color that I haven't used yet I'll do it in white so let's say that thing right over there looks something like that so that is f the n plus 1 derivative the n plus 1 derivative and I only care about it over this interval right over here who cares what it does later I just want to bound it over the interval because the end of the day I just want to bound B right over here so let's say that the absolute value of this let's say that we know let me write it over here let's say that we know we know that the absolute value of the n plus 1 derivative the n plus 1 then I apologize I actually switch between the capital n in the lowercase n and I did that in the last video I shouldn't have but now that you know that I did that hopefully doesn't confuse you n plus 1 so let's say we know that the n plus 1 derivative of f of X the absolute value of it let's say it's bounded let's say it's less than or equal to some M over the interval because we only care about the interval it might not be bounded in general but we all we care is that it takes some maximum value over this interval so over over over the interval X I could write it this way over the interval X is a member between a and B so and this includes both of them it's a closed interval X could be a X could be B or X could be anything in between and we can say this generally that that this derivative will have some maximum value so this is it's the absolute values maximum value Max value M for max we know that it will have a maximum value if this thing is continuous so once again we're going to assume that it is continuous that it has some maximum value over this interval right over here well this thing this thing right over here we know is the same thing as the n plus 1 derivative of the error function so then we know so then then that implies that implies that that implies that D that's a new color can we do it that blue or that green that implies that the the n plus 1 derivative of the error function the absolute value of it because either the same thing is also is also bounded by M so that's a little bit of an interesting result but it gets us nowhere near there it might look similar but this is the n plus 1 the derivative of the error function and and we'll have to think about how we can get an M in the future we're assuming that we somehow know it and maybe we'll do some example problems where we figure that out but this is the n plus 1 third derivative we bounded its absolute value but we really want to bound the actual error function the the 0 of the derivative you could say the actual function itself well we could try to integrate both sides of this and see if we can eventually get to eat to get to e of X to get to our error function or a remainder function so let's do that let's take the integral let's take the integral of both sides of this now the integral on this left hand side it's a little interesting we take the integral of the absolute value it would be easier if we were taking the absolute value of the integral and lucky for us the way it's set up so let me just write a little aside here we know generally that if I take and it's something for you to think about if I take so if I have two options if I have two options this option versus and I know they look the same right now I know that they look the same right now so over here I'm going to have the integral of the absolute value and over here I'm going to have the absolute value of the integral which of these is going to be which of these can be larger well you just have to think about the scenarios so if f of X is always positive over the interval that you're taking the integration then they're going to be the same thing they're going to get positive values take the absolute value of a positive value it doesn't make a difference what matters is if f of X is negative if f of X if f of X is negative the entire time so if this is our x-axis that is our y-axis if f of X is what we saw if it's positive the entire time you're taking the absolute value of a positive absolute value of positive it's not going to matter these two things are going to be equal if f of X is negative the whole time then you're going to get then this integral is going to evaluate to a negative value but then you take the absolute value of it and then over here you're just going to this is the integral is going to evaluate to a positive value but is still going to be the same thing the interesting case is when f of X is both positive and negative so you can imagine a situation like this if f of X looks something like that then this right over here the integral you'd have positive this would be positive and then this would be negative right over here and so they would cancel each other out so this would be a smaller value than if you took the integral of the absolute value the integral the absolute value of f would look something like this so all of the areas are going to be if you view the integral if you view this may be a definite integral all of the areas all of the areas would be positive so when you if you're going to get a bigger value when you take the integral of the absolute value then you will especially when f of X goes both positive and negative over the interval then you would if you took the integral first and then the absolute value because once again if you took the integral first for something like this you would get a low value because this stuff would cancel out it would cancel out with this stuff right over here and then you take the absolute value of just a lower a lower magnitude number and so in general the integral the integral sorry the absolute value of the integral is going to be less than or equal to the integral of the absolute value so we can say so this right here is the integral of the absolute value which is going to be greater than or equal what we have written over here is just this that's going to be greater than or equal to and I think you'll see while I'm doing this in a second greater than or equal to the absolute value the absolute value of the integral of of the n plus 1 derivative the N plus 1 the derivative of X DX and the reason why this is useful is that we can still keep the inequality that this is less than or equal to this but now this is a pretty straightforward integral to evaluate the in doubt with the antiderivative of the N plus 1 third derivative is going to be the nth derivative so this business right over here is just going to be the absolute value of the nth derivative the absolute value of the nth derivative of our error function did I say expected value I shouldn't see it even confuses me this is the error function I should have used our our for a remainder but this is all error there not nothing about probability or expected value in this video this is e for error so anyway this is going to be the nth derivative of our error function which is going to be less than equal to this which is less than or equal to the antiderivative em well that's a constant so that's going to be MX MX and since we're just taking indefinite integrals we can't forget the idea that we have a constant over here and in general when you're trying to create an upper bound you want as low a upper bound as possible so we want to minimize we want to minimize what this constant is and lucky for us we do have we do know what this what this function what value this function takes on at a point we know that the nth derivative of our error function at a is equal to zero I think we wrote it over here the nth derivative at a is equal to zero and that's because the nth derivative of the function and the approximation at a are going to be the same exact thing and so if we evaluate both sides of this at a and I'll do it over here on the side we know that the absolute value we know the absolute value of the nth derivative at a we know that this thing is going to be equal to the absolute value of zero which is zero which needs to be less than or equal to when you evaluate this thing at a which is less than or equal to M a plus C and so you can if you look at this part of the inequality you subtract M a from both sides you get negative M a is less than or equal to C so our constant here based on that little condition that we were able to get in the last video our constant is going to be greater than or equal to negative M a so if we want to minimize the constant if we want to get this as low of a bound as possible we would want to pick C is equal to negative ma that is the lowest possible C that will meet these constraints that we know are true so we will actually pick C to be negative M a and then we can rewrite this whole thing as the absolute value of the nth derivative of the error function the nth derivative the error function not the expected value I have a strange suspicion I might have said expected value but this is the error function the nth derivative the the absolute value of the nth derivative the error function is less than or equal to M times X minus a and once again all of the constraints hold this is for this is for X as part of the interval the closed interval between the closed interval between a and B but looks like we're making progress we at least went from the n plus one derivative to the nth derivative let's see if we can keep going so same general idea this if we know this then we know that we can take the integral of both sides of this so we could take the integral of both sides of this the antiderivative of both sides and we know from what we figured out up here that something that's even smaller than this right over here is is the absolute value of the integral of the expected value now to see I said it of the error function not the expected value of the error function the nth derivative of the error function of X the entity of the error function of X DX so we know that this is less than or equal to based on the exact same logic there and this is useful because this is just going to be this is going to be the N minus 1 derivative of our error function of X and of course we have the absolute value outside of it and now this is going to be less than or equal to it's less than or equal to this which is less than or equal to this right over here the antiderivative of this right over here is going to be M times X minus a squared over 2 you could do u substitution if you want or you could just say hey look I have a little expression here its derivative is 1 so it's implicitly there so I can just treat it as kind of a u so raise it to an exponent and then divide that exponent but once again I'm picking indefinite integrals so I'm going to say a plus C over here but let's use that same exact logic if we evaluate this at a you're going to have if we evaluate this whole let's evaluate both sides of this at a the left side evaluated at a we know is going to be zero we figure that out I'll up here in the last video so you get I'll do it on the right over here you get zero when you evaluate the left sided a the right side of a if you the right side evaluated a you get M times a minus a squared over two you're going to get zero plus C so you're going to get zero is less than or equal to C once again we want to minimize our constant we want to minimize our upper bound over here so we want to pick the lowest possible C that meets our constraints so the lowest possible C that meets our constraint is zero and so the general idea here is that we can keep doing this we can keep doing exactly what we're doing all the way all the way all the way until you say we keep integrating it the exact same same way that I've done it all the way that we get and using this exact same property here all the way until we get the bound on the error function of X so you could view this as the zero the derivative you know we're going all the way to the zero the derivative which is really just the error function the bound on the error function of X is going to be less than or equal to and what's it going to be and you can already see the pattern here is that it's going to be M times X minus a and the exponent the one way to think about it this exponent plus this derivative is going to be equal to n plus 1 now this derivative is zero so this exponent is going to be n plus 1 and whatever that exponent is you're going to have and and maybe I should have done it you're going to have n plus 1 factorial over here and if you say wait Y where does this n plus 1 factorial come from I just had a 2 here well think about what happens when we integrate this again you're going to raise this to the third power and then divide by 3 so your denominator is going to have 2 times 3 then when you integrate it again you're going to raise it to the 4th power and then divide by 4 so then your Dom is going to be 2 times 3 times 4 or 4 factorial so whatever power you're raising to the denominator is going to be that power factorial but what's really interesting now is if we are able to figure out that maximum value of our function if we're able to figure out that maximum value of our function right there we now have a way of bounding our error function over that interval over that interval between a and B so for example the error function at B we can now bound it if we know what an M is we can say the error function at B is going to be less than or equal to M times B minus a to the n plus 1 power over n plus 1 factorial so that gets us a really powerful I guess you could call it result kind of the the math behind it now we can show some examples where this could actually be applied
AP® is a registered trademark of the College Board, which has not reviewed this resource.