The MacLaurin series of $e^{\frac{x^2}{2}}$ Could someone please explain to me how you derive the MacLaurin series for $e^{ \frac{x^2}{2}}$?
I understand how it is derived from the MacLaurin series for $e^x$ where it is 
$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + ... = \sum_{n=1}^\infty\frac{x^{2n}}{2^nn!}$
and you just substitute $\frac{x^2}{2}$ for $x$ but when I try to do it using differentiation I get 
$e^{\frac{x^2}{2}} = 1 + \frac{x^2}{2!} + \frac{x^4}{3!} + ... = \sum_{n=1}^\infty\frac{x^2n}{n!}$ which is not the correct answer.
Any help/comments would be appreciated.
 A: The substitution idea is the right way to go.
$$
e^{x^2/2}=\sum_{k=0}^\infty\frac{x^{2k}}{2^kk!}
$$
I think your problem with computing the series from $e^{x^2/2}$ may stem from a misapplication of the chain rule. Note that
$$
\frac{\mathrm{d}}{\mathrm{d}x}e^{x^2/2}=xe^{x^2/2}
$$
From there, the product rule should give you the higher derivatives.

A useful observation is that
$$
\frac{\mathrm{d}^n}{\mathrm{d}x^n}e^{x^2/2}=P_n(x)e^{x^2/2}
$$
for some polynomial $P_n$.  You can prove by induction that 
$$
P_{n+1}(x)=xP_n(x)+P_n'(x)
$$
Since $P_0(x)=1$, you can show that $P_n(x)$ is an even function when $n$ is even and an odd function when $n$ is odd. Thus, $P_n(0)=0$ when $n$ is odd, which means the coefficient of $x^n$ is $0$ when $n$ is odd.
A: $$e^x=\sum^\infty_{k=0}\dfrac{x^k}{k!}\\
\implies e^{x^2/2}=\sum^\infty_{k=0}\dfrac{(x^2/2)^{2}}{k!}=\sum^\infty_{k=0}\dfrac{x^{2k}}{2^kk!}$$
Differentiate:
$$e^{x^2/2}|_{x=0}=1\\
e^{x^2/2}x|_{x=0}=0\\
(e^{x^2/2}+x^2e^{x^2/2})|_{x=0}=1$$
E.t.c. Every differential $\dfrac{d^{2n}}{dx^{2n}}e^{x^2/2}=1$, and every differential $\dfrac{d^{2n+1}}{dx^{2n+1}}e^{x^2/2}=0$. Thus,
$$e^{x^2/2}=\sum^\infty_{k=0}\dfrac{f^{(k)}(0)}{k!}(x)^k=\sum^\infty_{k=0}\dfrac{x^{2k}}{2^kk!}$$
Both are the same.
