stuck on solving an exact equation problem (ordinary differential equation)

So the equation is $(2xy^3-2x^3y^3-4xy^2+2x)+(3x^2y^2+4y)y'=0$

It's not exact, and this is how I approached it.

$\mu'(x)=\mu(M_y -N_x)/N=\mu((-2x), \mu=e^{-x^2}$ $\int e^{-x^2}(3x^2y^2+4y)dy=e^{-x^2}[x^2y^3+2y^2+\phi(x)]$

$\frac{\partial }{\partial x} e^{-x^2}[{x^2y^3+2y^2+\phi (x)]}$

So this will end up including both $\phi (x)$ and $\phi '(x)$ in this equation..and I'm not sure how to go about this problem from here. Am I missing something?

What you did is correct. If fact, you found the solution (not completed) on the form of implicit equation : $$e^{-x^2}[x^2y^3+2y^2+\phi (x)]=f(x,y)=c$$ which total derivative is : $$\frac{\partial f(x,y)}{\partial x}dx+\frac{\partial f(x,y)}{\partial y}dy = 0$$ $\frac{\partial f(x,y)}{\partial x}=\frac{\partial}{\partial x}e^{-x^2}[x^2y^3+2y^2+\phi ]=e^{-x^2}[ -2x^3y^3-4xy^2-2x\phi (x)+2xy^3+\phi']$

$\frac{\partial f(x,y)}{\partial y}= \frac{\partial}{\partial y}e^{-x^2}[x^2y^3+2y^2+\phi ]=e^{-x^2}[3x^2y^2+4y]$

$$e^{-x^2}[ -2x^3y^3-4xy^2-2x\phi (x)+2xy^3+\phi']dx+e^{-x^2}[3x^2y^2+4y^2]dy=0$$ $$[ -2x^3y^3-4xy^2-2x\phi (x)+2xy^3+\phi']+[3x^2y^2+4y]\frac{dy}{dx}=0$$ To be compared to the original equation $\quad (2xy^3-2x^3y^3-4xy^2+2x)+(3x^2y^2+4y)y'=0$

This implies $\quad -2x\phi(x)=2x \quad\to\quad \phi(x)=-1$

Finally, the solution on implicit form is : $$e^{-x^2}[x^2y^3+2y^2-1]=c$$ where $c$ is any constant.

This implicit equation could be solved for $y(x)$ in order to express the solution on explicit form. But the roots of the cubic polynomial equation $\quad x^2y^3+2y^2-1=c\:e^{x^2}\quad$ are complicated formulas.

Also, it can be solved for the inverse function $x(y)$ : $$x(y)=\pm y^{-3/2}\sqrt{1-2y^2-y^3W\left(c\:y^{-3}e^{y^{-3}-2y^{-1} }\right)}$$ $W(\:)$ is the Lambert W function.