Solution (source code)

= Solution

Apply the <chain rule> to the exponential, differentiating its exponent $-x^2$:
$$
\boxed{\frac d{dx}e^{-x^2}=-2xe^{-x^2}.}
$$