Lecture 21 Taylor Polynomial Shortcuts
Text References: Course notes pp. 100-103 & Rogawski 10.7
21.1 Recap
Last time, we learned about the Taylor polynomial of a function centred at a point.
Exercise 21.1 Find the 2nd-order Taylor polynomial for \(f(x)=e^x\) centred at \(0\).
Solution. We have \[f'(x)=f''(x)=e^x\]
and \[f'(0)=f''(0)=1\]
then,
\[\begin{align*} P_{2,0}(x) &= f(0)+f'(0) x + \frac{1}{2!}f''(0)x^2\\ &= 1+x+\frac{1}{2}x^2 \end{align*}\]
21.2 Learning Objectives
- Find the \(n\)th order Taylor polynomial for a given function using appropriate shortcuts.
21.3 Uniqueness of Taylor Polynomials
Now that we’ve defined \(n\)th order Taylor polynomials, for some function \(f(x)\) centred at \(x_0\), we might ask ourselves whether the Taylor polynomials are unique. Let’s try to prove this.
Suppose that \(p(x)=a_0+a_1(x-x_0)+a_2(x-x_0)^2+\cdots +a_n(x-x_0)^n\) is a polynomial approximation of some function \(f(x)\) at point \(x_0\). We’re going to try to figure out the values of the coefficients \(a_0, a_1,\ldots, a_n\).
At \(x_0\), we have \(p(x_0)=a_0\); this should be equal to \(f(x_0)\), which means that \(a_0=f(x_0)\).
Now, let’s differentiate \(p(x)\) and evaluate at \(x_0\); this should be equal to \(f'(x_0)\). We have \[p'(x)=a_1+2a+2(x-x_0)+3a_3(x-x_0)^2+\cdots + n a_n(x-x_0)^{n-1}\] at \(x=x_0\), we’re left with \(p'(x_0)=a_1 = f'(x_0)\)
We can continue taking derivatives of \(p(x)\) and evaluating them at \(x=x_0\). As you might have guessed, we will get that \(a_n=\frac{1}{n!}f^{(n)}(x_0)\). So, indeed, the Taylor polynomial of a function centred at a point is unique!
Not only is the Taylor polynomial unique, but we now know that if we can find a polynomial which matches the values of \(f\) and its derivatives at a point, then that polynomial must be the Taylor polynomial!
Let’s state this more formally:
Theorem 21.1 Let \(p(x)=a_0+a_1(x-x_0)+\cdots +a_n(x-x_0)^n\). If \(p^{(k)}(x_0)=f^{(k)}(x_0)\) for all \(k=0, 1, 2,\ldots, n\), then \(p(x)=P_{n, x_0}(x)= \sum_{k=0}^n \frac{f^{(k)}(x_0)(x-x_0^k)}{k!}\)
21.4 Maclaurin polynomials
We give a special name to Taylor polynomials centred at zero:
Definition 21.1 A Maclaurin polynomial has the general form \(P_{n,0}(x)=\sum_{k=0}^n\frac{f^{(k)}(0)}{k!}x^k\)
A consequence of the result that we’ve discussed is the following:
Theorem 21.2 If \(p(x)\) is the \(n\)th degree Maclaurin polynomial for \(f(x)\), then \(p(k x^m)\) is the (\(mn\))th degree Maclaurin polynomial for \(f(kx^m)\).
Exercise 21.2 Find the 6th-order Maclaurin polynomial for \(g(x)=e^{x^3}\) centred at \(0\).
Solution. We notice that \(g(x)=f(x^3)\) where \(f(x)=e^x\). Since \(p(x)=1+x+\frac{x}{2}\) is the second degree Maclaurin polynomial for \(f(x)\), the sixth degree Maclaurin polynomial for \(g(x)=f(x^3)\) is \[q(x)= 1+x^3+\frac{1}{2}(x^3)^2 = 1+ x^3+\frac{1}{2}x^6\]
21.5 Other Shortcuts
Here are a few other ways to use Taylor polynomials. Suppose that \(p(x)\) is the \(n\)th order Taylor polynomial for \(f(x)\) centred at \(x_0\), that is, \[p(x_0)=f(x_0), \quad p'(x_0)=f'(x_0), \ldots, \quad p^{(n)}(x_0)=f^{(n)}(x_0)\] then,
- \(f'(x)\) can be approximated by \(p'(x)=P_{n-1,x_0}(x)\)
- \(\displaystyle \int f(x)dx\) can be approximated by \(\displaystyle \int p(x)dx = P_{n+1,x_0}(x)\) (but be careful with \(C\)!)