# Differential equations/Power series solutions

 Educational level: this is a tertiary (university) resource.
 Type classification: this is a lesson resource.
 Subject classification: this is a mathematics resource.
 Completion status: this resource is ~25% complete.

### Definition

A power series solution to a differential equation is a function with infinitely many terms, each term containing a different power of the dependent variable. The general solution has the form ${\displaystyle y=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+\cdots }$  .

### Solution

To illustrate how to use the power series method to arrive at a solution, let's take the equation ${\displaystyle y''+x^{2}y'+xy=0}$  .

1. Start with the general form of the power series: ${\displaystyle y=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+\cdots }$
2. Take derivatives of the general power series until an equation exists for every order of derivative in the equation. You can shift the nth term so that all the terms end with ${\displaystyle x^{n}}$  . For example,
1. ${\displaystyle y'=a_{1}+2a_{2}x+\cdots +na_{n}x^{n-1}}$  or in alternative form, ${\displaystyle y'=a_{1}+2a_{2}x+\cdots +(n+1)a_{n+1}x^{n}}$

2. ${\displaystyle y''=2a_{2}+3\cdot 2a_{3}x+\cdots +(n+2)(n+1)a_{n+2}x^{n}}$
3. To find a "recursive" solution, compare the general nth terms of each equation and substitute them into the original differential equation. If there are dependent variables in the differential equation, you might have to alter the nth term to get all the powers of the dependent variable the same. For example:
1. ${\displaystyle y''=(n+2)(n+1)a_{n+2}x^{n}}$

2. ${\displaystyle x^{2}y'=x^{2}\lbrack (n-1)a_{n-1}x^{n-2}\rbrack =(n-1)a_{n-1}x^{n}}$

3. ${\displaystyle xy'=x\lbrack a_{n-1}x^{n-1}=a_{n-1}x^{n}\rbrack }$

4. ${\displaystyle \lbrack (n+2)(n+1)a_{n+2}x^{n}\rbrack +\lbrack (n-1)a_{n-1}x^{n}\rbrack +\lbrack a_{n-1}x^{n}\rbrack =0}$

4. Divide by the ${\displaystyle x^{n}}$  term and solve for the highest subscript coefficient (${\displaystyle a_{n+2}={\frac {-na_{n-1}}{(n+1)(n+2)}},n=1,2,3,\cdots }$  ).

5. Successive iterations produce more terms in the solution. For example:
1. For ${\displaystyle n=1:a_{3}={\frac {-a_{0}}{2\cdot 3}}=-{\frac {a_{0}}{3!}},n=2:a_{4}={\frac {-2a_{1}}{3\cdot 4}}=-{\frac {(2)^{2}a_{1}}{4!}},\cdots }$

2. Some terms, like ${\displaystyle a_{2}}$ , do not exist because ${\displaystyle n=0}$  for that case.
6. Sometimes the solution can be split up into two or more functions, each dependent on a base coefficient. For example:
1. ${\displaystyle y=y_{1}(x)+y_{2}(x)}$
2. ${\displaystyle y_{1}(x)=a_{0}-{\frac {a_{0}}{3!}}x^{3}+{\frac {(4)^{2}a_{0}}{4!}}x^{6}-{\frac {(4)(7)a_{0}}{7!}}x^{9}+\cdots }$
3. ${\displaystyle y_{2}(x)=a_{1}x-{\frac {(2)^{2}a_{1}}{4!}}x^{4}+{\frac {(2)^{2}(5)^{2}a_{1}}{7!}}x^{7}-{\frac {(2)(5)(8)a_{1}}{10!}}x^{10}+\cdots }$