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...