Show that (2xy^2-y) dx+(y^2+x+y) dy=0 has an integrating…
Show that $(2xy^2-y)\,dx+(y^2+x+y)\,dy=0$ has an integrating factor of the form $\mu=\mu(x)$ or $\mu=\mu(y)$, and find its general integral.
Explanation of Method
With $M=2xy^2-y,\ N=y^2+x+y$, show $\mu(x)$ fails but $\dfrac{N_x-M_y}{M}=-\dfrac2y$ depends only on $y$, giving $\mu(y)=1/y^2$.
Step 1: Test exactness
$M_y=4xy-1,\ N_x=1$, so $M_y\ne N_x$: not exact.
Step 2: Rule out $\mu(x)$, find $\mu(y)$
\[\frac{M_y-N_x}{N}=\frac{4xy-2}{y^2+x+y}\]
depends on both variables. But
\[\frac{N_x-M_y}{M}=\frac{2-4xy}{2xy^2-y}=\frac{2(1-2xy)}{y(2xy-1)}=-\frac2y,\]
a function of $y$ alone, so $\mu(y)=y^{-2}$.
Step 3: Multiply and verify exactness
Multiplying by $1/y^2$: $M_1=2x-\dfrac1y,\ N_1=1+\dfrac{x}{y^2}+\dfrac1y$, and $(M_1)_y=\dfrac1{y^2}=(N_1)_x$: exact.
Step 4: Integrate to find $F$
$F=\displaystyle\int\Big(2x-\frac1y\Big)dx=x^2-\frac{x}{y}+g(y)$; matching $F_y=N_1$ gives $g'(y)=1+\dfrac1y$, so $g(y)=y+\ln|y|$.
Result
Final answer:
\[\boxed{\,x^2-\frac{x}{y}+y+\ln|y|=C\,}\qquad\text{equivalently (multiply by }y\text{)}\qquad \boxed{\,x^2y-x+y^2+y\ln|y|=Cy\,}\]
(verified with sympy: after multiplying by $\mu=1/y^2$ the equation is exact, $F_x-M_1\equiv0$ and $F_y-N_1\equiv0$ identically, and $(N_x-M_y)/M\equiv -2/y$ confirms the integrating factor.)