I am doing working a derivative of E

Can you tell me if I am doing it right.

$\displaystyle y=-e^{\frac{-x^2}{2}$

chain rule:

$\displaystyle f(x)= -e^u$

$\displaystyle f'= -e^u$

$\displaystyle g(x)=\frac{-x^2}{2} $

$\displaystyle g'=-x$

$\displaystyle =-e^{\frac{-x^2}{2}}*-x $

SO, Y'=$\displaystyle xe^{\frac{-x^2}{2}$

for the second derivative, Y'', I use product rule, I believe.

product rule

$\displaystyle (1)*(e^{\frac{-x^2}{2}})+(x)*(-xe^{\frac{-x^2}{2}})$

$\displaystyle Y''=e^{\frac{-x^2}{2}}-x^2e^{\frac{-x^2}{2}$

Did I do it right?