How do I solve the following differential equation 
$$\frac{d^2y}{dx^2}=x^2y$$

Solving it by writing out a characteristic equation is not helping me find the solution to the above equation. Any help would be appreciated thanks.

One way to do it is by expanding $y(x)$ as a series:
$$
y(x) = \sum_{n=0}^\infty c_n x^n
$$
We can then write $y''(x)$ as:
$$
y''(x) = \sum_{n=2}^\infty c_n n (n-1) x^{n-2}
$$
and $x^2 y(x)$ as:
$$
x^2 y(x) = \sum_{n=0}^\infty c_n x^{n+2}
$$
Now we re-parameterize the sums so they both have $x^n$ in the summation:
$$
y''(x) = \sum_{n=0}^\infty c_{n+2} (n+2) (n+1) x^n
$$
$$
x^2 y(x) = \sum_{n=2}^\infty c_{n-2} x^n
$$
Finally we equate the coefficients (while being careful about the limits of the sums):
$$
2 c_2 = 0
$$
$$
6 c_3 = 0
$$
$$
c_{n+2} (n+2) (n+1) = c_{n-2} \; \forall n \geq 2
$$
We can solve this by rewriting the last line as
$$
c_{n+4} = \frac{c_n}{(n+4)(n+3)} \; \forall n
$$
and noticing that we can come up with two clear independent solutions: one where $c_0 = 1$ and $c_1 = 0$, and vice versa. In either case, for any $n \equiv 2\mod 4$ or $n \equiv 3\mod 4$, we have $c_n = 0$.
The first solution becomes:
$$
y(x) = 1 + \frac{1}{12} x^4 + \frac{1}{672} x^8 + \cdots
$$
and the second solution is:
$$
y(x) = x + \frac{1}{20} x^5 + \frac{1}{1440} x^9 + \cdots
$$
