Section 9.7 Maclaurin and Taylor Polynomials
If we go back to what we learned in Calculus I, what is the equation of the tangent line for \(f(x)\) at \(x = a\text{?}\)
\begin{equation*}
y = f(a) = f'(a) (x - a)
\end{equation*}
We also know that the tangent line approximation near \(x = a\) is
\begin{equation*}
f \approx f(a) + f'(a)(x - a)
\end{equation*}
If we wanted the exact value we need to add an error term. With this added we get:
\begin{equation*}
f(x) = f(a) + f'(a)(x - a) + \overbrace{E_1(x)}^{\text{error term}}
\end{equation*}
The error term in this equation would be:
\begin{equation*}
E_1(x) \approx \dfrac{f''(a)}{2}(x - a)^2
\end{equation*}
We continue this trend in Calculus II. To get a closer approximation we can use:
\begin{equation*}
f \approx f(a) + f'(a)(x - a) + \dfrac{f''(a)}{2}(x - a)^2
\end{equation*}
In order for this to be exact we would need to add another error term:
\begin{equation*}
f(x) = f(a) + f'(a)(x - a) + \dfrac{f''(a)}{2}(x - a)^2 + E_2(x)
\end{equation*}
where \(E_2(x)\) is
\begin{equation*}
E_2(x) \approx \dfrac{f'''(a)}{6}(x - a)^3
\end{equation*}
Definition 9.7.1.
A Taylor Polynomial of degree \(n\) appoximating \(f(x)\) for \(x\) near \(a\) (centered at \(x = a\)):
\begin{equation*}
f(x) \approx P_n(x) = f(a) + f'(a)(x - a) + \dfrac{f''(a)}{2!}(x - a)^2 + \dots \dfrac{f^{(n)}}{n!}(x - a)^n
\end{equation*}
NOTE: when centered at \(x = 0\text{,}\) this is also called the degree \(n\) Maclaurin Polynomial
Example 9.7.1.
Find the degree \(1, 5, \text{ and } 6\) Taylor Polynomials for \(f(x) = \cos(x)\) centered around \(x = 0\text{:}\)
\begin{align*}
f(x) \amp = \cos(x)\\
f'(x) \amp = - \sin(x)\\
f''(x) \amp = - \cos(x) \\
f'''(x) \amp = \sin(x) \\
f^{(4)}(x) \amp = \cos(x)\\
f^{(5)}(x) \amp = - \sin(x)\\
f^{(6)}(x) \amp = - \cos(x)
\end{align*}
\begin{align*}
f(0) \amp = 1\\
f'(0) \amp = 0\\
f''(0x) \amp = -1 \\
f'''(0x) \amp = 0 \\
f^{(4)}(0) \amp = 1\\
f^{(5)}(0) \amp = 0\\
f^{(6)}(0) \amp = -1
\end{align*}
\begin{align*}
P_1(x) \amp = 1 + 0(x - 0)\\
\amp = 1\\
\amp\\
P_5(x) \amp = 1 + 0(x - 0) + \dfrac{-1}{2!}(x - 0)^2 + \dfrac{0}{3!}(x - 0)^3 + \dfrac{1}{4!}(x - 0)^4 + \dfrac{0}{5!}(x - 0)^5\\
\amp = 1 - \dfrac{1}{2!}x^2 + \dfrac{1}{4!}x^4\\
\amp\\
P_6(x) \amp = 1 - \dfrac{1}{2!}x^2 + \dfrac{1}{4!}x^4 + \dfrac{-1}{6!}(x-0)^6\\
\amp = 1 - \dfrac{1}{2!}x^2 + \dfrac{1}{4!}x^4 - \dfrac{1}{6!}x^6
\end{align*}