[Math] Please verify the power series solution to the differential equation $y”-xy’+y=0$.

ordinary differential equationsproof-verificationsequences-and-series

Please verify my answer to the following differential equation:
$$y''-xy'+y=0$$
Let $y = {\sum_{n=0}^\infty}C_nx^n$, then $y' = {\sum_{n=1}^\infty}nC_nx^{n-1}$ and $y''={\sum_{n=2}^\infty}n(n-1)C_nx^{n-2}$

Substituting this to the equation we get

$${\sum_{n=2}^\infty}n(n-1)C_nx^{n-2}-x{\sum_{n=1}^\infty}nC_nx^{n-1}+{\sum_{n=0}^\infty}C_nx^n = 0$$
$${\sum_{n=2}^\infty}n(n-1)C_nx^{n-2}-{\sum_{n=1}^\infty}nC_nx^n+{\sum_{n=0}^\infty}C_nx^n = 0$$

Getting the $x^n$ term on all the terms
$${\sum_{n=0}^\infty}(n+2)(n+1)C_{n+2}x^{n}-{\sum_{n=1}^\infty}nC_nx^n+{\sum_{n=0}^\infty}C_nx^n = 0$$

Getting the $0$th term from the first and the third summations we get
$$2C_2+C_0 + {\sum_{n=1}^\infty}(n+2)(n+1)C_{n+2}x^{n}-{\sum_{n=1}^\infty}nC_nx^n+{\sum_{n=1}^\infty}C_nx^n = 0$$

Factoring $x^n$ we get
$$2C_2+C_0 + {\sum_{n=0}^\infty}[(n+2)(n+1)C_{n+2}-nC_n+C_n]x^n= 0$$

i.$$2C_2+C_0 = 0 => C_2 = \frac{-C_0}{2}$$

ii.$$(n+2)(n+1)C_{n+2}-nC_n+C_n = 0$$

Therefore solving ii. for $C_{n+2}$
$$C_{n+2}=\frac{(n-1)C_n}{(n+2)(n+1)}, n=0,1,2,3,…$$

If $n = 0$,

$$C_2 = \frac{-C_0}{2!}$$

If $n=1$,

$$C_3 = 0$$

If $n=2$,

$$C_4 = \frac{C_2}{3*4} = \frac{-C_0}{4!}$$

If $n=3$,

$$C_5 = \frac{2C_3}{4*5}=0$$

If $n=4$,
$$C_6 = \frac{3C_4}{5*6} = \frac{-C_0}{6!}$$

Upon seeing the pattern we realize that if $n=2m$ then
$$C_{2m} = \frac{-C_0}{2m!}$$

And if $n=2m+1$ then
$$C_{2m+1} = 0$$

So the final answer would be
$$y = {\sum_{n=0}^\infty}C_nx^n => {\sum_{m=0}^\infty}\frac{-C_0*x^{2m}}{2m!}$$

Best Answer

Your equation is a second order linear equation so it should be a two-dimensional space of solutions (that is, solutions that depend on two free parameters) while your final answer depends only on one free parameter $C_0$ so this means you did something wrong.

Indeed, your equations don't determine what is $C_1$ which actually means that $C_1$ can be arbitrary. In addition, you made a mistake in deducing the general pattern. For example,

$$ C_6 = \frac{3}{6 \cdot 5} C_4 = -\frac{3}{6 \cdot 5} \frac{1}{4!} C_0 = -\frac{3C_0}{6!} \neq -\frac{C_0}{6!}.$$

In fact, we have

$$ C_{2m} = \frac{(2m-3)C_{2m-2}}{(2m)(2m-1)} = \frac{(2m-3)(2m-5)C_{2m-4}}{(2m)(2m-1)(2m-2)(2m-3)} = \dots = -\frac{(2m - 3)(2m - 5) \dots 1}{(2m)!} C_0 = - \frac{(2m - 3)(2m - 5) \dots 1}{(2m)(2m-1)(2m-2)(2m-3)(2m-4) \dots 1} C_0 = -\frac{C_0}{(2m-1)2^{m}m!}$$

and the general solution is given by

$$ y(x) = C_1 \cdot x - C_0 \sum_{m=0}^{\infty} \frac{x^{2m}}{(2m-1)2^m m!}. $$