Question
The solution of the differential equation $$x\,\sin \,x\frac{{dy}}{{dx}} + \left( {x\,\cos \,x + \sin \,x} \right)y = \sin \,x.$$
When $$y\left( 0 \right) = 0$$ is :
A.
$$xy\,\sin \,x = 1 - \cos \,x$$
B.
$$xy\,\sin \,x + \cos \,x = 0$$
C.
$$x\,\sin \,x + y\,\cos \,x = 0$$
D.
$$x\,\sin \,x + y\,\cos \,x = 1$$
Answer :
$$xy\,\sin \,x = 1 - \cos \,x$$
Solution :
The equation is $$\frac{{dy}}{{dx}} + \left( {\frac{{x\,\cos \,x + \sin \,x}}{{x\,\sin \,x}}} \right)y = \frac{1}{x}$$
Integrating factor
$${\text{I}}{\text{.F}}{\text{.}} = {e^{\int {\frac{{x\,\cos \,x + \sin \,x}}{{x\,\sin \,x}}} dx}} = {e^{\log \left( {x\,\sin \,x} \right)}} = x\,\sin \,x$$
$$\therefore $$ The solution is
$$\eqalign{
& y\left( {x\,\sin \,x} \right) = \int {\frac{1}{x}\left( {x\,\sin \,x} \right)dx + c} \cr
& xy\,\sin \,x = - \cos \,x + c{\text{ when}} \cr
& x = 0,\,y = 0 \Rightarrow c = \cos \,0 = 1 \cr} $$
$$\therefore $$ The particular solution is $$xy\,\sin \,x = 1 - \cos \,x$$