0% found this document useful (0 votes)
3 views

Lecture 18 Polynomial approximations I - Copy

The lecture discusses polynomial approximations, specifically focusing on linear and quadratic approximations of functions using Taylor series. It explains how calculators approximate values of functions like cosine and exponential functions by using tangent lines and parabolas to match the function's behavior near a specific point. Examples illustrate the accuracy of these approximations and highlight that accuracy decreases as the input moves further from the base point.

Uploaded by

pia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture 18 Polynomial approximations I - Copy

The lecture discusses polynomial approximations, specifically focusing on linear and quadratic approximations of functions using Taylor series. It explains how calculators approximate values of functions like cosine and exponential functions by using tangent lines and parabolas to match the function's behavior near a specific point. Examples illustrate the accuracy of these approximations and highlight that accuracy decreases as the input moves further from the base point.

Uploaded by

pia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Taylor Series

Lecture 18

Polynomial Approximations I

Lecturer Dr Pieter Uys


Have you ever wondered how your calculator gets answers for things like cos 0.3, or 𝑙𝑙𝑙𝑙𝑙𝑙5 7.2 ?

Your calculator cannot possibly draw a unit circle, set up angle of 0.3 radians and then measure, 𝑥𝑥,
the base side of the right-angle triangle:

1
0.3
𝑥𝑥

Instead, your calculator makes an approximation !

Let’s see how this is achieved.


Let’s start with some hypothetical function 𝑓𝑓 𝑥𝑥 . Suppose the graph for this function is as shown and we
know the value of the function at 𝑥𝑥 = 𝑎𝑎 :

𝑐𝑐
𝑓𝑓(𝑎𝑎)

𝑎𝑎 𝑏𝑏
How can we get an approximation to the value of the function at 𝑥𝑥 = 𝑏𝑏 ?
The easiest way to approximate 𝑓𝑓 𝑏𝑏 is to make use of the tangent line at 𝑥𝑥 = 𝑎𝑎.
Then 𝑓𝑓 𝑏𝑏 ~𝑐𝑐. This approximation won’t be too bad provided b is close to a.
𝑐𝑐−𝑓𝑓 𝑎𝑎
Now = 𝑓𝑓 ′ (𝑎𝑎) So, 𝑐𝑐 − 𝑓𝑓 𝑎𝑎 = 𝑓𝑓 ′ (𝑎𝑎)(𝑏𝑏 − 𝑎𝑎) Hence 𝑐𝑐 = 𝑓𝑓 𝑎𝑎 + 𝑓𝑓 ′ (𝑎𝑎)(𝑏𝑏 − 𝑎𝑎)
(𝑏𝑏−𝑎𝑎)

𝑓𝑓 𝑏𝑏 ~ 𝑓𝑓 𝑎𝑎 + 𝑓𝑓 ′ (𝑎𝑎)(𝑏𝑏 − 𝑎𝑎) Linear approximation about 𝑎𝑎


We write 𝑓𝑓̃ 𝑥𝑥 = 𝑓𝑓 𝑎𝑎 + 𝑓𝑓 ′ (𝑎𝑎)(𝑥𝑥 − 𝑎𝑎)

𝑓𝑓̃ 𝑥𝑥 is the linear approximating function for 𝑓𝑓 𝑥𝑥

We should not expect this approximation to work well if 𝑥𝑥 is too far from a !

Example 1 Find the linear approximating function for 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 𝑥𝑥 about 0. Use it to estimate 𝑒𝑒 0.1 and 𝑒𝑒 0.2

Ans: 𝑒𝑒 𝑥𝑥 ~ 𝑒𝑒 0 + 𝑒𝑒 0 𝑥𝑥 − 0 = 1 + 𝑥𝑥.

So 𝑒𝑒 0.1 ~ 1 + 0.1 = 1.1 Accurate answer 1.105 170…. Approx is out by 0.005 170

𝑒𝑒 0.2 ~ 1 + 0.2 = 1.2 Accurate answer 1.221 402…. Approx is out by 0.021 402 error is much greater

It is obvious that one reason the approximation deteriorates as 𝑥𝑥 moves further away from the base point
𝑎𝑎 is that the graph of the given function is not a straight line but curves away from the tangent.

How about using a parabola instead of the tangent at 𝑎𝑎 ?


Then we can try and match the curvature of the graph of the function as well as the slope:
Best Quadratic approximation to 𝒇𝒇 𝒙𝒙 with base point 𝒂𝒂 Theory for interest only

𝑐𝑐
𝑓𝑓(𝑎𝑎)

𝑎𝑎 𝑥𝑥

The standard form for the equation of a parabola is 𝑓𝑓 𝑥𝑥 = 𝑎𝑎𝑥𝑥 2 + 𝑏𝑏𝑏𝑏 + 𝑐𝑐

However, this turns out not to be a convenient format for our present purposes. Rather write the equation for
the approximating parabola as

𝑓𝑓̃ 𝑥𝑥 = 𝑐𝑐0 + 𝑐𝑐1 𝑥𝑥 − 𝑎𝑎 + 𝑐𝑐2 𝑥𝑥 − 𝑎𝑎 2


(1)

