Lesson Video: Lagrange Error Bound | Nagwa Lesson Video: Lagrange Error Bound | Nagwa

# Lesson Video: Lagrange Error Bound Mathematics • Higher Education

In this video, we will learn how to use the Lagrange error bound (Taylorβs theorem with remainder) to find the maximum error when using Taylor polynomial approximations.

11:33

### Video Transcript

In this video, weβre going to learn how to use the Lagrange error bound to find the maximum error when approximating using Taylor polynomials. Weβll not only learn how we can use the formula to find these error bounds, but also how to find the least degree of a Taylor polynomial required to give a certain degree of accuracy.

The whole point in developing Taylor series is that they replace more complicated functions with polynomial-like expressions. And the properties of Taylor series make them especially useful when doing calculus. Now remember, a Taylor series for a function π about π is given by the sum from π equals zero to β of the πth derivative of π evaluated at π over π factorial times π₯ minus π to the πth power. So the first few terms are π of π plus π prime of π over one factorial times π₯ minus π plus π double prime of π over two factorial times π₯ minus π squared and so on.

The biggest issue we have is that these series involve infinitely many terms. And in reality, we usually only use the first few. And so of course, this means we lose some accuracy. We get a very good estimate for a function, but we canβt model it exactly. Letβs try to visualise this. Here is the graph of a function in the variable π₯, π of π₯. We can add the graph of its Taylor approximation π‘ sub π of π₯ about π. Now, we can approximate the value of π of π by finding the value of π π of π. But of course, we can see that there is some error in this. We call this error π π of π₯. Itβs the remainder term; itβs the difference between our estimation and the actual value of the function at that point.

And so we define an error bound. This is called the Lagrange error bound. And it allows us to see exactly how accurate our estimate is. We begin by letting π‘ sub π of π₯ be the πth order Taylor polynomial for our function π about π, such that π of π₯ is equal to the πth order Taylor polynomial plus π π of π₯. Thatβs our remainder term. The difference between π of π₯ and π sub π of π₯ then is π sub π of π₯, called the remainder term or the Lagrange error.

π sub π of π₯ satisfies the following criteria. If the absolute value of the π plus oneth derivative of [π₯] is less than or equal to sum π, then the absolute value of π sub π of π₯ is less than or equal to the absolute value of π over π plus one factorial times π₯ minus π to the power of π plus one. Note that we can choose any value of π as long as itβs greater than or equal to the maximum absolute value of the π plus oneth derivative of π of π₯ when π₯ is on the interval from π to π.

In practice, we choose π to be the maximum of the absolute value of the π plus oneth derivative on this interval because it constrains our error bound to be as small as possible. We could, however, choose π to be larger if we wanted. And this would mean our error bound is larger than it has to be, but still allowed. Now, whilst this might sound complicated, theyβre usually a nice way to decide what π should be. And at this stage, itβs probably best just to see what this looks like.

Find the Lagrange error bound when using the second Taylor polynomial of the function π of π₯ equals the square root of π₯ at π₯ equals four to approximate the value square root of five. Round your answer to five decimal places.

We begin by recalling that the Lagrange error bound satisfies the criteria that if the absolute value of the π plus oneth derivative of π of π₯ is less than or equal to sum π, then the absolute value of the remainder term π sub π of π₯ is less than or equal to the absolute value of π over π plus one factorial times π₯ minus π to the power of π plus one. Weβre going to begin by defining each part of our question. Weβre going to be using the second Taylor polynomial; thatβs π sub two of π₯. And that means the remainder term weβre interested in is π sub two of π₯. Weβre finding the polynomial for π of π₯ at π₯ equals four. So weβre going to let π be equal to four. And weβre using this to estimate the value of the square root of five.

Since π of π₯ is equal to the square root of π₯, weβre going to say that we can let π₯ be equal to five. Now, letβs go back to our definition. Notice that to find π, we need to find the π plus oneth derivative of π. Weβll write π of π₯ as π₯ to the power of one-half. And then weβre going to differentiate our function two plus one, which is equal to three times. We recall that to differentiate a term of this form, we multiply the entire term by the exponent and then reduce that exponent by one. So the first derivative π prime of π₯ is equal to a half times π₯ to the power of negative one-half. Then the second derivative is negative a half times a half π₯ to the power of negative three over two, which is negative one-quarter π₯ to the power of negative three over two.

Then the third derivative β remember, this is the one weβre trying to find β is negative three over two times negative one-quarter π₯ to the power of negative five over two. We simplifies to three-eighths times π₯ to the power of negative five over two. Weβll simplify this a little by writing it as three over eight times π₯ to the power of five over two. And then we see that weβre looking to maximise the absolute value of three over eight π₯ to the power of five over two on the interval between π and π₯. Thatβs between four and five. Now, we should be able to see that we can maximise the absolute value of three over eight π₯ to the power of five over two by making our denominator as small as possible.

