How to solve the following first order ODE I want to solve the following ODE: $$\left(x^2+x y(x)\right) y'(x)+y(x)^2+3 x y(x)=0.$$ However, I didn't find this fit any types in the textbook. For example, I expressed it as $$M(x,y)dx+N(x,y)dy=0$$ and checked whether $M_y=N_x$ which doesn't hold though. Does anyone know how to solve this?

$$\left(x^2+x y\right) y'+y^2+3 x y=0$$
Make substitution $y=xz$, where $z$ is function of $x$.
$$
\left(x^2+x^2z\right)\left(z+xz^{'}\right)+x^2z^2+3x^2z=0
$$
Factor out $x^2$ and solve separable ODE
$$
\left(1+z\right)\left(z+xz^{'}\right)+z^2+3z=0\to\\
x\frac{dz}{dx}=-z\frac{z+3}{z+1}-z=-z\frac{2z+4}{z+1}\to\\
\frac{z+1}{2z(z+2)}
dz=-\frac{1}{x}dx\to\frac{1}{4}(\ln(z)+\ln(z+2))=-\ln(x)+C^*\to\\
\ln(z(z+2))=\ln(1/x^4)+\ln(C)\to\\
z(z+2)=\frac{C}{x^4}
$$
Which after inverse substitution leads to 
$$
\frac{y}{x}\left(\frac{y}{x}+2\right)=\frac{C}{x^4}\to \color{red}{y(y+2x)=\frac{C}{x^2}}
$$
Check solution
$$
(x+y)y^{'}=(-1)\left(\frac{C}{x^3}+y\right)\\
\left(x^2+xy\right)y'+y^2+3xy=0\to x\left(x+y\right)y'+y(y+2x)+xy=0\to\\
-x\left(\frac{C}{x^3}+y\right)+\frac{C}{x^2}+xy\equiv 0
$$
Note: factoring out $x^2$, mentioned above, gives us additional particular solution, which is not covered by general formula. $\color{red}{y=0}$