Here 𝑎𝑎 is the base point i.e., the value of 𝑥𝑥 for which we know 𝑓𝑓 𝑥𝑥
𝑓𝑓̃ 𝑥𝑥 = 𝑐𝑐0 + 𝑐𝑐1 𝑥𝑥 − 𝑎𝑎 + 𝑐𝑐2 𝑥𝑥 − 𝑎𝑎 2 (1)
We must have 𝑓𝑓̃ 𝑎𝑎 = 𝑓𝑓 𝑎𝑎
In (1) let 𝑥𝑥 = 𝑎𝑎. Then 𝒇𝒇� 𝒂𝒂 = 𝑐𝑐0 + 𝑐𝑐1 𝑎𝑎 − 𝑎𝑎 + 𝑐𝑐2 𝑎𝑎 − 𝑎𝑎 2
= 𝒄𝒄𝟎𝟎
But we want 𝑓𝑓̃ 𝑎𝑎 = 𝑓𝑓 𝑎𝑎 , so, 𝑓𝑓 𝑎𝑎 = 𝑓𝑓̃ 𝑎𝑎 = 𝑐𝑐0 i.e. 𝒄𝒄𝟎𝟎 = 𝒇𝒇 𝒂𝒂
We should also have the slope of the parabola the same as the slope of the graph of 𝑓𝑓 𝑥𝑥 at 𝑥𝑥 = 𝑎𝑎.

Differentiate (1): 𝑓𝑓̃′ 𝑥𝑥 = 𝑐𝑐1 + 2 𝑐𝑐2 𝑥𝑥 − 𝑎𝑎 (2)


And at 𝑥𝑥 = 𝑎𝑎 : 𝑓𝑓̃ ′ 𝑎𝑎 = 𝑐𝑐1 + 2 𝑐𝑐2 𝑎𝑎 − 𝑎𝑎 = 𝑐𝑐1 so, 𝑐𝑐1 = 𝑓𝑓̃ ′ 𝑎𝑎 .

We want 𝑓𝑓̃ ′ 𝑎𝑎 = 𝑓𝑓𝑓 𝑎𝑎 . So, 𝒄𝒄𝟏𝟏 = 𝑓𝑓̃ ′ 𝑎𝑎 = 𝒇𝒇𝒇 𝒂𝒂


We also want the concavity of the parabola the same as the concavity of the graph of 𝑓𝑓 𝑥𝑥 at 𝑥𝑥 = 𝑎𝑎.
Differentiate (2): 𝑓𝑓̃ ′′ 𝑥𝑥 = 2 𝑐𝑐2
1 𝟏𝟏
And at 𝑥𝑥 = 𝑎𝑎 : 𝑓𝑓̃ ′′ 𝑎𝑎 = 2 𝑐𝑐2 so, 𝒄𝒄𝟐𝟐 = 𝑓𝑓̃ ′′ 𝑎𝑎 = 𝒇𝒇′′ 𝒂𝒂
2 𝟐𝟐
1 ′′
So, we now have in (1) 𝑓𝑓̃ 𝑥𝑥 = 𝑐𝑐0 + 𝑐𝑐1 𝑥𝑥 − 𝑎𝑎 + 𝑐𝑐2 𝑥𝑥 − 𝑎𝑎 2
= 𝑓𝑓 𝑎𝑎 + 𝑓𝑓 ′ 𝑎𝑎 𝑥𝑥 − 𝑎𝑎 + 𝑓𝑓 𝑎𝑎 𝑥𝑥 − 𝑎𝑎 2
2
1 ′′
̃ ′
𝑓𝑓 𝑥𝑥 = 𝑓𝑓 𝑎𝑎 + 𝑓𝑓 𝑎𝑎 𝑥𝑥 − 𝑎𝑎 + 𝑓𝑓 𝑎𝑎 𝑥𝑥 − 𝑎𝑎 2
2
Example 2 Find the best quadratic approximation to ln 𝑥𝑥 + 1 at 𝑥𝑥 = 0 and use it to get an approximation
for 𝑙𝑙𝑙𝑙𝑙.2
Ans: 𝑓𝑓 𝑥𝑥 = ln 𝑥𝑥 + 1 𝑓𝑓 ′ 𝑥𝑥 = 𝑥𝑥 + 1 −1
𝑓𝑓 ′′ 𝑥𝑥 = − 𝑥𝑥 + 1 −2

1
So, in 𝑓𝑓̃ 𝑥𝑥 = 𝑓𝑓 𝑎𝑎 + 𝑓𝑓 ′ 𝑎𝑎 𝑥𝑥 − 𝑎𝑎 + 𝑓𝑓 ′′ 𝑎𝑎 𝑥𝑥 − 𝑎𝑎 2
2
1
We have 𝑓𝑓̃ 𝑥𝑥 = 𝑓𝑓 0 + 𝑓𝑓 ′ 0 𝑥𝑥 − 0 + 𝑓𝑓 ′′ 0 𝑥𝑥 − 0 2
2

−1
1 −2 2
= ln 0 + 1 + 0 + 1 𝑥𝑥 − 0 − 0+1 𝑥𝑥 − 0
2
1
= 0 + 𝑥𝑥 − 𝑥𝑥 2
2
1
So ln 1.2 = ln 𝑥𝑥 + 1 = ln 0.2 + 1 ~ 0.2 − 0.2 2
= 0.1800 Accurate value is 0.1823
2

1 1
But our best quadratic approximation for 𝑙𝑙𝑙𝑙𝑙 is 𝑥𝑥 − 𝑥𝑥 2 = 1 − 12 = 0.5
2 2
The more accurate approximation is 0.6931

This shows again that our approximating quadratic gives less accurate values the further we move
away from the base point.

You might also like