Show that (2x+y-yx^2) dx+x(1+x^2) dy=0 has an integrating…
Show that $(2x+y-yx^2)\,dx+x(1+x^2)\,dy=0$ has an integrating factor and find its general integral. (The natural guess $\mu=\mu(x^2+y^2)$ is tested first; it turns out not to satisfy the required condition, but $\mu=\mu(x)$ does.)
Explanation of Method
With $M=2x+y(1-x^2)$, $N=x(1+x^2)$, the test for $\mu(r)$, $r=x^2+y^2$, fails to depend on $r$ alone, so instead test $\mu=\mu(x)$, which succeeds; solve the resulting linear ODE for $\mu(x)$ and integrate the exact equation.
Step 1: Check exactness
$M_y=1-x^2$, $N_x=(1+x^2)+2x^2=1+3x^2$. Since $M_y\ne N_x$, the equation is not exact.
Step 2: Rule out $\mu(x^2+y^2)$
The condition $\mu(M_y-N_x)=(2xN-2yM)\mu'(r)$ requires $\dfrac{M_y-N_x}{2xN-2yM}=\dfrac{-4x^2}{2xN-2yM}$ to depend only on $r=x^2+y^2$. Evaluating at two points with the same $r=1$ (e.g. $(x,y)=(1,0)$ and $(0,1)$) gives different values, so no such $\mu(r)$ exists — the form suggested in the problem statement does not actually apply here.
Step 3: Test $\mu(x)$
For $\mu=\mu(x)$ the standard test is $\dfrac{1}{\mu}\dfrac{d\mu}{dx}=\dfrac{M_y-N_x}{N}=\dfrac{(1-x^2)-(1+3x^2)}{x(1+x^2)}=\dfrac{-4x^2}{x(1+x^2)}=\dfrac{-4x}{1+x^2}$, a function of $x$ alone. So $\mu=\mu(x)$ exists.
Step 4: Solve for $\mu(x)$
$\ln|\mu|=\displaystyle\int\frac{-4x}{1+x^2}\,dx=-2\ln(1+x^2)$, so $\mu(x)=\dfrac{1}{(1+x^2)^2}$.
Step 5: Multiply and verify exactness
$M_1=\dfrac{2x+y(1-x^2)}{(1+x^2)^2}$, $N_1=\dfrac{x}{1+x^2}$. Then $\partial_yM_1=\dfrac{1-x^2}{(1+x^2)^2}=\partial_xN_1$, so the equation is exact.
Step 6: Find the potential function
Integrating $F_y=N_1$ gives $F=\dfrac{xy}{1+x^2}+h(x)$. Matching $F_x=\dfrac{y(1-x^2)}{(1+x^2)^2}+h'(x)$ to $M_1$ gives $h'(x)=\dfrac{2x}{(1+x^2)^2}$, so $h(x)=-\dfrac{1}{1+x^2}$.
Result
Final answer:
\[\boxed{\ \frac{xy-1}{1+x^2}=C\quad\Longleftrightarrow\quad xy-1=C(1+x^2)\ }\]
(verified symbolically: multiplying by $\mu=1/(1+x^2)^2$ makes the equation exact, and the total differential of $F=(xy-1)/(1+x^2)$ reproduces the original equation exactly).