Home Up Forward Leave Message


Let's assume we have a continuous function $f(x)$ of which we can determine the derivative and even the second derivative etc. Now let's also assume that we can represent this function by an infinite series of the form:

$$ f(x) = c_0 + c_1 \cdot x + c_2 \cdot x^2 + c_3 \cdot x^3 + c_4 \cdot x^4 + .... + c_n \cdot x^n + c_{n+1} \cdot x^{n+1} + c_{n+2} \cdot x^{n+2} +..... $$
We are interested in infinite polynomials like this for at least all the known functions (and any other that we have a need for to estimate). This approach will however only be of value if the infinity sum actually converges even if it is at least for a specific range. In real live one can obviously only look at a finite number of terms which will accordingly lead to an approximation error. The Taylor Theorem also provides us with quantative estimates of this error.

Taylor Series centered around zero

If we take $x = 0$ then this series reduces into:
$$ \begin{aligned} f(0) & = c_0 + c_1 \cdot 0 + c_2 \cdot 0^2 + c_3 \cdot 0^3 + c_4 \cdot 0^4 + .... + c_n \cdot 0^n + c_{n+1} \cdot 0^{n+1} + c_{n+2} \cdot 0^{n+2} + .....\\ f(0) & = c_0\\ c_0 & = f(0) \end{aligned} $$
We have a value for $c_0$. Let's take the derivative of our series and repeat the replacement of $x$ with 0.
$$ \begin{aligned} {d \over dx}\left( f(x) \right) & = f^{(1)}(x)\\ & = c_1 + 2 \cdot c_2 \cdot x + 3 \cdot c_3 \cdot x^2 + 4 \cdot c_4 \cdot x^3 + .... + n \cdot c_n \cdot x^{n-1} + (n+1) \cdot c_{n+1} \cdot x^n + (n+2) \cdot c_{n+2} \cdot x^{n+1} + .....\\ f^{(1)}(0) & = c_1 + 2 \cdot c_2 \cdot 0 + 3 \cdot c_3 \cdot 0^2 + 4 \cdot c_4 \cdot 0^3 + .... + n \cdot c_n \cdot 0^{n-1} + (n+1) \cdot c_{n+1} \cdot 0^n + (n+2) \cdot c_{n+2} \cdot 0^{n+1} + .....\\ f^{(1)}(0) & = c_1\\ c_1 & = f^{(1)}(0) \end{aligned} $$
So now we have determined values for the first two unknowns in our desired series. But we can repeat the process now to determine $c_2$:
$$ \begin{aligned} f^{(2)}(x) & = 2 \cdot c_2 + 2 \cdot 3 \cdot c_3 \cdot x + 3 \cdot 4 \cdot x^2 + .... + (n-1) \cdot n \cdot c_n \cdot x^{n-2} + n \cdot (n+1) \cdot c_{n+1} \cdot x^{n-1} + (n+1) \cdot (n+2) \cdot c_{n+2} \cdot x^n + .....\\ f^{(2)}(0) & = 2 \cdot c_2 + 2 \cdot 3 \cdot c_3 \cdot 0 + 3 \cdot 4 \cdot 0^2 + .... + (n-1) \cdot n \cdot c_n \cdot 0^{n-2} + n \cdot (n+1) \cdot c_{n+1} \cdot 0^{n-1} + (n+1) \cdot (n+2) \cdot c_{n+2} \cdot 0^n + .....\\ f^{(2)}(0) & = 2 \cdot c_2\\ c_2 & = {{f^{(2)}} \over 2} \end{aligned} $$
You should be able to see a pattern emerging for the values, but let's do it one more time to confirm:
$$ \begin{aligned} f^{(3)}(x) & = 2 \cdot 3 \cdot c_3 \cdot x + 2 \cdot 3 \cdot 4 \cdot x + .... + (n-2) \cdot (n-1) \cdot n \cdot c_n \cdot x^{n-3} + (n-1) \cdot n \cdot (n+1) \cdot c_{n+1} \cdot x^{n-2} + n \cdot (n+1) \cdot (n+2) \cdot c_{n+2} \cdot x^{n-1} + .....\\ f^{(3)}(0) & = 2 \cdot 3 \cdot c_3 \cdot 0 + 2 \cdot 3 \cdot 4 \cdot 0 + .... + (n-2) \cdot (n-1) \cdot n \cdot c_n \cdot 0^{n-3} + (n-1) \cdot n \cdot (n+1) \cdot c_{n+1} \cdot 0^{n-2} + n \cdot (n+1) \cdot (n+2) \cdot c_{n+2} \cdot 0^{n-1} + .....\\ f^{(3)}(0) & = 2 \cdot 3 \cdot c_3\\ c_3 & = {{f^{(3)}} \over 3!} \end{aligned} $$
Remember that $2 \cdot 3 \cdot .... \cdot n = n!$ which is the factorial of $n$.

