We can rewrite the differential equation as:
dy/dx = −2x
This is a separable equation, and so after a little algebra we can write it as
dy/y = −2xdx.
Taking the antiderivative of both sides we get:
Exponentiating both sides, and being a little sloppy with the unknown constant C,2 we get:
y = Ce−x2 .