# How to find $a_0, a_1, a_2$ in a power series for an initial value problem?

Assume $y=\sum a_n x^n$. The ODE is $$y'' + (2 - 4x^2)y = 0$$

$y(0) = 1, y'(0) = 0$

$a_0 = 1, a_1 = 0, a_2 = -1$

-
What have you done? –  Pragabhava Nov 8 '12 at 0:24

First note that you can obtain $a_0$ and $a_1$ without going to the ODE itself. Note that since $y(x) = \displaystyle \sum_{n=0}^{\infty} a_n x^n$, $y(0)= a_0 = 1$ and $y'(x) = \displaystyle \sum_{n=0}^{\infty} na_n x^{n-1} = \sum_{n=1}^{\infty} na_n x^{n-1} \implies y'(0) = a_1 = 0$.

Further, $$y''(x) = \displaystyle \sum_{n=2}^{\infty} n(n-1)a_n x^{n-2} = \displaystyle \sum_{n=2}^{\infty} n(n-1)a_n x^{n-2} = \displaystyle \sum_{n=0}^{\infty} (n+2)(n+1)a_{n+2} x^{n}$$ Hence, the ODE becomes $$\displaystyle \sum_{n=0}^{\infty} (n+2)(n+1)a_{n+2} x^{n} + (2-4x^2) \displaystyle \sum_{n=0}^{\infty} a_n x^n = \sum_{n=0}^{\infty} \left((n+2)(n+1)a_{n+2} x^{n} + (2-4x^2)a_n x^n \right)$$ This gives us $$\sum_{n=0}^{\infty} \left((n+2)(n+1)a_{n+2} x^{n} + 2 a_n x^n -4a_n x^{n+2} \right) = 0$$ i.e. $$(2a_2 + 2a_0) + (6a_3+2a_1)x + \sum_{n=2}^{\infty} \left((n+2)(n+1)a_{n+2} x^{n} + 2 a_n x^n -4a_{n-2} x^{n} \right) = 0$$ Hence, we have the following \begin{align} a_0 & = 1\\ a_1 & = 0\\ a_2 & = - a_0 = -1\\ a_3 & = - \dfrac{a_1}3 = 0\\ a_{n} & = \dfrac{4a_{n-4} - 2a_{n-2}}{n(n-1)} & \forall n \geq 4 \end{align} This gives us that all the odd coefficients are $0$ and only the even coefficients remain. Hence, we have that $a_0 = 1$, $a_2 = -1$ and in general $$a_{2n} = \dfrac{4a_{2n-4} - 2 a_{2n-2}}{2n(2n-1)} \,\,\,\,\,\,\,\, \forall n \geq 2$$

-

To solve the differential equation using the power series technique, you assume the solution to have the form

$$y(x)=a_o + a_1 x + a_2 x^2+ \dots \,,$$

where $a_0,a_1,a_2,\dots$ are constants to be determined. On the other hand, the Taylor series of the function $y(x)$ at the point $x=0$ is given by

$$y(x)=y(0) + \frac{y'(0)}{1!} x + \frac{y''(0)}{2!} x^2+ \dots \,.$$

Now, compare the coefficients of powers of $x$, one can see that

$$a_0=y(0), \quad a_1 = y'(0), \quad a_2 = \frac{y''(0)}{2!}, \dots, a_n = \frac{y^{(n)}(0)}{n!} \,.$$

Using the given differential equation, you can find the $a_n$, by finding the $y^{(n)}(x)$ by successive differentiation of the differential equation. We find $a_2$ as

$$y''(x)= - (2 - 4x^2)y(x) \implies y''(0)=-(2-0)y(0) = -2$$

$$\implies a_2 = \frac{y''(0)}{2!}=\frac{-2}{2}=-1\,.$$

-