Answer
$C=2e^{2x}+xy(x-y)+\frac{y^3}{3}$
Work Step by Step
We are given:
$$(4e^{2x}+2xy-y^2)dx+(x-y)^2dy=0 (1)$$
Here,
$M(x,y)=\frac{\partial}{\partial y}(4e^{2x}+2xy-y^2)=2(x-y)$
$N(x,y)=\frac{\partial}{\partial x}(x-y)^2=2(x-y)$
$M_y=2(x-y)\;\;\;\;,\;\;\;\;N_x=2(x-y)$
$M_y=N_x$
$\Rightarrow$ (1) is exact differential equation
Therefore there exists a potential function $\phi$ such that
$\frac{\partial\phi}{\partial x}=4e^{2x}+2xy-y^2$ ___(2)
Integrating (2) with respect to $x$ holding $y$ fixed
$\phi =2e^{2x}+xy(x-y)+f(y)$ ___(3)
Where $f(y)$ is arbitrary function of $y$
Hence we get:
$\frac{\partial\phi}{\partial y}=x^2-2xy+f'(y)=(x-y)^2 \rightarrow f'(y)=y^2$ (4)
Differentiate (4) with respect to $y$:
$f(y)=\frac{y^3}{3}$
$C_1$ is constant
The solution is:
$\phi(x,y)=2e^{2x}+xy(x-y)+\frac{y^3}{3}+C$
and $\phi(x,y)=0$
so:
$C=2e^{2x}+xy(x-y)+\frac{y^3}{3}$