Find the particular solution of differential equation : dydx=−x+y cos x1+sin x given that y = 1 when x = 0.
Here dydx=−x+y cos x1+sin x ⇒dydx+(cos x1+sin x)y=−x1+sin x
This is in the form of dydx+P(x)y=Q(x) where P(x)=cos x1+sin x, Q(x)=−x1+sin x
Now I.F. =e∫(cos x1+sin x)dx=elog(1+sin x)=1+sin x
So the required solution is, y(1+sin x)=∫−x1+sin x×(1+sin x)dx+C
⇒y(1+sin x)=∫−xdx+C⇒y(1+sin x)=−12x2+C
As it is given that y = 1 when x = 0 so, 1(1+sin 0)=−12×02+C⇒C=1.
So the particular solution is, y(1+sin x)=1−12x2.