\frac{d}{dx}\left[e^{-ax^2}\left(-2ax\right)\right]-x^2e^{-ax^2}=0