<s>[INST] How can I find an ODE equation from $dy/dx$ What is the ODE satisfied by $y=y(x)$ 
given that $$\frac{dy}{dx} = \frac{-x-2y}{y-2x}$$
I understand that I need to get it in some form of $\int \cdots \;dy = \int \cdots \; dx$, but am not sure how to go about it.
 [/INST] We have, $$\frac{dy}{dx} = \frac{-x-2y}{y-2x}$$
Let $y=ux\implies \frac{dy}{dx}=x\frac{du}{dx}+u$ $$u+x\frac{du}{dx}=\frac{-x-2ux}{ux-2x}$$
$$u+x\frac{du}{dx}=\frac{2u+1}{2-u}$$ $$x\frac{du}{dx}=\frac{2u+1}{2-u}-u$$ $$x\frac{du}{dx}=\frac{1+u^2}{2-u}$$ $$\frac{(2-u)du}{1+u^2}=\frac{dx}{x}$$ Integrating both the sides, we get $$\int \frac{(2-u)du}{1+u^2}=\int \frac{dx}{x}$$  $$2\tan^{-1}(u)-\frac{1}{2}\ln(1+u^2)=\ln(x)+c$$ Substituting $u=\frac{y}{x}$, we get $$2\tan^{-1}\left(\frac{y}{x}\right)-\frac{1}{2}\ln\left(\frac{x^2+y^2}{x^2}\right)=\ln(x)+c$$ $$2\tan^{-1}\left(\frac{y}{x}\right)-\frac{1}{2}\ln\left(x^2+y^2\right)+\frac{1}{2}\ln (x^2)=\ln(x)+c$$
$$2\tan^{-1}\left(\frac{y}{x}\right)-\frac{1}{2}\ln\left(x^2+y^2\right)=c$$
</s>