Plot[Piecewise[{{0, x < 0}, {e^(-1/x^2), x > 0}}], {x, -1, 1}]