Solve $(y^2+2x^2y)dx+(2x^3-xy)dy=0$

$$y(y+2x^2)dx+x(2x^2-y)dy=0$$ $$y(y+2x^2)(2xdx)+2x^2(2x^2-y)dy=0$$ An obvious change of variable appears : $\quad t=x^2$

$dt=2xdx \quad\implies\quad y(y+2t)dt+2t(2t-y)dy=0$

$$\frac{dy}{dt}=\frac{y}{2t}\frac{y+2t}{y-2t}$$ This is an ODE of the homogeneous kind. The usual change of function is : $\quad y=tu$

$\frac{dy}{dt}=u+t\frac{du}{dt} \quad\implies\quad u+t\frac{du}{dt}=\frac{tu}{2t}\frac{tu+2t}{tu-2t}=\frac{u}{2}\frac{u+2}{u-2}$

$$t\frac{du}{dt}=\frac{u}{2}\frac{u+2}{u-2}-u$$

This is a separable ODE. I suppose that you can take it from here.

HINT:

First, solve for $t(u)$, not for $u(t)$.

Second, $\quad \begin{cases} t=x^2\\ u=\frac{y}{x^2} \end{cases}\quad$ to come to the relationship between $y$ and $x$.


Here is another way

$$y(y+2x^2)dx+x(2x^2-y)dy=0$$

Substitute $y=tx$

$$t(t+2x)=(t-2x)y'$$

Note that $y'=t'x+t$

$$t(t+2x)=(t-2x)(t'x+t)$$

After some simplifications you get:

$$t'(t-2x)=4t$$

Consider now $x'=\frac {dx}{dt}$

$$x'+\frac x {2t}=\frac 1 4$$

Which is easy to solve.....


I thought it might be useful to demonstrate Jacquelin's suggestion from the comments. We're given the ODE

$$M(x,y)\,\mathrm dx+N(x,y)\,\mathrm dy=0$$

Distributing an integrating factor $\mu(x,y)$ across both sides we get

$$\mu M\,\mathrm dx+\mu N\,\mathrm dy=0$$

To meet the conditions of exactness, we require

$$(\mu M)_y=(\mu N)_x\implies\mu_y M+\mu M_y=\mu_xN+\mu N_x$$ $$\implies \mu_y(y^2+2x^2y)-\mu_x(2x^3-xy)=\mu(4x^2-3y)$$

Let's attempt the traditional guess of $\mu(x,y)=x^ay^b$. Substituting into the PDE above, we have

$$\begin{align*} bx^ay^{b-1}(y^2+2x^2y)-ax^{a-1}y^b(2x^3-xy)&=x^ay^b(4x^2-3y)\\[1ex] (a+b)x^ay^{b+1}-(2a-2b)x^{a+2}y^b&=-3x^ay^{b+1}+4x^{a+2}y^b \end{align*}$$ $$\implies\begin{cases}a+b=-3\\2a-2b=-4\end{cases}\implies a=-\frac52,b=-\frac12$$

(You can verify that $(\mu M)_y=(\mu N)_x$.) Now we seek a solution $\Psi(x,y)=C$ for which $\Psi_x=\mu M$ and $\Psi_y=\mu N$. We have

$$\Psi_x=x^{-5/2}y^{3/2}+2x^{-1/2}y^{1/2}\implies \Psi=-\frac23x^{-3/2}y^{3/2}+4x^{1/2}y^{1/2}+f(y)$$ $$\Psi_y=2x^{1/2}y^{-1/2}-x^{-3/2}y^{1/2}=-x^{-3/2}y^{1/2}+2x^{1/2}y^{-1/2}+\frac{\mathrm df}{\mathrm dy}$$ $$\implies\frac{\mathrm df}{\mathrm dy}=0\implies f(y)=C$$

where $C$ is an arbitrary constant. We thus arrive at a solution

$$\Psi(x,y)=\frac23x^{-3/2}y^{1/2}\left(6x^2-y\right)=C$$