# Taylor Series – Definition, Expansion Form, and Examples

The Taylor series is an important infinite series that has extensive applications in theoretical and applied mathematics. There are instances when working with exponential and trigonometric functions can be challenging. This is when series expansions such as the Taylor series come in handy – these tricky functions can now be written as the sum of infinite polynomials!

The Taylor series is an infinite series that can be used to rewrite transcendental functions as a series with terms containing the powers of $\boldsymbol{x}$. In fact, through the Taylor series, we’ll be able to express a function using its derivatives at a single point.

Our discussion aims to introduce you to the Taylor series. You’ll also learn how this expansion was established and know the special cases possible for the Taylor series. We’ll also show you the common Taylor series expansions of different functions.

## What is a Taylor series?

The Taylor series of the function, $f(x)$, is its representation as an infinite series in which the terms are calculated from the values of the functions’ derivatives at each given point, $a$.

\begin{aligned}\textbf{Examples }&\textbf{of Taylor Series Expansion: }\\e^x &= 1 + x + \dfrac{x^2}{2!}+ \dfrac{x^3}{3!} +\dfrac{x^4}{4!}+…\phantom{xxx}\\\sin x&= x – \dfrac{x^3}{3!} +\dfrac{x^5}{5!} – \dfrac{x^7}{7!} +\dfrac{x^9}{9!}+ …\phantom{xxx}\end{aligned}

The two examples show how that through the Taylor series, we can express transcendental functions such as $e^x$ and $\sin x$ in terms of an infinite series containing the powers of $x$.

### Understanding the Taylor series formula

Suppose that we have a continuous function, $f(x)$, that has a power series representation. We’ve learned from our discussion of the power series that this function will have a form shown below.

\begin{aligned}f(x) &= \sum_{n = 0}^{\infty} a_n(x- c)^n \\&= a_0 + a_1(x – c) + a_2(x – c)^2 + a_3(x – c)^3 + a_4(x – c)^4+…, \phantom{xx} |x – a|<r,\end{aligned}

where $r$ is the radius of convergence. Now, observe what happens when we evaluate $f(x)$ when $x = c$.

\begin{aligned}f(c) &= a_0 + a_1(c – c) + a_2(c – c)^2 + a_3(c – c)^3 + a_4(c – c)^4+ …\\&= a_0\end{aligned}

We’ve learned in the past that $f(x)$ is also differentiable throughout the interval, $(c- r, c+ r)$. Hence, we have the following expression for $f^{\prime}(x)$.

\begin{aligned}f^{\prime}(x) &=  a_1+ 2a_2(x – c) + 3a_3(x – c)^2 + 4a_4(x – c)^3+…, \phantom{xx} |x – a|<r\end{aligned}

As from the previous step, substitute $x = c$ back into the expression.

\begin{aligned}f^{\prime}(c) &= a_1+ 2a_2(c – c) + 3a_3(c – c)^2 + 4a_4(c – c)^3+……\\&= a_1\end{aligned}

Apply the same process twice in a row, so we’ll have the expressions for $f^{\prime\prime}(x)$, $f^{\prime\prime \prime}(x)$, $f^{\prime\prime}(c)$,and $f^{\prime\prime \prime}(c)$:

 \begin{aligned}\boldsymbol{ f^{\prime\prime}(x)}\\ \boldsymbol{ f^{\prime\prime}(c)}  \end{aligned} \begin{aligned}f^{\prime\prime}(x) &=  2a_2 + 2\cdot 3a_3(x – c) + 3\cdot 4a_4(x – c)^2+ …, \phantom{xx} |x – a|

When you continue to differentiate the resulting expression then substitute $x= c$ into the derivative, you can find the $n$th coefficient of $a_n$ as shown below.

\begin{aligned}f^{(n)}(a) &= 2 \cdot 3 \cdot 4 \cdot … \cdot na_n \\ &= n!a_n\end{aligned}

Isolate $a_n$ on the left-hand side of the equation to find the expression of $a_n$’s $n$th coefficient.

\begin{aligned}a_n&= \dfrac{f^{(n)}(a)}{n!}\end{aligned}

This expression of $a_n$ is actually valid even when $n = 0$ and that’s because $0! = 1$ and $f^{(0)} = f$.

Now, let’s use this expression for $a_n$ back into our original power series, $f(x) = \sum_{n = 0}^{\infty} a_n(x- c)^n$ and you’ll end up with the Taylor series expansion.

 TAYLOR SERIES\begin{aligned}f(x) &= \sum_{n = 0}^{\infty} \dfrac{f^{(n)}(c)}{n!} (x – c)^n\\&= f(c) + \dfrac{f^{\prime}(c)}{1!}(x -c) + \dfrac{f^{\prime\prime}(c)}{2!}(x -c)^2 + \dfrac{f^{\prime\prime\prime}(c)}{3!}(x -c)^3 + …+\dfrac{f^{(n)}(c)}{n!}(x -c)^n + …\end{aligned}

The power series of $f(x)$ is what we call the Taylor series. When $c = 0$, we call the series the Maclaurin series. The Maclaurin series has extensive application, so we also allotted a separate discussion for this topic. For now, let’s explore the other important concepts we’ll need to better understand the Taylor series and its components.

## How to do the Taylor series?

Finding the Taylor series expansion of a function can be as straightforward as differentiating the function consecutively and may be as complex as manipulating the expressions to find patterns. For now, let’s explore these two concepts before working on an application of the Taylor series.

### Understanding the remainder from the Taylor series

Suppose that $f(x)$ is a function so that $f^{(n + 1)}(x)$ exists for all values of $x$ within an interval containing $c$, we can approximate the remainder (or accuracy error) using the Taylor’s formula shown below.

\begin{aligned}f(x) &= f(c) + \dfrac{f^{\prime}(x)}{1!}(x -c) + \dfrac{f^{\prime\prime}(c)}{2!}(x -c)^2 + \dfrac{f^{\prime\prime\prime}(c)}{3!}(x -c)^3 + …+\dfrac{f^{(n)}(c)}{n!}(x -c)^n + R_n(x)\\\\R_n(x) &= \dfrac{f^{(n + 1)}(c )}{(n + 1)!} (x -c)^{n + 1},\end{aligned}

where $R_n(x)$ represents the Taylor approximation’s error.

### Understanding the Taylor’s theorem

Now, if $f(x)$ is a function with all its derivatives found within the interval, $(c- r, c + r)$. The Taylor series, $f(x) = f(c) + \dfrac{f^{\prime}(x)}{1!}(x -c) + \dfrac{f^{\prime\prime}(c)}{2!}(x -c)^2 + \dfrac{f^{\prime\prime\prime}(c)}{3!}(x -c)^3 + …$, represents the function, $f(x)$, on the interval, $(c- r, c + r)$ only when it satisfies the condition shown below.

\begin{aligned}\lim_{n \rightarrow \infty} R_n(x) &= 0\\\end{aligned}

The function, $R_n(x)$, represents the remainder function,$R_n(x) =\dfrac{f^{(n + 1)}(c )}{(n + 1)!} (x -c)^{n + 1}$. We need to confirm accuracy of our Taylor approximation by showing that $\lim_{n \rightarrow \infty} R_n(x) = 0$ for the function we’re working on is indeed true.

### Example of finding a function’s Taylor series expansion

Keep the following pointers in mind when finding a function’s Taylor series expansion:

• Find the first four derivatives of $f(x)$.
• Evaluate each of the first four derivatives of $f(x)$ at $x =c$. You may find the succeeding ones if you can’t observe any patterns just yet.
• Use the pattern you’ve observed to find an expression for $f^{(n)}(c)$.