Given:
dydx=−x1+sin x−y cos x1+sin x
⇒dydx+cos x1+sin x y=−x1+sin x ....................(1)
Comparing equation (1) with linear differential equation
dydx+P y=Q
we will get,
P=cos x1+sin x;Q=−x1+sin x
∴ Intergrating factor (I.F.), I.F =e∫Pdx
I.F=e∫cos x1+sin xdx=elog(1+sin x)=1+sin x
For general solution of differential equation,
⇒(1+sin x)y=∫−x dx+C
∵[y(I.F.)=∫Q(I.F.)dx+C]
⇒y(1+sin x)=−x22+C .............(2)
Now, we get y=1, when x=0
⇒1(1+sin 0)=−02+C⇒C=1
Putting C=1 in equation (2), we get
y(1+sin x)=−x22+1
Hence the particular solution is,
2y(1+sin x)+x2−2=0