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

# Worked example: estimating eˣ using Lagrange error bound

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

## Video transcript

- mating e to the 1.45 using a Taylor polynomial about x equals two what is the least degree of the polynomial that assures an error smaller than 0.001 in general if you see a situation like this where we're talking about approximating a function with the Taylor polynomial centered about some value and we want to know well how many terms do we need what degree do we need to bound the error that's a pretty good clue that we're going to be using the LeGrande or taylor's remainder theorem and just as a reminder of that this is a review of Taylor's remainder theorem and it tells us that the absolute value of the remainder for the nth degree Taylor polynomial it's going to be less than this business right over here now n is the degree of our polynomial that we're in question so that's the N the X is the x value at which we are calculating that error in this case it's going to be this one point four five and C is where our Taylor polynomial is centered but what about our M well our M is an upper bound on the absolute value of the n plus one derivative of our function and that might seem like a mouthful but when we actually work through the details of this example it'll make it a little bit more concrete so for this particular thing we're trying to estimate we're trying to estimate eetu the X so I could write f of X let me write this this way so f of X is equal to e to the X and we're trying to estimate F of one point four five and let's just to get get the bound here to figure out what M is let's just remind ourselves that well the first derivative of this is going to be e to the X the second derivatives going to be e to the X I'll go at the nth derivative is going to be e to the X the n plus one third derivative is going to be e to the X so the n plus 1 the derivative of F is going to be is going to be e to the X which is convenient these types of problems are very very hard if it's difficult to bound the n plus 1 derivative well this we know we know that e to the X we know that e to the X and I could even say the absolute value of this but this is going to be positive is going to be less than or equal to let's say this is going to be less than or equal to e square cared-for zero is less than X is less than or equal to 2 e to the X isn't bounded over the entire 4 4 over its entire domain if X goes to infinity e to the X will also go to infinity but here I set up an interval I've set up an interval that contains the X we care about remember the X we care about is one point four five and it also contains where our function is centered our function is centered at two so we know we're bounded by e squared so we can say we can use e squared as our M we can use e squared as our M we were able to establish this bound and so doing that we can now go straight to la garage our bound we can say we can say that the remainder of our nth degree Taylor polynomial we want to solve for n we want to figure out what n gives us the appropriate bound evaluated at one point four five when X is one point four five is going to be less than or equal to the absolute value our M is e squared e squared over over n plus 1 factorial times one point four five that's our X that we care about that's where we're calculating the error we're trying to bound the error - where we're centered - two to the n plus 1 power now one point four five minus two that is negative zero point five five so let me just write that so this is this is negative zero point five five to the n plus one power and we want to figure out for what n is all of this business is all of this business going to be less than 0.001 let's do a little bit of algebraic manipulation here this term is positive this is going to be positive this right over here or this part of it's good not it's not an independent term but this the EDA square is going to be positive n plus 1 factorial going to be positive the negative zero point five five to some power that's going to flip between being positive or negative but since we're taking the absolute value we could write it this way we could write e squared e squared since we're taking the absolute value times 0.55 to the n plus 1 over n plus 1 factorial has to be less than has to be less than 0.001 or since we want to solve for one less since we want to solve for n let's divide both sides by e squared so we could write we could write let's find the N where 0.55 to the n plus 1 power over n plus 1 factorial is less than is less than 0.001 over over e squared now to play with this we're going to have to use a calculator it exists we're going from this point we're just going to try larger and larger ends until we get an N that makes this true and we find when we want to find the smallest possible n that makes this true but let's get out our calculator so that we can actually so that we can actually do this so first I'm just going to figure out what is one thousandth divided by E squared so make sure it's cleared out so let's take a squared I'm going to take its reciprocal and I'm going to multiply that times a thousandth so times point zero zero 1 is equal to so it's it's about so I'll say so it's three zeros this is a ten thousandth and then three five so it's three zeros so I'll say one three six so this needs to be this needs to be less than zero point one two three and I'll say one three six if I can find an N that is less than this then I am in that I am in good shape actually let me say this less than one three five I want to be less than that value then I can be then I will be in good shape this is a little bit more than one three five but if I can find an N where that is less than this that I'm in good shape let me write this zero point five five to the n plus 1 over n plus one factorial so let's try out some ends and I'm gonna have to get my calculator out so let's see it did I do that right yeah 0 0 0 1 3 5 if we get something below this then we're in good shape because this is even less than that all right so let's do it let's see what this is equal to when I don't know when n is equal to 2 I could start at N equals 1 N equals 2 N equals 3 but at the more and then further if N equals 2 is good enough that I might try N equals 1 but if N equals 2 isn't good enough that I'm going to go to N equals 3 or N equals 4 so let's start with actually let's just start with N equals 3 so if N equals 3 it's going to be 0.5 5 to the fourth power divided by 4 factorial so let's see is that let's do that so 0.55 to the fourth power is equal to that divided by 4 factorial so divided by 4 factorial is 24 so that's nowhere near low enough so let's try N equals 4 if N equals 4 then it's going to be this to the fifth power divided by 5 factorial so 0.55 to the fifth power is equal to and then divided by 5 factorial is 5 factorial is 120 divided by 120 is equal to that we're almost there with N equals 4 I'm guessing that N equals 5 will do the trick so for N equals 5 so let's clear this out so for N equals 5 we're going to raise to the 6th power and divided by 6 factorial and so let's just remind ourselves what six factorial is 720 I could have actually done that in my head but anyway alright so let's see we're going to go 0.55 to that remember our n is 5 so we're going to raise to the sixth power to the sixth power and then we're going to divide by 720 divided by 720 is equal to and this number for sure is less than this number right over here we got four zeroes before this 3 after the decimal you have three so when N equals five it got is sufficiently low enough this remainder is going to be sufficiently low it's going to be less than this value right over here so what is the least degree of the polynomial that is that assures an error smaller than 1000 and the answer is five our n if n is five we're definitely going to be under this
AP® is a registered trademark of the College Board, which has not reviewed this resource.