Series solution to this differential equation $$ y' - e^{x^2}y = 0 $$
I've learned how to get the series solution for such differential equations when the multiplicating function is polynomial, but I have no clue what to do with another function.  Here's what I've tried :
$$ \sum_1^\infty na_nx^{n-1} - e^{x^2}\sum_0^\infty a_nx^n = 0$$
$$ \sum_0^\infty (n+1)a_{n+1}x^n - e^{x^2}\sum_0^\infty a_nx^n = 0$$
Then I'm stuck because I don't know what to do with the exponential function.  If it was polynomial, I could simply distribute it in the sum and do a variable change, but how can I treat a such case?
Thank you.
Actually, I only need to find the first few terms, not the general solution to it (which is probably complicated).  
 A: We'll do a power series expansion about $x=0$. 
Let $\displaystyle y(x)=\sum_{n=0}^\infty a_nx^n$ so that $\displaystyle y'(x)=\sum_{n=1}^\infty a_nnx^{n-1}$. 
Note that $\displaystyle e^{x^2} =\sum_{n=0}^\infty {(x^2)^n\over n!}=\sum_{n=0}^\infty {x^{2n}\over n!}$. 
Substituting these back into the given ODE, we have
\begin{align}
y'-e^{x^2}y&=0\\
\sum_{n=1}^\infty a_nnx^{n-1} - \sum_{n=0}^\infty {x^{2n}\over n!} \sum_{n=0}^\infty a_nx^n&=0.
\end{align}
Expand the first few terms of each to obtain
\begin{align}
(a_1+2a_2x+3a_3x^2&+4a_4x^3+5a_5x^4+\cdots)\\
&-(1+x^2+{x^4\over 2!}+\cdots)(a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+\cdots)=0.
\end{align}
Then expand the product of the two series in the latter term,
\begin{align}
(a_1+2a_2x+3a_3x^2&+4a_4x^3+5a_5x^4+\cdots)\\
&-\left[(a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+\cdots) + (a_0x^2+a_1x^3+a_2x^4+\cdots)\right.\\
&+\left.({a_0\over 2!}x^4+{a_1\over 2!}x^5+{a_2\over 2!}x^6+\cdots)\right]=0,
\end{align}
and collect like terms:
\begin{align}
(a_1-a_0)+(2a_2-a_1)x&+(3a_3-a_2-a_0)x^2\\
&+(4a_4-a_3-a_1)x^3+(5a_5-a_4-a_2+{a_0\over 2!})x^4+\cdots=0.
\end{align}
Since the series on the left equals the series on the right, the corresponding coefficients in the series on the left must all be zero, which yields a recursive relation for $a_n$, $n\ge 1$:
\begin{align}
a_1-a_0=0 &\implies \color{blue}{a_1=a_0}\\
2a_2-a_1=0 &\implies \color{blue}{a_2=}{1\over 2}a_1=\color{blue}{{1\over 2}a_0}\\
3a_3-a_2-a_0=0 &\implies \color{blue}{a_3=}{a_2+a_0\over 2}=\color{blue}{{1\over 2}a_0}\\
4a_4-a_3-a_1=0 &\implies \color{blue}{a_4=}{a_3+a_1\over 4}=\color{blue}{{3\over 8}a_0}\\
5a_5-a_4-a_2+{a_0\over 2!}=0 &\implies \color{blue}{a_5=}{a_4+a_2-{a_0\over 2!}\over 5}=\color{blue}{{3\over 40}a_0}\\
&\quad\ \vdots
\end{align}
Note that we can find the value of $a_n$ (in terms of the parameter $a_0$) for any $n$ we desire from this recursive process.
Hence, the series solution we seek is given by
$$
\boxed{
y(x)=a_0\left(1+x+{1\over 2}x^2+{1\over 2}x^3+{3\over 8}x^4+{3\over 40}x^5+\cdots\right).}
$$