Thus we can safely deduce that:
$$ \begin{aligned} f^{(n)}(x) & = 2 \cdot 3 \cdot 4 ...... \cdot n \cdot c_n + 2 \cdot 3 \cdot 4 \cdot ....... \cdot (n+1) \cdot c_{n+1} \cdot x + 3 \cdot 4 \cdot ....... \cdot (n+2) \cdot c_{n+2} \cdot x^2 + .....\\ f^{(n)}(0) & = 2 \cdot 3 \cdot 4 ...... \cdot n \cdot c_n + 2 \cdot 3 \cdot 4 \cdot ....... \cdot (n+1) \cdot c_{n+1} \cdot 0 + 3 \cdot 4 \cdot ....... \cdot (n+2) \cdot c_{n+2} \cdot 0^2 + ..\\ f^{(n)}(0) & = 2 \cdot 3 \cdot 4 ...... \cdot n \cdot c_n\\ & = n! \cdot c_n\\ c_n & = {{f^{(n)}(0)} \over n!} \end{aligned} $$
And to prove this by induction let's see what happen if we do it one more time:
$$ \begin{aligned} f^{(n+1)}(x) & = 2 \cdot 3 \cdot 4 \cdot ....... \cdot (n+1) \cdot c_{n+1} + 2 \cdot 3 \cdot 4 \cdot ....... \cdot (n+2) \cdot c_{n+2} \cdot x + .....\\ f^{(n+1)}(0) & = 2 \cdot 3 \cdot 4 \cdot ....... \cdot (n+1) \cdot c_{n+1} + 2 \cdot 3 \cdot 4 \cdot ....... \cdot (n+2) \cdot c_{n+2} \cdot 0 + .....\\ f^{(n+1)}(0) & = 2 \cdot 3 \cdot 4 \cdot ...... \cdot (n+1) \cdot c_{n+1}\\ & = (n+1)! \cdot c_{n+1}\\ c_{n+1} & = {{f^{(n+1)}(0)} \over (n+1)!} \end{aligned} $$
We can replace our original series with the values that we have determined:
$$ \begin{aligned} f(x) & = c_0 + c_1 \cdot x + c_2 \cdot x^2 + c_3 \cdot x^3 + c_4 \cdot x^4 + .... + c_n \cdot x^n + c_{n+1} \cdot x^{n+1} + c_{n+2} \cdot x^{n+2} +.....\\ & = f(0) + f^{(1)}(0) \cdot x + f^{(2)}(0) \cdot {{x^2} \over 2!} + f^{(3)}(0) \cdot {{x^3} \over 3!} + ...... + f^{(n)}(0) \cdot {{x^n} \over n!} + ....\\ f(x) & = \sum_{j=0}^\infty f^{(j)}(0) \cdot {{x^j} \over j!} \end{aligned} $$
This series is called a Taylor Series centered around zero and this specific instance of the Taylor Series (centered around zero) is also called the Maclaurin Series.

Taylor Series centered around other values

Let's take our original series and write it a bit different:
$$ f(x) = c_0 + c_1 \cdot (x-a) + c_2 \cdot (x-a)^2 + c_3 \cdot (x-a)^3 + c_4 \cdot (x-a)^4 + .... + c_n \cdot (x-a)^n + c_{n+1} \cdot (x-a)^{n+1} + c_{n+2} \cdot (x-a)^{n+2} +..... $$
Instead of setting $x$ to zero, let's set it to $a$ now:
$$ \begin{aligned} f(a) & = c_0 + c_1 \cdot (a-a) + c_2 \cdot (a-a)^2 + c_3 \cdot (a-a)^3 + c_4 \cdot (a-a)^4 + .... + c_n \cdot (a-a)^n + c_{n+1} \cdot (a-a)^{n+1} + c_{n+2} \cdot (a-a)^{n+2} +.....\\ & = c_0 + c_1 \cdot 0 + c_2 \cdot 0^2 + c_3 \cdot 0^3 + c_4 \cdot 0^4 + .... + c_n \cdot 0^n + c_{n+1} \cdot 0^{n+1} + c_{n+2} \cdot 0^{n+2} +.....\\ & = c_0\\ c_0 & = f(a) \end{aligned} $$
We can start taking derivatives of the series and each time set $x = a$ and determine the coefficients of the terms of the series:
$$ \begin{aligned} f^{(1)}(x) & = c_1 + 2 \cdot c_2 \cdot (x-a) + 3 \cdot c_3 \cdot (x-a)^2 + 4 \cdot c_4 \cdot (x-a)^3 + .... + n \cdot c_n \cdot (x-a)^{n-1} + (n+1) \cdot c_{n+1} \cdot (x-a)^{n} + (n+2) \cdot c_{n+2} \cdot (x-a)^{n+1} +.....\\ f^{(1)}(a) & = c_1 + 2 \cdot c_2 \cdot 0 + 3 \cdot c_3 \cdot 0^2 + 4 \cdot c_4 \cdot 0^3 + .... + n \cdot c_n \cdot 0^{n-1} + (n+1) \cdot c_{n+1} \cdot 0^{n} + (n+2) \cdot c_{n+2} \cdot 0^{n+1} +.....\\ & = c_1\\ c_1 & = f^{(1)}(a)\\ f^{(n)}(x) & = n! \cdot c_n + 2 \cdot 3 \cdot ... \cdot (n+1) \cdot c_{n+1} \cdot (x-a) + 3 \cdot 4 \cdot ..... \cdot (n+2) \cdot c_{n+2} \cdot (x-a)^2 + ...\\ f^{(n)}(a) & = n! \cdot c_n\\ c_n & = {{f^{(n)}(a)} \over n!} \end{aligned} $$
By substituting the coefficients of our series with the values we have determined we get the following:
$$ \begin{aligned} f(x) & = f(a) + f^{(1)}(a) \cdot (x-a) + f^{(2)}(a) \cdot {{(x-a)^2} \over 2!} + f^{(3)}(a) \cdot {{(x-a)^3} \over 3!} + f^{(4)}(a) \cdot {{(x-a)^4} \over 4!} + .... + f^{(n)}(a) \cdot {{(x-a)^n} \over n!} +.....\\ f(x) & = \sum_{j=0}^\infty f^{(j)}(a) \cdot {{(x-a)^j} \over j!} \end{aligned} $$