The general solution of y'+xy=4x is given by
y=e(−1/2)x2+Cx
y=e(1/2)x2+Cx
y=Ce(1/2)x2−4
y=e(1/2)x2+Cx+4
The given equation is a linear equation withI.F.= e−∫xdx=e−12x2.
so ddxye−12x2=4xe−12x2⇒ye−12x2=4∫xe−12x2dx+C=−4e−12x2+C
so y=−4+Ce12x2