yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Worked example: estimating e_ using Lagrange error bound | AP Calculus BC | Khan Academy


5m read
·Nov 11, 2024

Estimating e to the 1.45 using a Taylor polynomial about x equal 2, 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 a 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 Lagrange error bound or Taylor's remainder theorem.

And just as a reminder of that, this is a review of Taylor's remainder theorem. It tells us that the absolute value of the remainder for the nth degree Taylor polynomial is 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 1.45. And c is where our Taylor polynomial is centered.

But what about our M? Well, M is an upper bound on the absolute value of the (n + 1)th derivative of our function. 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 e to the x. So I could write f of x—let me write this this way—so f(x) is equal to e to the x, and we're trying to estimate f of 1.45.

And let's just, to 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 derivative is going to be e to the x. The nth derivative is going to be e to the x. The (n + 1)th derivative is going to be e to the x. So the (n + 1)th derivative of f 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 + 1)th derivative. Well, this we know—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^2 for 0 < x ≤ 2. e to the x isn't bounded over the entire domain. For x going 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 1.45, and it also contains where our function is centered. Our function is centered at 2, so we know we're bounded by e^2. So we can say we can use e^2 as our M. We can use e^2 as our M; we were able to establish this bound.

And so, doing that, we can now go straight to the Lagrange error bound. 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 1.45—when x is 1.45, is going to be less than or equal to the absolute value of our M, which is e^2 over (n + 1)! times (1.45 - 2) raised to the (n + 1) power.

Now, 1.45 - 2, that is -0.55, so let me just write that. So this is 0.55 to the (n + 1) power. And we want to figure out for what n 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, not, it's not an independent term, but this e^2 is going to be positive, and (n + 1)! is going to be positive. The negative (0.55) to some power is 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^2 since we're taking the absolute value times (0.55) to the (n + 1) over (n + 1)! has to be less than 0.001. Or, since we want to solve for n, let's divide both sides by e^2, so we could write—let's find the n where (0.55)^(n + 1) over (n + 1)! is less than 0.001 over e^2.

Now, to play with this, we're going to have to use a calculator. Remember, we're from this point going to try larger and larger n's until we get an n that makes this true, and we want to find the smallest possible n that makes this true. But let's get out our calculator so that we can actually do this.

So first, I'm just going to figure out what is 0.001 divided by e^2. So make sure it's cleared out. So let's take e^2; I'm going to take its reciprocal and then I'm going to multiply that times 0.001.

So times 0.001 is equal to—so it's about, so I'll say, so it's three zeros, and this is a 10,000th and then 35, so it's three zeros, so I'll say 0.000136. So this needs to be less than 0.000123, and I'll say 0.000136; if I can find an n that is less than this, then I am in good shape.

Actually, let me say it's less than 0.000135. 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 0.000135, but if I can find an n where that is less than this, then I'm in good shape.

So let me write this: (0.55)^(n + 1) over (n + 1)! So let's try out some n's, and I'm going to have to get my calculator out. So let's see, did I do that right? Yeah, 0.000135. 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 the more n the further. If n equals 2 is good enough, then I might try n equal 1, but if n equals 2 isn't good enough, then I'm going to go to n equal 3 or n equal 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.55)^4 divided by 4!. Let's see that. Let's do that. So (0.55)^4 is equal to—and then divided by 4! So divided by 4! is 24, so that's nowhere near low enough.

So let's try n equal 4. If n equals 4, then it's going to be this to the 5th power divided by 5!. So (0.55)^5 is equal to—and then divided by 5! 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 divide by 6!. And so let's just remind ourselves what 6! is—720. I could have actually done that in my head, but anyway.

All right, so let's see—(0.55) to the—remember our n is 5, so we're going to raise to the 6th power—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 zeros before this, three after the decimal; here we only have three.

So when n equals 5, it got us 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 assures an error smaller than 0.001? The answer is 5. If n is 5, we're definitely going to be under this.

More Articles

View All
Creative biology at work | High school biology | Khan Academy
[Music] Hi everyone, Salcon here. From finding novel cures for a seemingly incurable disease to diagnosing what’s going on with someone, if you’re a physician or a nurse, you can imagine there’s incredible creativity in biology. And don’t take my word fo…
1996 Berkshire Hathaway Annual Meeting (Full Version)
[Applause] Just a little early but I think, uh, everyone’s had a chance to take their seats. I must say this is the first time I’ve seen this program. They told me they’d surprise me and they certainly did. Mark Hamburg, our Chief Financial Officer, who i…
Bullets HITTING Bullets in Slow Motion - THE IMPOSSIBLE SHOT - Smarter Every Day 287
Three, two, one. Fire (BANG!) Hey, it’s me, Destin. Welcome back to Smarter Every Day. I am at the American Museum of Natural History. It’s a Smithsonian Museum. And this is something that I saw ten years ago, and it changed the way I think about bullets …
Calculating confidence interval for difference of means | AP Statistics | Khan Academy
Kylie suspected that when people exercise longer, their body temperatures change. She randomly assigned people to exercise for 30 or 60 minutes, then measured their temperatures. The 18 people who exercised for 30 minutes had a mean temperature, so this i…
The Stock Market Is About To Snap
Hey Graham, it’s our final attempt to reach you regarding your car’s expiring warranty. Guys, here. So anyway, we need to talk. If you’ve recently checked your stock prices and wondered why they’ve been violently dragged down for seemingly no reason at a…
Introduction to powers of 10
In this video, I’m going to introduce you to a new type of mathematical notation that will seem fancy at first, but hopefully, you’ll appreciate is pretty useful and also pretty straightforward. So let’s just start with some things that we already know. …