question on separable differential equations I'm trying to solve this equation but always got stuck in a term. How can I separate the $x$,$y$ variables in the equation?
$$(y^2 -yx^2)dy + (y^2 + xy^2)dx =0$$
 A: For the ODE $(y^2-yx^2)~dy+(y^2+xy^2)~dx=0$ , I don't think you can separate the $x$ and $y$ variables directly, instead you can only solve it like this:
$(y^2-yx^2)~dy+(y^2+xy^2)~dx=0$
$y^2(x+1)~dx=(yx^2-y^2)~dy$
$(x+1)\dfrac{dx}{dy}=\dfrac{x^2}{y}-1$
Let $u=x+1$ ,
Then $x=u-1$
$\dfrac{dx}{dy}=\dfrac{du}{dy}$
$\therefore u\dfrac{du}{dy}=\dfrac{(u-1)^2}{y}-1$
$u\dfrac{du}{dy}=\dfrac{u^2-2u+1}{y}-1$
$u\dfrac{du}{dy}=\dfrac{u^2}{y}-\dfrac{2u}{y}+\dfrac{1}{y}-1$
This belongs to an Abel equation of the second kind.
Follow the method in http://eqworld.ipmnet.ru/en/solutions/ode/ode0126.pdf:
Let $u=yv$ ,
Then $\dfrac{du}{dy}=y\dfrac{dv}{dy}+v$
$\therefore yv\left(y\dfrac{dv}{dy}+v\right)=yv^2-2v+\dfrac{1}{y}-1$
$y^2v\dfrac{dv}{dy}+yv^2=yv^2-2v+\dfrac{1}{y}-1$
$y^2v\dfrac{dv}{dy}=-2v+\dfrac{1}{y}-1$
$v\dfrac{dv}{dy}=-\dfrac{2v}{y^2}+\dfrac{1}{y^3}-\dfrac{1}{y^2}$
Let $t=\dfrac{2}{y}$ ,
Then $y=\dfrac{2}{t}$
$\dfrac{dv}{dy}=\dfrac{dv}{dt}\dfrac{dt}{dy}=-\dfrac{2}{y^2}\dfrac{dv}{dt}$
$\therefore-\dfrac{2v}{y^2}\dfrac{dv}{dt}=-\dfrac{2v}{y^2}+\dfrac{1}{y^3}-\dfrac{1}{y^2}$
$v\dfrac{dv}{dt}=v+\dfrac{1}{2}-\dfrac{1}{2y}$
$v\dfrac{dv}{dt}=v+\dfrac{1}{2}-\dfrac{t}{4}$
$\dfrac{dv}{dt}=1-\dfrac{t-2}{4v}$
Luckily this becomes a first-order homogeneous ODE.
Let $w=\dfrac{v}{t-2}$ ,
Then $v=(t-2)w$
$\dfrac{dv}{dt}=(t-2)\dfrac{dw}{dt}+w$
$\therefore(t-2)\dfrac{dw}{dt}+w=1-\dfrac{1}{4w}$
$(t-2)\dfrac{dw}{dt}=-\dfrac{4w^2-4w+1}{4w}$
$\dfrac{4w}{(2w-1)^2}~dw=-\dfrac{dt}{t-2}$
$\int\dfrac{4w}{(2w-1)^2}~dw=-\int\dfrac{dt}{t-2}$
$\ln(2w-1)-\dfrac{1}{2w-1}=-\ln(t-2)+c_1$
$(2w-1)e^{-\frac{1}{2w-1}}=\dfrac{c_2}{t-2}$
$\dfrac{2v-t+2}{t-2}e^{-\frac{t-2}{2v-t+2}}=\dfrac{c_2}{t-2}$
$\dfrac{yv+y-1}{y-1}e^\frac{y-1}{yv+y-1}=\dfrac{Cy}{y-1}$
$(u+y-1)e^\frac{y-1}{u+y-1}=Cy$
$(x+y)e^\frac{y-1}{x+y}=Cy$
Checking:
$\left(\dfrac{1}{y}\dfrac{dx}{dy}-\dfrac{x}{y^2}\right)e^\frac{y-1}{x+y}+\left(\dfrac{x}{y}+1\right)\left(\dfrac{1}{x+y}-\dfrac{y-1}{(x+y)^2}\left(\dfrac{dx}{dy}+1\right)\right)e^\frac{y-1}{x+y}=0$
$\dfrac{1}{y}\dfrac{dx}{dy}-\dfrac{x}{y^2}+\dfrac{1}{y}-\dfrac{y-1}{y(x+y)}\left(\dfrac{dx}{dy}+1\right)=0$
$\left(\dfrac{1}{y}-\dfrac{y-1}{y(x+y)}\right)\left(\dfrac{dx}{dy}+1\right)=\dfrac{x}{y^2}$
$\dfrac{x+1}{y(x+y)}\left(\dfrac{dx}{dy}+1\right)=\dfrac{x}{y^2}$
$(x+1)\left(\dfrac{dx}{dy}+1\right)=\dfrac{x(x+y)}{y}$
$(x+1)\dfrac{dx}{dy}+x+1=\dfrac{x^2}{y}+x$
$(x+1)\dfrac{dx}{dy}=\dfrac{x^2}{y}-1$ , correct!
