General solution of differential equation XDY / DX + y = Xe ^ x

General solution of differential equation XDY / DX + y = Xe ^ x

xdy/dx+y=xe^x
xy'+y=xe^x
(xy)'=xe^x
The integral of X on both sides is obtained
xy=∫xe^xdx=xe^x-∫e^xdx=xe^x-e^x+C
That is, xy = Xe ^ x-e ^ x + C