The solution of the differential equation dydx+yx=sinx is
xy+cosx=sinx+c
xy-cosx=sinx+c
xycosx=sinx+c
xy-cosx=cosx+c
xy+cosx=cosx+c
Explanation of the correct option.
Compute the required value.
Given : dydx+yx=sinx
Compare the equation with standard L.D.E. dydx+Py=Q.
P=1x and Q=sinx
I.F.=e∫Pdx=e∫1xdx=elnx=x
Since the solution of L.D.E. is given by y(I.F.)=∫QI.F.dx+c.
y.x=∫x.sinxdx+c⇒y.x=-xcosx-∫-cosxdx+c⇒y.x=-xcosx+sinx+c⇒xy+cosx=sinx+c
Hence option A is the correct option.