Prove Variance of Gaussian by Differentiating Integral of N(x) =1 by $\sigma^2$ and rearranging The normalized Gaussian distribution is defined as:
$$N(x|\mu,\sigma^2)=\frac{1}{(2\pi\sigma^2)^{1/2}}exp\bigg(\frac{-1}{2\sigma^2}(x-\mu)^2\bigg)$$
Prove that:
$$Var[x]=E[(X-\mu)^2]=\sigma^2$$
by differentiating both sides of the normalization condition:
$$\int_{-\infty}^{\infty} N(x|\mu, \sigma^2)~dx = 1$$
with respect to $\sigma^2$ and rearrange the result such that:
$$E[(X-\mu)^2] = \sigma^2$$
I've tried this proof at least 10 times...and the variance always comes out as fraction of a square...

$$\int_{-\infty}^{\infty} N(x|\mu,\sigma^2)~dx=1$$
Now Differentiate both sides by $\sigma$:
$$\int_{-\infty}^{\infty} \frac{d}{d\sigma}N(x|\mu,\sigma^2)~dx=\frac{d}{d\sigma}1$$
$$\int_{-\infty}^{\infty} \frac{d}{d\sigma}N(x|\mu,\sigma^2)~dx=0~~~~~(1)$$
Now Working just on the differentiation:
$$\frac{d}{d\sigma}N(x|\mu,\sigma^2)=\Bigg[\bigg(\frac{\sigma^{-1}}{(2\pi)^{1/2}}\bigg)\exp\bigg(\frac{-1}{2}\sigma^{-2}(x-\mu)^2 \bigg)\Bigg]'$$
using differentiation product rule:
$$\frac{d}{d\sigma}N(x|\mu,\sigma^2)=\Bigg[\bigg(\frac{\sigma^{-1}}{(2\pi)^{1/2}}\bigg)\Bigg]'\exp\bigg(\frac{-1}{2}\sigma^{-2}(x-\mu)^2 \bigg) + \bigg(\frac{\sigma^{-1}}{(2\pi)^{1/2}}\bigg)\Bigg[\exp\bigg(\frac{-1}{2}\sigma^{-2}(x-\mu)^2 \bigg)\Bigg]'$$
Then, take the result of this differentiation, place it back into the integral (1) and substitute in these already known true equations:
$$\int_{-\infty}^{\infty} exp(-\frac{1}{2}\sigma^{-2} (x-\mu)^2 = (2\pi\sigma^2)^{1/2}$$
$$E[(x-\mu)^2]=\int_{-\infty}^{\infty} (x-\mu)^{2}~ \bigg(\frac{\sigma^{-1}}{(2\pi)^{1/2}}\bigg) 
 exp\bigg(-\frac{1}{2}\sigma^{-2} (x-\mu)^2\bigg)~dx = \int_{-\infty}^{\infty} (x-\mu)^{2}~N(x|\mu, \sigma)~dx$$
The result after simplification should yield:
$$E[(x-\mu)^2] = \sigma^2$$
