Taylor and Maclaurin Polynomials

# Taylor and Maclaurin Polynomials

We are about to look at a new type of series known as Taylor and Maclaurin Series. Before we do so though, we should first introduce what a Taylor and Maclaurin Polynomial is. Recall from the Linear Approximation of Single Variable Functions page, that if $f$ is a differentiable function such that $f'(c)$ exists, then for $x$ near to $c$ we have that $f(x) \approx f(c) + f'(c)(x - c)$ and the linearization of $f$ at $c$ is the function:

(1)
$$L(x) = f(c) + f'(c)(x - c)$$

We will instead denote this function as $P_1(x) = \frac{f(c)}{0!} + \frac{f'(x)(x - c)}{1!}$. We note that this degree $1$ or less polynomial best approximates $f$ at $c$ since $P_1(c) = f(c)$ and $P_1'(c) = f'(c)$.

Now suppose that $f$ is a twice differentiable function. If we want a higher degree of accuracy in approximating $f$ with a polynomial $P$ for $x$ near $c$, then we can use a polynomial with degree $2$ or less, $P_2(x)$ which is obtained in a similar manner to the linearization:

(2)
\begin{align} \quad P_2(x) = \frac{f(c)}{0!} + \frac{f'(c)}{1!}(x - c) + \frac{f''(x)}{2!}(x - c)^2 \end{align}

Once again, we note that this degree $2$ or less polynomial best approximates $f$ at $c$ since $P_2(c) = f(c)$, $P_2'(c) = f'(c)$, and $P_2''(c) = f''(c)$.

Furthermore if $f$ is $n$ times differentiable, then we can use a polynomial of degree $n$ or less ($n ≥ 1$) to improve the accuracy in our approximation.

(3)
\begin{align} \quad P_n(x) = \frac{f(c)}{0!} + \frac{f^{(1)}(c)}{1!}(x - c) + \frac{f^{(2)}(c)}{2!}(x - c)^2 + ... + \frac{f^{(n)}(c)}{n!}(x - c)^n \end{align}

We can see that this degree $n$ or less polynomial best approximates $f$ at $c$ since $P_n(c) = f(c)$, $P_n'(c) = f'(c)$, …, $P^{(n)}(c) = f^{(n)}(c)$.

These polynomials $P_1$, $P_2$, …, $P_n$ has a special name which we formally define below.

 Definition: Let $f$ be a function that is $n$ times differentiable on an open interval containing $x = c$. Then the Taylor Polynomial of $f$ at $c$ is $P_n(x) = f(c) + \frac{f^{(1)}(c)}{1!}(x - c) + \frac{f^{(2)}(c)}{2!}(x - c)^2 + ... + \frac{f^{(n)}(c)}{n!} (x - c)^n$. If $c = 0$, then $P_n(x) = f(0) + \frac{f^{(1)}(0)}{1!}x + \frac{f^{(2)}(0)}{2!}x^2 + ... + \frac{f^{(n)}(0)}{n!} x^n$ is said to be the Maclaurin Polynomial of $f$ at $c$.

Let's look at some examples of finding Taylor/Polynomial polynomials for functions.

## Example 1

Find the third order Taylor polynomial for the function $f(x) = \sin x$ centered at $x = \pi$.

Using the formula directly we have that:

(4)
\begin{align} \quad P_3(x) = \sin (\pi) + \frac{\cos (\pi)}{1!} (x - \pi) + \frac{-\sin (\pi)}{2!} (x - \pi)^2 + \frac{- \cos (\pi)}{3!} (x - \pi)^3 \\ \quad P_3(x) = -(x - \pi) + \frac{(x - \pi)^3}{3!} \end{align}

The graph of $P_3$ is given below in green and the graph of $f(x) = \sin x$ is given below in blue.

## Example 2

Find the fourth order Taylor polynomial for the function $f(x) = \sqrt{x}$ centered at $x = 16$.

Using the formula directly we gave that:

(5)
\begin{align} \quad P_4(x) = \sqrt{16} + \frac{1}{1! * 2(16)^{1/2}}(x - 16) - \frac{1}{2! * 4(16)^{3/2}}(x - 16)^2 + \frac{3}{3! *8 (16)^{5/2}} (x - 16)^3 - \frac{15}{4! * 16 (16)^{7/2}}(x - 16)^4 \end{align}

The graph of $P_4$ is given below in yellow and the graph of $f(x) = \sqrt{x}$ is given below in red.