Example 3. Solve the equation $\left(x+y^{2}\right) d x-2 x y d y=0$.
Solution. Here $M=x+y^{2}, N=-2 x y$. We have

$$
\frac{(\partial M / \partial y)-(\partial N / \partial x)}{N}=\frac{2 y+2 y}{-2 x y}=-\frac{2}{x}
$$

therefore,

$$
\frac{d \ln \mu}{d x}=-\frac{2}{x}, \quad \ln \mu=-2 \ln |x|, \quad \mu=\frac{1}{x^{2}}
$$

## Equation

$$
\frac{x+y^{2}}{x^{2}} d x-2 \frac{x y}{x^{2}} d y=0
$$

is an equation in total differentials. Its left side can be represented as

$$
\frac{d x}{x}-\frac{2 x y d y-y^{2} d x}{x^{2}}=0, \quad \text { from which } \quad d\left(\ln |x|-\frac{y^{2}}{x}\right)=0
$$

and the general integral of the given equation is

$$
x=C \cdot e^{y^{2} / x}
$$

2. Similarly, if $\left(\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}\right) \frac{1}{M}$ is a function of $y$ only, then equation (1) has an integrating factor $\mu=\mu(y)$, depending only on $y$.