$y'=\frac{y^2}{2x(y-x)}$ I'm trying to solve the following differential equation:
$$y'=\frac{y^2}{2x(y-x)}$$
It is supposed to have a relatively easy general solution, but I can't find it.
I've tried several things, the most promising of which is the change $z(x)=y(x)-x$, which yields (if I haven't made any mistake):
$$z'=\frac{z}{2x}+\frac{x}{2z}$$
Which I guess I can solve as a Bernoulli equation, with $p=-1$ (which means solving a linear equation, then changing the variables back).

  
*
  
*My question is, is there a simpler way of solving this equation?

 A: $$y'=\frac { y^{ 2 } }{ 2x(y-x) } \\$$
Solve respect to the  $x $
$$\\ \\ { y }^{ 2 }{ x }^{ \prime  }-2x(y-x)=0\\ \\ { x }^{ \prime  }-2\frac { x }{ y } +2\frac { { x }^{ 2 } }{ { y }^{ 2 } } =0\\ x=zy\\ { x }^{ \prime  }=z+y{ z }^{ \prime  }\\ z+y{ z }^{ \prime  }-2z+2{ z }^{ 2 }=0\\ y{ z }^{ \prime  }-z+2{ z }^{ 2 }=0\\ y{ z }^{ \prime  }=z\left( 1-2z \right) \\ \int { \frac { dz }{ z\left( 1-2z \right)  }  } =\int { \frac { dy }{ y }  } \\ \frac { 1 }{ z\left( 1-2z \right)  } =\frac { A }{ z } +\frac { B }{ 1-2z } \\ 1=A-2Az+Bz=\left( B-2A \right) z+A\\ B-2A=0,A=1\Rightarrow B=2\\ \int { \left( \frac { 1 }{ z } +\frac { 2 }{ 1-2z }  \right) dz=\ln { C\left| y \right|  }  } \\ \ln { \left| z \right|  } -\ln { \left| 1-2z \right| =\ln { C\left| y \right|  }  } \\ \ln { \left| \frac { z }{ 1-2z }  \right| =\ln { C\left| y \right|  }  } \\ \frac { z }{ 1-2z } =Cy\\
\frac { \frac { x }{ y }  }{ 1-2\frac { x }{ y }  } Cy\\$$

$$ \frac { x }{ y-2x } =Cy\\ \\ \\ \\  $$ and note $y=0$ is a particular solution

A: This is already solved in a satisfactory way, by viewing $x$ as a function of $y$ instead. Here is a solution that does not. If we let
$$
z=(y-x)^2,
$$
(the square fit well with the $2$) then, by differentiation, and by using the differential equation
$$
z'=2(y-x)(y'-1)=\frac{y^2}{x}-2(y-x)=\frac{1}{x}(y^2-2yx+x^2)+x=\frac{z}{x}+x.
$$
This differential equation is linear, and using integrating factor we first find that
$$
\bigl(\frac{1}{x}z\bigr)'=1,
$$
so, by integration,
$$
z=x^2+Cx.
$$
Switching back to $y$ gives
$$
y=x\pm\sqrt{x^2+Cx}.
$$
I leave it to you to determine if you consider $x>0$ or $x<0$ and to find out if you have any conditions on $C$.
