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
109-Year-Old Veteran and His Secrets to Life Will Make You Smile | Short Film Showcase
[Music] Yeah, a lot of people say God kept you here to help others, but I don’t know why he kept me here. I can’t tell you. I ain’t talk to him; he ain’t talk to me. My name is Richard Ain Overton. I am 109 years old! [Music] I still walk, I still talk, a…
We Don’t Need to Seek Love. We Just Have to Stop Resisting It | The Wisdom of Rumi
The 13th-century Sufi mystic Jalāl ad-Dīn Muhammad Rūmī, also known as Mevlana or simply as Rumi, observed that all phenomena of nature are bound together by love. Love is what keeps planets orbiting their stars, stars encircling the centers of their gala…
Subtracting 3-digit numbers (no regrouping) | 2nd grade | Khan Academy
We have the number 357. So the three is in the hundreds place. So that represents three hundreds: one hundred, two hundred, three hundreds. Three hundreds right over here, that’s what this three represents, ‘cause it’s in the hundreds place. Let me write …
An Alaskan Storm - Behind the Scenes | Life Below Zero
We are here to document the lives of people living in Alaska. The harsh reality is the environment we’re up against. It makes it tough to do our job. Get out of there, working on Life Below Zero can be very dangerous. Guns here, cameras here; never know w…
A Fun, Animated History of the Reformation and the Man Who Started It All | Short Film Showcase
[Music] A most precise and nuanced look into the life of the man, legend, and visionary Martin Luther. One day, when Luther is 21 years old, he experiences something which will affect him for the rest of his life. Suddenly, a thunderstorm—a wild, violent…
Fourier series coefficients for cosine terms
So we’ve been spending some time now thinking about the idea of a Fourier series, taking a periodic function and representing it as the sum of weighted cosines and sines. Some of you might say, “Well, how is this constant weighted cosine or sine?” Well, y…