Solution
Given,
dydx=ytanyytany−xtany−xy
Rearranging,
dydx+(y1+tany1)x=1
Since
tany1=coty,
we have
dydx+(y1+coty)x=1.
Integrating Factor
I.F.=e∫(y1+coty)dy
=eln∣y∣+ln∣siny∣
=eln∣ysiny∣
Hence,
I.F.=ysiny
General Solution
For a linear differential equation,
x×I.F.=∫(Q×I.F.)dy+C.
Therefore,
xysiny=∫ysinydy+C.
Using integration by parts,
∫ysinydy=−ycosy+∫cosydy
=−ycosy+siny.
Hence,
xysiny=−ycosy+siny+C.
Therefore,
x=ysinysiny−ycosy+C