Answer
$y=-3+Ce^{x-x^2}$
Work Step by Step
This equation can be rewritten as the following:
$$\frac{dy}{dx}+(2x-1)y =3-6x$$
Multiplying both sides by the integrating factor of $e^{x^2-x}$ gives $$e^{x^2-x}y' + (2x-1)e^{x^2-x}y=(3-6x)e^{x^2-x}$$
Therefore, by product rule,
$$\frac{d}{dx}(e^{x^2-x}y)=3(1-2x)e^{x^2-x}$$
The integral of the left side of the equation becomes $e^{x^2-x}$. The integral of the right side requires a u-substitution of $u=x^2-x$. Therefore, $du=(2x-1)dx$ and $-3du = 3(1-2x) dx$ Thus, the integral of the right side becomes $$-3 \int e^udu = -3e^u+C=-3e^{x^2-x}+C$$
Therefore, $e^{x^2-x}y = -3e^{x^2-x}+C$ meaning that $$y=e^{x-x^2}(-3e^{x^2-x}+C)=-3+Ce^{x-x^2}$$