Differential of normal distribution Let
$$f(x)=\frac{\exp\left(-\frac{x^2}{2\sigma^2}\right)}{\sigma\sqrt{2\pi}}$$
(Normal distribution curve) Where $\sigma$ is constant. Is my derivative correct and can it be simplified further? 
$$\begin{align} f'(x)
&=\frac d{dx}\left(\frac{\exp\left(-\frac{x^2}{2\sigma^2}\right)}{\sigma\sqrt{2\pi}}\right)\\
&=\frac{1}{\sigma\sqrt{2\pi}}\frac d{dx}\left(\exp\left(-\frac{x^2}{2\sigma^2}\right)\right)\\
\end{align}$$
$$\begin{align}
\implies\frac d{dx}\exp\left(-\frac{x^2}{2\sigma^2}\right)&=\frac d{dx}\sum_{n=0}^\infty\frac{\left(-\frac{x^2}{2\sigma^2}\right)^n}{n!}
=\sum_{n=0}^\infty\frac d{dx}\frac{\left(-\frac{x^2}{2\sigma^2}\right)^n}{n!}\\
&=\sum_{n=0}^\infty \frac 1{n!}\frac d{dx}\left(-\frac{x^2}{2\sigma^2}\right)^n=\sum_{n=0}^\infty -\frac 1{n!}\frac{1}{2\sigma^{2n}}\frac d{dx}x^{2n}\\
&=\sum_{n=0}^\infty -\frac 1{n!}\frac{1}{2\sigma^{2n}}2nx^{2n-1}=\sum_{n=0}^\infty -\frac {1}{n!}\frac{2nx^{2n-1}}{2\sigma^{2n}}\\
\end{align}$$
$$\implies f'(x)=\frac{-\sum_{n=0}^\infty \left(\frac {1}{n!}\frac{2nx^{2n-1}}{2\sigma^{2n}}\right)}{\sigma\sqrt{2\pi}}$$
I attempted to simplify the infinite summation to the exponential function but I am failing. How would you simplify this further?
 A: Okay so it simplifies to:
$$f'(x)=-\frac{x\exp\left(-\frac{x^2}{2\sigma^2}\right)}{\sigma^3\sqrt{2\pi}}$$
A: Here is one approach:
$f(x) = \frac{1}{\sigma \sqrt{2 \pi}} e^{-x^2/2\sigma^2}$. Taking the log of both sides we get:
$ln\left(f(x)\right) = -\frac{x^2}{2 \sigma^2} + ln \left( \frac{1}{\sigma \sqrt{2 \pi}} \right)$.
Let's differentiate both sides to get:
$\frac{f'(x)}{f(x)} = -\frac{x}{\sigma^2}$, implying $f'(x) =  -\frac{xf(x)}{\sigma^2}$. Now we can substitute for $f(x)$ to get the final answer:
$f'(x) = -\frac{x}{\sigma^3 \sqrt{2 \pi}} e^{-x^2/2\sigma^2}$.
Algebra is a little less messy than brute-force differentiation, IMHO.
A: If you want to use the method that you started, then you should note that we can only "pull out the negative sign" from $$\left(-\frac{x^2}{2\sigma^2}\right)^n$$ when $n$ is odd. It would be better to keep a $(-1)^n$ term around, because then, $$\begin{align}\frac d{dx}\exp\left(-\frac{x^2}{2\sigma^2}\right) &= \sum_{n=0}^\infty \frac 1{n!}\frac d{dx}\left(-\frac{x^2}{2\sigma^2}\right)^n\qquad[\text{as you showed}]\\ &= \sum_{n=0}^\infty \frac 1{n!}\frac{(-1)^n}{2^n\sigma^{2n}}\frac d{dx}\left[x^{2n}\right]\\ &= \sum_{n=0}^\infty \frac 1{n!}\frac{(-1)^n}{2^n\sigma^{2n}}\cdot 2nx^{2n-1}\\ &= \sum_{n=1}^\infty \frac 1{n!}\frac{(-1)^n}{2^n\sigma^{2n}}\cdot 2nx^{2n-1}\qquad[\text{the }n=0\text{ term vanishes}]\\ &= \sum_{n=1}^\infty \frac 1{(n-1)!}\frac{(-1)^n}{2^{n-1}\sigma^{2n}} x^{2n-1}\qquad[\text{cancellation}]\\ &= \sum_{n=0}^\infty \frac 1{n!}\frac{(-1)^{n+1}}{2^n\sigma^{2(n+1)}} x^{2(n+1)-1}\qquad[\text{reindex by }n\mapsto n+1]\\ &= \sum_{n=0}^\infty \frac 1{n!}\frac{(-1)^{n+1}}{2^n\sigma^{2n+2}} x^{2n+1}\\ &= -\frac{x}{\sigma^2}\sum_{n=0}^\infty \frac 1{n!}\frac{(-1)^n}{2^n\sigma^{2n}} x^{2n}\\ &= -\frac{x}{\sigma^2}\sum_{n=0}^\infty \frac 1{n!}\left(-\frac{x^2}{2\sigma^2}\right)^n\\ &= -\frac{x}{\sigma^2}\exp\left(-\frac{x^2}{2\sigma^2}\right).\end{align}$$
There are far too many places to go wrong, here, though. Better just to use the chain rule.
A: You could have finished your answer in the second step. I don't believe there was a need for a taylor series. The derivative you have was $$\frac{d}{dx}e^{\frac{-x^{2}}{2\sigma^{2}}}$$ $$= e^{\frac{-x^{2}}{2\sigma^{2}}}\frac{d}{dx}(\frac{-x^{2}}{2\sigma^{2}})$$ $$= e^{\frac{-x^{2}}{2\sigma^{2}}}\frac{-4x\sigma^{2}}{4\sigma^{4}}$$ $$= e^{\frac{-x^{2}}{2\sigma^{2}}}\frac{-x}{\sigma^{2}}$$ $$= \frac{-x\exp(\frac{-x^{2}}{2\sigma^{2}})}{\sigma^{2}}$$
Thus your final answer would have been
$$\frac{-x\exp(\frac{-x^{2}}{2\sigma^{2}})}{\sigma^{3}\sqrt{2\pi}}$$
Clever way of thinking about it though. Props for creativity
