Home / AP Calculus AB and BC: Chapter 9 -Infinite Sequences and Series : 9.8 -Taylor Polynomial and Lagrange Error Bound Study Notes

AP Calculus AB and BC: Chapter 9 -Infinite Sequences and Series : 9.8 -Taylor Polynomial and Lagrange Error Bound Study Notes

Taylor Polynomial and Lagrange Error Bound

nth Taylor Polynomial and nth Maclaurin Polynomial
If a function $f$ has $n$ derivatives at $c$, then the polynomial
$
P_n(x)=f(c)+f^{\prime}(c)(x-c)+\frac{f^{\prime \prime}(c)}{2 !}(x-c)^2+\frac{f^{\prime \prime \prime}(c)}{3 !}(x-c)^3+\cdots+\frac{f^{(n)}(c)}{n !}(x-c)^n
$
is called the $\boldsymbol{n}$ th Taylor polynomial for $\boldsymbol{f}$ at $c$. If $c=0$, then
$
P_n(x)=f(0)+f^{\prime}(0) x+\frac{f^{\prime \prime}(0)}{2 !} x^2+\frac{f^{\prime \prime \prime}(0)}{3 !} x^3+\cdots+\frac{f^{(n)}(0)}{n !} x^n
$
is called the Maclaurin polynomial for $f$.

Guidelines for Finding a Taylor Polynomial

1. Differentiate $f(x)$ several times and evaluate each derivative at $c$.
$
f(c), f^{\prime}(c), f^{\prime \prime}(c), f^{\prime \prime \prime}(c), \cdots, f^{(n)}(c)
$

2. Use the sequence developed in the first step to form the Taylor coefficients
$
a_n=\frac{f^{(n)}(c)}{n !}
$

Example1

  • Let $f$ be the function given by $f(x)=\ln (2-x)$. Write the third-degree Taylor polynomial for $f$ about $x=1$ and use it to approximate $f(1.2)$.
▶️Answer/Explanation

Solution 

\begin{aligned}
& f(x)=\ln (2-x) \quad f(1)=\ln (2-1)=\ln 1=0 \\
& f^{\prime}(x)=\frac{-1}{2-x} \quad f^{\prime}(1)=\frac{-1}{2-1}=-1 \\
& f^{\prime \prime}(x)=\frac{-1}{(2-x)^2} \quad f^{\prime \prime}(1)=\frac{-1}{(2-1)^2}=-1 \\
& f^{\prime \prime \prime}(x)=\frac{-2}{(2-x)^3} \quad f^{\prime \prime \prime}(1)=\frac{-2}{(2-1)^2}=-2 \\
& P_3(x)=f(1)+f^{\prime}(1)(x-1)+\frac{f^{\prime \prime}(1)}{2 !}(x-1)^2+\frac{f^{\prime \prime \prime}(1)}{3 !}(x-1)^3 \\
& =-(x-1)-\frac{1}{2}(x-1)^2-\frac{1}{3}(x-1)^3 \\
& f(1.2) \approx P_3(1.2)=-(1.2-1)-\frac{1}{2}(1.2-1)^2-\frac{1}{3}(1.2-1)^3 \\
& \approx-.222666 \\
&
\end{aligned}

Lagrange Error Bound

If $f$ has $n+1$ derivatives at $c$ and $R_n(x)$ is the remainder term of the Taylor polynomial $P_n(x)$, then $f(x)=P_n(x)+R_n(x)$.
So $R_n(x)=f(x)-P_n(x)$ and the absolute value of $R_n(x)$ satisfies the following inequality.
$
\left|R_n(x)\right|=\left|f(x)-P_n(x)\right| \leq \max \left|f^{(n+1)}(k)\right| \cdot \frac{|x-c|^{n+1}}{(n+1) !},
$

where $\max \left|f^{(n+1)}(k)\right|$ is the maximum value of $f^{(n+1)}(k)$ between $x$ and $c$.

The remainder $R_n(x)$ is called the Lagrange Error Bound (or Lagrange form of the remainder).

Example 2

  • Let $f$ be the function given by $f(x)=\sin \left(3 x-\frac{\pi}{6}\right)$, and let $P(x)$ be the third-degree Taylor polynomial for $f$ about $x=0$.

(a) Find $P(x)$.

(b) Use the Lagrange error bound to show that $|f(0.2)-P(0.2)|<\frac{1}{100}$.

▶️Answer/Explanation

Solution 

(a)

