Rewrite: 4xy+y²+(2x²-2y)dy/dx=0
Let M=4xy+y² then ∂M/∂y=4x+2y.
Let N=2x²-2y then ∂N/∂x=4x.
So the DE is proved to be inexact.
Assume it should have been 4xy+x²+(2x²-2y)dy/dx=0 that is:
x(4y+x)dx+2(x²-y)dy=0, then ∂M/∂y=4x=∂N/∂x.
Let F(x,y)=c be the solution, where c is a constant, then
dF/dx=∂F/∂x+∂F/∂y.dy/dx=M+Ndy/dx=0.
So, ∂F/∂x=M=4xy+x² and ∂F/∂y=N=2x²-2y.
From this we have a choice of two integrals from which to derive F.
Let’s pick ∂F/∂x=4xy+x², so F=∫(4xy+x²)dx=2x²y+x³/3+f(y).
Note that the differential wrt x of f(y)=0 because it’s treated as a constant since it contains only y terms.
Using this for F we find ∂F/∂y=2x²+f'(y)=N=2x²-2y, so f'(y)=-2y and f(y)=-y²+C where C is a constant of integration.
Therefore F=2x²y+x³/3-y²+C.
Now, let’s use ∂F/∂y=2x²-2y, so F=∫(2x²-2y)dy=2x²y-y²+g(x).
∂F/∂x=4xy+g'(x)=4xy+x², g'(x)=x², g(x)=x³/3+C.
Therefore F=2x²y-y²+x³/3+C. This is the same equation as before.
CHECK
Differentiate F:
2x²dy/dx+4xy-2ydy/dx+x²=0, 4xy+x²+(2x²-2y)dy/dx=0, the original DE (exact version).