So weβll set π₯ equal to four to achieve this. And we see that we need to find the absolute value of three over eight times four to the power of five over two. Well, this is actually positive before worrying about the absolute value sign. So we simply have three over 256. And we now have π. Weβre going to substitute it into our error abound formula, with the value of π being equal to two. Itβs the absolute value of three over 256 over two plus one factorial times π₯ minus π, which is five minus four to the power of two plus one. Well, this is equal to one over 512, which is approximately equal to 0.00195. And so the Lagrange error bound when using the second Taylor polynomial of the function π of π₯ equals the square root of π₯ at π₯ equals four to approximate value of the square root of five is 0.00195 correct of five decimal places.

Now, because the error bound we have calculated is so small, we can be reasonably sure that the second Taylor polynomial of our function approximates the value of the square root of five pretty well for inputs in the closed interval four to five. Weβll now consider how we can use the error abound formula to ensure a given level of accuracy from a Maclaurin series.

Determine the least degree of the Maclaurin polynomials π needed to approximate the value of sin of 0.3 with an error less than 0.001 using the Maclaurin series of π of π₯ equals sin of π₯.

We begin by recalling that the Lagrange error bound tells us that if the absolute value of the π plus oneth derivative of π is less than or equal to sum π, then the absolute value of the remainder term π sub π of π₯ is less than or equal to the absolute value of π over π plus one factorial times π₯ minus π to the power of π plus one. To answer this question then, weβll just begin by defining each part. Weβre not told the degree of our McLaurin polynomial. So weβll let π be equal to π? This is what weβre trying to find. Weβre told though that π of π₯ is equal to sin of π₯. And weβre finding the Maclaurin series for π of π₯. Thatβs the tailor series when π is equal to zero.

Weβre then going to use this to estimate the value of sin of 0.3. Now, since our function π of π₯ is equal to sin of π₯, we can say that weβre going to let π₯ be equal to 0.3. We want to ensure that our error bound is less than 0.001. So weβll start with this formula. Weβre going to replace π₯ with 0.3 and π with zero. And so we have the absolute value of π over π plus one factorial times 0.3 minus zero to the power of π plus one. And of course, we want this error to be less than 0.001. Letβs replace 0.3 minus zero with 0.3. And then we know that π is found by maximising the absolute value of the π plus oneth derivative on the interval between π and π₯.

So letβs find an expression for π by considering the π plus oneth derivative of our function. We know the π of π₯ is equal to sin of π₯. And when we differentiate sin of π₯, we get cos of π₯. So the first derivative π prime of π₯ is cos of π₯. Differentiating once more, we get negative sin of π₯. And then the third derivative π triple prime of π₯ is negative cos of π₯. We differentiate one more time. And we find that the fourth derivative is sin of π₯. And so we see we have a cycle. We want to generalise it. So weβre going to say that, in fact, cos of π₯ is equal to sin of π₯ plus π by two. Remember, thatβs simply because the sin and cos graphs are horizontal translations of one another.

We say that negative sin π₯ is equal to sin of π₯ plus π, negative cos π₯ is sin of π₯ plus three π by two, and sin of π₯ is equal to sin of π₯ plus two π. Now, in fact, if we write π as two π over two and two π as four π over two, we see that the πth derivative of π is sin of π₯ plus ππ over two. And so the π plus oneth derivative, which is what weβre looking for, is sin of π₯ plus π plus one π over two. We want to maximise the absolute value of sin of π₯ plus π plus one π over two on the closed interval zero to 0.3. Well, the largest value of sin of π₯ plus π plus one π over two is one. So weβre going to let π be equal to one.

Now, note that the maximum value of the trigonometric function sign on the interval between zero and 0.3 might not actually be one. But we do know it must be less than or equal to one. By letting π be equal to one, we know that our error bound might be larger than it has to be, but thatβs still allowed. Then our earlier inequation becomes the absolute value of one over π plus one factorial times 0.3 to the power of π plus one. And this must be less than or equal to 0.001. Now, in fact, this is always positive. So we no longer need the absolute value signs. And unfortunately, thereβs no nice way at this stage to solve this inequation. So instead, weβre going to try some values of π, knowing, of course, that it can take integer values only.

Weβll begin by letting π be equal to one. Then we have one over one plus one factorial times 0.3 to the power of one plus one. That gives us 0.045. Now, actually, thatβs not less than 0.001, but weβre close. Next, letβs try π equals two. We get one over two plus one factorial times 0.3 to the power of two plus one. Thatβs 0.0045, again not quite less than 0.001, but, again, getting closer. Letβs try π equals three. We get one over three plus one factorial times 0.3 to the power of three plus one. Thatβs 0.0003375, which is indeed less than 0.001. And we can, therefore, say that the value of π which ensures that the Maclaurin series approximates sin of 0.3 with an error less than 0.001 is π equals three.

In this video, weβve learned that Lagrange error bound tells us that if the absolute value of the π plus oneth derivative of π is less than or equal to sum π, then the absolute value of π sub π of π₯ β thatβs the remainder term β is less than or equal to the absolute value of π over π plus one factorial times π₯ minus π to the power of π plus one. We saw that we generally choose π to be the maximum of the absolute value of the π plus oneth derivative on our interval, but that we can choose π to be larger if we wanted. And this just means our error bound is larger than it needs to be, but still allowed.

## Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

• Interactive Sessions
• Chat & Messaging
• Realistic Exam Questions