Find a function $f: \mathbb{R}\rightarrow \mathbb{R} $ so that $f(0)=1$ and $f'(x)=xf(x)$. find a function $f: \mathbb{R}\rightarrow \mathbb{R} $ so that $f(0)=1$ and $f'(x)=xf(x)$.
Its supposed to be a fairly simple question, however, I don't know how to find the uneven elements in the recurrence formula $(a_1, a_3,a_5...)$
On a side note, Our prof said $f(0)=a_0.$ Why is that true? 
Edit: Thanks everyone, but I forgot to mention that the question needs to be solved using the power series method. Can anyone solve it using that method?
 A: Provided $f(x)$ is never zero, we rewrite the de as $$\frac{f'(x)}{f(x)}=x$$
Now we can integrate both sides, to get $$\ln |f(x)|=\frac{1}{2}x^2+C$$
Exponentiating both sides we get the general solution $$|f(x)|=e^{0.5x^2+C}$$
we can rewrite as $e^{0.5x^2}e^C$, or $$f(x)=De^{0.5x^2}$$
(where $D$ is any nonzero constant)
Now, to satisfy $f(0)=1$ we need $1=f(0)=De^{0}=D$.  Hence $D=1$.
A: We can easily guess the function by examining the differential equation. Anything of the form $e^{g(x)}$ will satisfy $f'(x)=g'(x)e^{g(x)}$ by the chain rule and properties of $e^x$. After making this observation, we just note that we need $g'(x)=x$, so $g(x)=\frac{1}{2}x^2+C$. Thus we arrive at $$f(x)=e^Ce^{\frac{1}{2}x^2}=Ae^{\frac{1}{2}x^2}$$ Finally, notice that $f(0)=1$ is satisfied by this function when $C=0$, i.e. when $A=1$, so the answer is $f(x)=e^{\frac{1}{2}x^2}$
A: It is clear (and obtain from the previous answers) that $f(x)=\mathrm{e}^{x^2/2}$ is a solution of your problem. Let me explain why it is the only solution. 
Once again, you are looking for an $f:\mathbb R\to\mathbb R$, such that $f'(x)=xf(x)$ and $f(0)=1$. The differential equation is equivalent to
$$
f'(x)=xf(x)\quad\Longleftrightarrow\quad \mathrm{e}^{-x^2/2}\big(f'(x)-xf(x)\big)=0.
$$
The out of the blue function $g(x)=\mathrm{e}^{-x^2/2}$ is the integrating factor of our equation. But then we have
$$
\mathrm{e}^{-x^2/2}\big(f'(x)-xf(x)\big)=0\quad\Longleftrightarrow\quad 
\big(\mathrm{e}^{-x^2/2}f(x)\big)'=0,
$$
and hence if $f$ satisfies our equation, then $\mathrm{e}^{-x^2/2}f(x)$ is constant, for all $x\in\mathbb R$. Say $\mathrm{e}^{-x^2/2}f(x)=c$ or equivalently
$f(x)=c\mathrm{e}^{x^2/2}$. So far, we have shown that if $f$ satisfies our equation, then $f$ has to be of the form  $f(x)=c\mathrm{e}^{x^2/2}$, for some real constant $c$. The value is $c$ is uniquely defined by the initial data $f(0)=1$, which forces $c$ to be equal to
$$
1=f(0)=c\mathrm{e}^0=c.
$$ 
Hence, the one and only solution of our problem is $f(x)=\mathrm{e}^{x^2/2}$.
A: Let's try with power series: suppose
$$
f(x)=\sum_{n\ge0}a_nx^n
$$
so
$$
f'(x)=\sum_{n\ge1}na_nx^{n-1}=\sum_{n\ge0}(n+1)a_{n+1}x^n
$$
On the other hand
$$
xf(x)=\sum_{n\ge0}a_nx^{n+1}=\sum_{n\ge1}a_{n-1}x^n
$$
so that
$$
a_1+\sum_{n\ge1}(n+1)a_{n+1}x^n=\sum_{n\ge1}a_{n-1}x^n
$$
In particular, $a_1=0$ and
$$
(n+1)a_{n+1}=a_{n-1}
$$
Therefore $a_n=0$ for odd $n$; setting, for odd $n$, $n-1=2k$, so $n+1=k+2$, we get
$$
(2k+2)a_{2k+2}=a_{2k}
$$
Set $b_k=a_{2k}$, to get $2(k+1)b_{k+1}=b_k$ that is, considering $b_0=1$,
$$
b_k=\frac{1}{2^k\,k!}
$$
Therefore
$$
f(x)=\sum_{k\ge0}b_kx^{2k}=
\sum_{k\ge0}\frac{1}{k!}\left(\frac{x^2}{2}\right)^k=
e^{x^2/2}
$$
This just prove that if $f(x)$ is analytic, then $f(x)=e^{x^2/2}$. Now you can try showing this function is actually the only solution (see Yiorgos' argument).
