# How do you use a Taylor series to solve differential equations?

Oct 17, 2014

Let us solve $y ' ' + y = 0$ by Power Series Method.

Let $y = {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n}$, where ${c}_{n}$ is to be determined.

By taking derivatives,

$y ' = {\sum}_{n = 1}^{\infty} n {c}_{n} {x}^{n - 1} R i g h t a r r o w y ' ' = {\sum}_{n = 2}^{\infty} n \left(n - 1\right) {c}_{n} {x}^{n - 2}$

We can rewrite $y ' ' + y = 0$ as

${\sum}_{n = 2}^{\infty} n \left(n - 1\right) {c}_{n} {x}^{n - 2} + {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n} = 0$

by shifting the indices of the first summation by 2,

$R i g h t a r r o w {\sum}_{n = 0}^{\infty} \left(n + 2\right) \left(n + 1\right) {c}_{n + 2} {x}^{n} + {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n} = 0$

by combining the summations,

$R i g h t a r r o w {\sum}_{n = 0}^{\infty} \left[\left(n + 2\right) \left(n + 1\right) {c}_{n + 2} + {c}_{n}\right] {x}^{n} = 0$,

$R i g h t a r r o w \left(n + 2\right) \left(n + 1\right) {c}_{n + 2} + {c}_{n} = 0$

$R i g h t a r r o w {c}_{n + 2} = - \frac{{c}_{n}}{\left(n + 2\right) \left(n + 1\right)}$

Let us look at even coefficients.

c_2={-c_0}/{2cdot1}=-c_0/{2!}
c_4={-c_2}/{4cdot3}={-1}/{4cdot3}cdot{-c_0}/{2!}=c_0/{4!}
c_6={-c_4}/{6cdot5}={-1}/{6cdot5}cdot c_0/{4!}=-{c_0}/{6!}
.
.
.
c_{2n}=(-1)^n{c_0}/{(2n)!}

Let us look at odd coefficients.

c_3={-c_1}/{3cdot2}=-{c_1}/{3!}
c_5={-c_3}/{5cdot4}={-1}/{5cdot4}cdot{-c_1}/{3!}={c_1}/{5!}
c_7={-c_5}/{7cdot6}={-1}/{7cdot6}cdot{c_1}/{5!}=-{c_1}/{7!}
.
.
.
c_{2n+1}=(-1)^n{c_1}/{(2n+1)!}

Hence, the solution can be written as:

$y = {\sum}_{n = 0}^{\infty} {c}_{n} {x}^{n}$

by splitting into even terms and odd terms,

$= {\sum}_{n = 0}^{\infty} {c}_{2 n} {x}^{2 n} + {\sum}_{n = 0}^{\infty} {c}_{2 n + 1} {x}^{2 n + 1}$

by pluggin in the formulas for ${c}_{2 n}$ and ${c}_{2 n + 1}$ we found above,

=c_0sum_{n=0}^infty(-1)^n{x^{2n}}/{(2n)!}+c_1 sum_{n=0}^infty(-1)^n{x^{2n+1}}/{(2n+1)!}

by recognizing the power series,

$= {c}_{0} \cos x + {c}_{1} \sin x$

I hope that this was helpful.