$
\begin{array}{ll}
f(x)=\sin \left(3 x-\frac{\pi}{6}\right) & f(0)=\sin \left(-\frac{\pi}{6}\right)=-\frac{1}{2} \\
f^{\prime}(x)=3 \cos \left(3 x-\frac{\pi}{6}\right) & f^{\prime}(0)=3 \cos \left(-\frac{\pi}{6}\right)=\frac{3 \sqrt{3}}{2} \\
f^{\prime \prime}(x)=-9 \sin \left(3 x-\frac{\pi}{6}\right) & f^{\prime \prime}(0)=-9 \sin \left(-\frac{\pi}{6}\right)=\frac{9}{2} \\
f^{\prime \prime \prime}(x)=-27 \cos \left(3 x-\frac{\pi}{6}\right) & f^{\prime \prime \prime}(0)=-27 \cos \left(-\frac{\pi}{6}\right)=-\frac{27 \sqrt{3}}{2} \\
P(x)=-\frac{1}{2}+\frac{3 \sqrt{3}}{2} x+\frac{9 / 2}{2 !} x^2+\frac{-27 \sqrt{3} / 2}{3 !} x^3 \\
& =-\frac{1}{2}+\frac{3 \sqrt{3}}{2} x+\frac{9}{4} x^2-\frac{9 \sqrt{3}}{4} x^3
\end{array}
$

(b) 

$f^{(4)}(x)=81 \sin \left(3 x-\frac{\pi}{6}\right) \Rightarrow \max _{0 \leq k \leq 0.2}\left|f^{(4)}(k)\right|=81$ since the maximum value of sine and cosine functions is 1 . Therefore
$
\begin{aligned}
& |f(0.2)-P(0.2)| \leq \max _{0 \leq k \leq 0.2}\left|f^{(3+1)}(k)\right| \frac{(0.2-0)^{(3+1)}}{(3+1) !} \quad \begin{array}{l}
\text { The polynomial was created } \\
\text { at } x=0 \text { and the approximation } \\
\text { is made at } x=0.2 .
\end{array} \\
& \leq 81 \cdot \frac{(0.2)^4}{4 !}=81 \cdot \frac{0.0016}{24} \\
& =0.0054<\frac{1}{100}
\end{aligned}
$

Example3

  • Let $P(x)=\frac{1}{3}-\frac{2}{3} x+\frac{2}{3} x^2-\frac{4}{9} x^3+\frac{2}{9} x^4$ be the fourth-degree Taylor polynomial for the function $f$ about $x=0$. What is the value of $f^{(4)}(0)$ ?

(A) $-\frac{32}{3}$                                       

(B) $-\frac{4}{3}$                                               

(C) $\frac{8}{9}$                                                

(D) $\frac{16}{3}$\

▶️Answer/Explanation

Ans:D

Example4.

  • Let $P(x)=4-3 x^2+\frac{13}{12} x^4-\frac{121}{360} x^6$ be the sixth-degree Taylor polynomial for the function $f$ about $x=0$. What is the value of $f^{\prime \prime \prime}(0)$ ?

(A) $-\frac{121}{15}$                                                               

(B) $-\frac{3}{2}$                                                             

(C) 0                                          

(D) $\frac{121}{15}$

▶️Answer/Explanation

Ans:C

Example5

  • Let $f$ be a function that has derivatives of all orders for all real numbers. If $f(1)=2, f^{\prime}(1)=-3$, $f^{\prime \prime}(1)=4$, and $f^{\prime \prime \prime}(1)=-9$, which of the following is the third-degree Taylor polynomial for $f$ about $x=1$ ?

(A) $P(x)=2-3(x-1)+2(x-1)^2-\frac{3}{2}(x-1)^3$                        

(B) $P(x)=2-3(x+1)+2(x+1)^2-\frac{3}{2}(x+1)^3$               

(C) $P(x)=2-3(x-1)+4(x-1)^2-9(x-1)^3$                 

(D) $P(x)=2-3(x+1)+2(x+1)^2-3(x+1)^3$

▶️Answer/Explanation

Ans:A

Example 6

  • The third-degree Taylor polynomial of $x e^x$ about $x=0$ is

(A) $P_3(x)=x-\frac{1}{2} x^2+\frac{1}{6} x^3$

(B) $P_3(x)=x+x^2+\frac{1}{2} x^3$

(C) $P_3(x)=x+x^2-\frac{1}{3} x^3$

(D) $P_3(x)=1-x+\frac{1}{2} x^2-\frac{1}{6} x^3$

▶️Answer/Explanation

Ans:B

Scroll to Top