# To solve $y'=\frac{\cos y+y\cos x}{x\sin y-\sin x}$

$$y'(x)=\frac{\cos (y(x))+y(x) \cos (x)}{x \sin (y(x))-\sin (x)}$$ I am self-learning the differential equation from a textbook and I need some help with above equation. I learned I-factor (for 1st order linear ODE), Bernoulli's, and Riccati's. So the problem should be solved by them. The book doesn't have any examples using trig functions.

I tried wolfram alpha but the website could not give me "step-by-step". Does anyone know why? Wolfram Alpha never had this problem where it could not give "step-by-step".

$$y'(x)=\frac{\cos (y(x))+y(x) \cos (x)}{x \sin (y(x))-\sin (x)}$$
we can re-write as $$x \sin (y(x))y'-\sin (x)y' = -x\frac{d}{dx}\cos (y(x)) -\sin(x)y'=\cos (y(x))+y(x) \cos (x)$$ collecting similar terms(by inspection that is) $$-x\frac{d}{dx}\cos (y(x))-\cos(y(x)) = -\frac{d}{dx}x\cos(y(x)) = \sin(x)y' + y(x)\cos(x) = \frac{d}{dx}y\sin(x)$$ or $$-\frac{d}{dx}x\cos(y(x)) = \frac{d}{dx}y\sin(x)$$
• Not a problem. The reason comes from how you take the derivative implicitly (I forget the actual terminology from time to time) but $$\frac{d}{dx}f(y) = \frac{dy}{dx}\frac{df}{dy}$$ can you see how I got to that conclusion in the answer? – Chinny84 Aug 10 '14 at 16:57
• Thank you! I would have never thought of doing it that way. One question, if I did an integration to find f, wouldn't it be: $$[Integral]x sin(y) [DifferentialD]y=-x cos(y) + Subscript[c, 1]$$ Should you have a c as a result of your integration? – Jamesly Aug 10 '14 at 17:38
• No worries. The resulting answer is $$-x\cos(y) = y \sin x + C_1$$. – Chinny84 Aug 10 '14 at 17:43