Given differential equation is dxdy+xy=3x
It is a linear differential equation of the form dxdY+Py=Q ∴P=x1 and Q=3x ∴IF=e∫Pdx=e∫x1dx =elogx=x ∴ Complete solution is yx=∫3x×xdx+C...(i) ⇒yx=3[3x3]+C ⇒y=x2+xC
Also, Eq. (i) can be written as yx=∫3x×xdx−C ⇒yx=x3−C ⇒y=x2−xC