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.