# Power series, Taylor series and Functions

Since recently I am dealing with numerical solution of differential equation, I recalled that not long time ago I’ve actually learned about $e^x$ and Euler’s equation. They should be close related to the differential equation topic. So let’s review some of the conclusions I learned from the book: “オイラーの公式がわかる”.

(A series doesn’t need to have a variable $x$ in it: a infinite series of numbers $S=a_0+a_1+a_2+a_3...+a_n+a_{n+1}...$ can be a series.)

### Power series

In mathematics, a power series (in one variable) is an infinite series of the form:

where $a_n$ represents the coefficient of the nth term and c is a constant. In many situations c (the center of the series) is equal to zero, for instance when considering a Maclaurin series. In such cases, the power series takes the simpler form:

### Use a power series to generate a function

Suppose we have an arbitrary function $f(x)$. We can use a power series to approximate the function in the following way:

The power series takes the form:

Since $f(x)\|x=0$ should equal to $\sum_{n=0}^\infty a_nx^n\|_{x=0}=a_0$

Thus:

In a similar fashion, we differentiate the function once and $f'(x)\|x=0$ should equal to $(\sum_{n=0}^\infty a_nx^n)'\|_{x=0}=a_1$

So:

Repeat this algorithm one more time and we will find:

Finally the general form gives:

### Taylor series

In fact, we just derived the Taylor series near 0 for $f(x)$.

where

Use such a technique, we can find the Taylor series of $sin(x)$ and $cos(x)$ (again, near 0):

(The fact that $sin(x)$ is odd and $cos(x)$ is even could also be found out from right hand side!)

Written on June 6, 2016