Use the polynomial to approximate a value
The number e^0.5 without a calculator
The chalk curve shows \(e^x\). The orange curve is its Taylor polynomial at the center 0, which the long dashed line marks, and the Degree slider sets its degree.
The short dashed line marks the input \(x=0.5\). On it, the orange dot gives the polynomial's value and the chalk dot gives \(e^{0.5}\), so the red segment between them is the error.
Move the Degree slider from 1 to 3. The value changes from 1.5 to 1.625 and then to about 1.6458, so each new term makes the error smaller.
If you drag the short dashed line toward the center, the red segment shrinks. If you drag it away, the segment grows.
Any input near the center
The value you need is \(f(x)\), and the polynomial gives the nearby value \(\cy{P_n(x)}\). The error is the red segment between them.
The error is small when the input is close to the center, so that the distance \(\cy{x-a}\) is small. A higher degree \(n\) usually makes it smaller still.
Drag the short dashed line onto the long one at the center \(a\). The red segment has length 0 there at every degree, because every Taylor polynomial matches \(f\) at its center.
Notation
To approximate \(f(x)\), evaluate the polynomial at the same input.
\[f(x)\approx\cy{P_n(x)}\]The polynomial is in powers of \(\cy{x-a}\), so you substitute the distance from the center, not \(x\) itself.
If the center is 0, then \(x-a\) equals \(x\).
Keep only the terms up to the requested degree, because another degree gives a different value.
The polynomial matches \(f\) at the center, so the error grows as the input moves away from the center.
When it fails
At \(x=2\) the polynomial of degree 3 gives 6.33, but \(e^2\approx7.39\), so the red segment is long.
The input 2 is far from the center 0. A higher degree or a center closer to the input makes the error smaller.
Example 1: the logarithm of 1.2
The Taylor polynomial of degree 3 for \(\ln x\) at the center 1 is \(P_3(x)=(x-1)-\tfrac12(x-1)^2\) \(+\tfrac13(x-1)^3\). Approximate \(\ln 1.2\).
The input is \(x=1.2\) and the center is 1, so the distance from the center is 0.2.
\[x-1=0.2\]Substitute 0.2 for each \(x-1\).
\[\begin{aligned}P_3(1.2)&=0.2-\tfrac12(0.2)^2\\&\quad+\tfrac13(0.2)^3\\&=0.2-0.02+\tfrac1{375}\end{aligned}\]Add the three terms to find \(\tfrac{137}{750}\). As a check, a calculator gives \(\ln1.2\approx0.18232\), so the error is about 0.0003.
\[\cy{P_3(1.2)}=\dfrac{137}{750}\approx0.18267\]
Example 2: the sine of 31 degrees
The Taylor polynomial of degree 2 for \(\sin x\) at the center \(\pi/6\) is \(P_2(x)=\tfrac12+\tfrac{\sqrt3}{2}\left(x-\tfrac{\pi}{6}\right)\) \(-\tfrac14\left(x-\tfrac{\pi}{6}\right)^2\). Approximate \(\sin31^\circ\).
The polynomial uses radians. Since \(30^\circ=\pi/6\), the input \(31^\circ\) is one degree from the center.
A tempting wrong move: Substitute 1 for the distance \(x-\pi/6\), because the distance is 1 degree.
\[\cr{\tfrac12+\tfrac{\sqrt3}{2}(1)-\tfrac14(1)^2\approx1.116}\]The sine is never larger than 1, but this value is. A distance of 1 means one radian, about 57 degrees, so the dashed line moves far from the center.
Change one degree to radians. One degree is \(\pi/180\) radian, which is about 0.01745.
\[x-\dfrac{\pi}{6}=\dfrac{\pi}{180}\]Substitute this distance. The term of degree 1 adds about 0.0151, and the term of degree 2 subtracts about 0.00008.
\[\begin{aligned}\cy{P_2}&=\dfrac12+\dfrac{\sqrt3\,\pi}{360}-\dfrac{\pi^2}{129600}\\&\approx0.51504\end{aligned}\]
Practice
The Taylor polynomial of degree 5 for \(\arctan x\) at 0 is \(x-\tfrac{x^3}{3}+\tfrac{x^5}{5}\). Use only the terms of degree 3 or less to approximate \(\arctan0.3\).
Set the slider to degree 3 to see the polynomial you need. The center is 0, so you substitute 0.3 itself.
Solution
Keep the terms of degree 3 or less.
\[P_3(x)=x-\dfrac{x^3}{3}\]Substitute \(x=0.3\).
\[\begin{aligned}P_3(0.3)&=0.3-\dfrac{0.027}{3}\\&=0.3-0.009=\cy{0.291}\end{aligned}\]As a check, a calculator gives \(\arctan0.3\approx0.29146\), so the error is about 0.0005.
Questions
The chalk curve is the cosine. The solid orange curve is its Taylor polynomial \(P_2\) at 0. The dashed orange curve is \(P_4\). Questions 1 and 2 use the figure.
Use \(P_2\) to approximate \(\cos2\). What value does \(P_2\) give?
- \(-1\)
- About \(-0.42\)
- 1
Answer
\(-1\)
At \(x=2\), which polynomial gives the better approximation of \(\cos2\)?
- \(P_4\), the dashed curve
- \(P_2\), the solid curve
- They are equally close
Answer
\(P_4\), the dashed curve
The Taylor polynomial of degree 2 for \(g(x)=\dfrac1{1+x}\) at 0 is \(1-x+x^2\). Use it to approximate \(\dfrac1{1.2}\).
- 0.84
- 1.24
- 0.8
Answer
0.84
Summary
You substitute the distance from the center into the Taylor polynomial, and you keep only the terms up to the degree the problem asks for.
The polynomial matches the function at the center, so the error is smaller for an input closer to the center or a higher degree.
You use the approximation when a value is hard to find directly and the input is near the center.
This is one of four skills in topic 10.11 of Which & Why: AP Calculus.