Respuesta :
The ODE is exact, since
[tex]\dfrac{\partial(y^2-2xy)}{\partial y}=2y-2x[/tex]
[tex]\dfrac{\partial(2xy-x^2)}{\partial x}=2y-2x[/tex]
so there is solution [tex]f(x,y)=C[/tex] such that
[tex]\dfrac{\partial f}{\partial x}=y^2-2xy[/tex]
[tex]\dfrac{\partial f}{\partial y}=2xy-x^2[/tex]
Integrating both sides of the first PDE wrt [tex]x[/tex] gives
[tex]f(x,y)=xy^2-x^2y+g(y)[/tex]
Differentiating both sides wrt [tex]y[/tex] gives
[tex]\dfrac{\partial f}{\partial y}=2xy-x^2+\dfrac{\mathrm dg}{\mathrm dy}=2xy-x^2[/tex]
[tex]\implies\dfrac{\mathrm dg}{\mathrm dy}=0\implies g(y)=C[/tex]
Then the solution to the ODE is
[tex]f(x,y)=\boxed{xy^2-x^2y=C}[/tex]
# # #
Alternatively, we can see that the ODE is homogeneous, since replacing [tex]x\to tx[/tex] and [tex]y\to ty[/tex] reduces to the same ODE:
[tex]((ty)^2-2(tx)(ty))\,\mathrm d(tx)+(2(tx)(ty)-(tx)^2)\,\mathrm d(ty)=0[/tex]
[tex]t^3(y^2-2xy)\,\mathrm dx+t^3(2xy-x^2)\,\mathrm dy=0[/tex]
[tex](y^2-2xy)\,\mathrm dx+(2xy-x^2)\,\mathrm dy=0[/tex]
This tells us we can solve by substituting [tex]y(x)=xv(x)[/tex], so that [tex]\mathrm dy(x)=x\,\mathrm dv(x)+v(x)\,\mathrm dx[/tex], and the ODE becomes
[tex](x^2v^2-2x^2v)\,\mathrm dx+(2x^2v-x^2)(x\,\mathrm dv+v\,\mathrm dx)=0[/tex]
[tex]v(v-2)\,\mathrm dx+(2v-1)(x\,\mathrm dv+v\,\mathrm dx)=0[/tex]
[tex]3v(v-1)\,\mathrm dx+x(2v-1)\,\mathrm dv=0[/tex]
which is separable as
[tex]\dfrac{1-2v}{3v(v-1)}\,\mathrm dv=\dfrac{\mathrm dx}x[/tex]
Integrating both sides gives
[tex]-\dfrac13\ln|v(1-v)|=\ln|x|+C[/tex]
[tex]v(1-v)=\dfrac C{x^3}[/tex]
and solving in terms of [tex]y(x)[/tex],
[tex]\dfrac yx\left(1-\dfrac yx\right)=\dfrac C{x^3}[/tex]
[tex]xy(x-y)=C[/tex]
[tex]\boxed{x^2y-xy^2=C}[/tex]