An integrating factor for this equation is a function, u(x) such that
u(x)dy/dx- u(x)y= d(u(x)y)/dx
By the product rule, d(uy)/dx= (du/dx)y+ u(dy/dx) so we want
(du/dx)y+ u(dy/dx)= udu/dx- uy
The "u(dy/dx)" terms cancel leaving y(du/dx)= -uy or du/dx= -u so that u(x)= e^{-x} is, in fact, an integrating factor. Multiplying the equation by that,
e^{-x}(dy/dx)- e^{-x}y= d(e^{-x}y)/dx e^{-x}(x+ 2x^2)[/itex]<br />
The left side integrates to e^{-x}y of course. To integrate the right side, use "integration by parts" taking u= x+ 2x^2 and dv= e^{-x}dx. You will need to use integration by parts twice to complete the integral.<br />
<br />
Another way to do this is to use the fact that this is an "inhomogeneous linear differentiale equation with constant coefficients". One of the basic properties of "linear" problems in general is that you can solve parts of them and then put those partial solutions together to solve the entire problem.<br />
<br />
Here, you can solve dy/dx- y= 0 easily. You can then try something of the form y= Ax^2+ Bx+ C. Put that into dy/dx- y= x+ 2x^2 and see if you can find values A, B, and C so that function will satify the equation. Add the two solutions to the two different parts to find the general solution to the equation.