# The Theory Behind Taylor Series

The Theory Behind Taylor Series Swapnil Sunil Jain April 23, 2006

The Theory Behind Taylor Series We first make a safe assumption that any function f(x) can be approximated with the help of an nth degree polynomial p(x). Thus,

 $\displaystyle f(x)\approx p(x)$ $\displaystyle=a_{n}x^{n}+a_{n-1}x^{n-1}+.\>.\>.\>+a_{4}x^{4}+a_{3}x^{3}+a_{2}x% ^{2}+a_{1}x+a_{0}$ (1)

Now all we need to do in order to know this function is to figure out the values of the coefficients $a_{n},a_{n-1},.\>.\>.\>,a_{4},a_{3},a_{2},a_{1},a_{0}$ of the polynomial p(x).

Getting $a_{0}$ is easy, we just set x = 0, and we get $a_{0}=p(0)$. However, getting the rest of the coefficients requires some trick. But before doing anything else, let’s just take the first few derivatives of the polynomial p(x):

 $\displaystyle p^{\prime}(x)$ $\displaystyle=$ $\displaystyle na_{n}x^{n-1}+.\>.\>.\>+4\cdot a_{4}x^{3}+3\cdot a_{3}x^{2}+2% \cdot a_{2}x+a_{1}$ $\displaystyle p^{\prime\prime}(x)$ $\displaystyle=$ $\displaystyle n(n-1)a_{n}x^{n-2}+.\>.\>.\>+4\cdot 3\cdot a_{4}x^{2}+3\cdot 2% \cdot a_{3}x+2\cdot a_{2}$ $\displaystyle p^{3}(x)$ $\displaystyle=$ $\displaystyle n(n-1)(n-2)a_{n}x^{n-3}+.\>.\>.\>+4\cdot 3\cdot 2\cdot a_{4}x+3% \cdot 2\cdot a_{3}$ $\displaystyle p^{4}(x)$ $\displaystyle=$ $\displaystyle n(n-1)(n-2)(n-3)a_{n}x^{n-4}+.\>.\>.\>+4\cdot 3\cdot 2\cdot a_{4}$ $\displaystyle.$ $\displaystyle.$ $\displaystyle.$

Now getting the next coefficient $a_{1}$ is easy! We just set x = 0 and we get $p^{\prime}(0)=a_{1}$. Similarly, setting x = 0 for all the rest of the derivatives we get:

 $\displaystyle p^{\prime\prime}(0)$ $\displaystyle=$ $\displaystyle 2\cdot a_{2}$ $\displaystyle p^{3}(0)$ $\displaystyle=$ $\displaystyle 3\cdot 2\cdot a_{3}$ $\displaystyle p^{4}(0)$ $\displaystyle=$ $\displaystyle 4\cdot 3\cdot 2\cdot a_{4}$ $\displaystyle.$ $\displaystyle.$ $\displaystyle.$

Hmmm… Do you see a pattern? The coefficient in front of the nth term seems to be n!. By this logic, the nth derivative of p(x) (evaluated at 0) should look like the following:

 $\displaystyle p^{n}(0)=n!\cdot a_{n}$

Solving for $a_{n}$, we get:

 $\displaystyle a_{n}=\frac{p^{n}(0)}{n!}$

By using this formula we can figure out all the coefficients (i.e. $a_{n},a_{n-1},.\>.\>.\>,a_{2},a_{1},a_{0}$) of the polynomial p(x) (and be able to approximate f(x)!). Thus, our original function (1), which was approximated by the polynomial p(x), could be written (in the form of a polynomial) as:

 $\displaystyle f(x)\approx p(x)=\frac{p^{n}(0)}{n!}x^{n}+\frac{p^{n-1}(0)}{(n-1% )!}x^{n-1}+...+\frac{p^{3}(0)}{3!}x^{3}+\frac{p^{2}(0)}{2!}x^{2}+\frac{p^{1}(0% )}{1!}x+\frac{p^{0}(0)}{0!}$

or in summation form as:

 $\displaystyle f(x)\approx\sum_{k=0}^{n}\frac{f^{k}(0)}{k!}x^{k}$ (2)

This is the nth-order Taylor series expansion of f(x) about the point x = 0. However, this is only an approximation. To get the exact form, we have to have an infinite series summing over all the possible integer values of k from 0 to infinity (i.e. an infinite degree polynomial)

 $\displaystyle f(x)=\sum_{k=0}^{\infty}\frac{f^{k}(0)}{k!}x^{k}$ (3)

Now, one more thing that we can do is to change the point of evaluation from x = 0 to x = a for some real value a. Thus, the Taylor series expansion of f(x) about a point x = a becomes the following (Note that setting a = 0 gives us back our above expression):

 $\displaystyle f(x)=\sum_{k=0}^{\infty}\frac{f^{k}(a)}{k!}{(x-a)}^{k}$ (4)
Title The Theory Behind Taylor Series TheTheoryBehindTaylorSeries1 2013-03-11 19:24:28 2013-03-11 19:24:28 swapnizzle (13346) (0) 1 swapnizzle (0) Definition