Example 2. Solve the differential equation

$$
\left(x^{3}+x y^{2}\right) d x+\left(x^{2} y+y^{3}\right) d y=0
$$
Solution. Here $\frac{\partial M}{\partial y}=2 x y, \frac{\partial N}{\partial x}=2 x y$, so condition (2) is satisfied and, consequently, the given equation is an equation in total differentials. This equation can easily be brought to the form $d u=0$ by direct grouping of its terms. For this purpose, rewrite it as follows:

$$
x^{3} d x+x y(y d x+x d y)+y^{3} d y=0
$$

Obviously,

$$
x^{3} d x=d\left(\frac{x^{4}}{4}\right), \quad x y(y d x+x d y)=x y d(x y)=d\left(\frac{(x y)^{2}}{2}\right), \quad y^{3} d y=d\left(\frac{y^{4}}{4}\right)
$$

Therefore, equation (4) can be written as

$$
d\left(\frac{x^{4}}{4}\right)+d\left(\frac{(x y)^{2}}{2}\right)+d\left(\frac{y^{4}}{4}\right)=0
$$

or

$$
d\left[\frac{x^{4}}{4}+\frac{(x y)^{2}}{2}+\frac{y^{4}}{4}\right]=0
$$

Consequently,

$$
x^{4}+2(x y)^{2}+y^{4}=C
$$

is the general integral of equation (4).

## Problems for Independent Solution

Integrate the equations in total differentials:

175. $x\left(2 x^{2}+y^{2}\right)+y\left(x^{2}+2 y^{2}\right) y^{\prime}=0$.
176. $\left(3 x^{2}+6 x y^{2}\right) d x+\left(6 x^{2} y+4 y^{3}\right) d y=0$.
177. $\left(\frac{x}{\sqrt{x^{2}+y^{2}}}+\frac{1}{x}+\frac{1}{y}\right) d x+\left(\frac{y}{\sqrt{x^{2}+y^{2}}}+\frac{1}{y}-\frac{x}{y^{2}}\right) d y=0$.
178. $\left(3 x^{2} \operatorname{tg} y-\frac{2 y^{3}}{x^{3}}\right) d x+\left(x^{3} \sec ^{2} y+4 y^{3}+\frac{3 y^{2}}{x^{2}}\right) d y=0$.
179. $\left(2 x+\frac{x^{2}+y^{2}}{x^{2} y}\right) d x=\frac{x^{2}+y^{2}}{x y^{2}} d y$.
180. $\left(\frac{\sin 2 x}{y}+x\right) d x+\left(y-\frac{\sin ^{2} x}{y^{2}}\right) d y=0$.
181. $\left(3 x^{2}-2 x-y\right) d x+\left(2 y-x+3 y^{2}\right) d y=0$.
182. $\left(\frac{x y}{\sqrt{1+x^{2}}}+2 x y-\frac{y}{x}\right) d x+\left(\sqrt{1+x^{2}}+x^{2}-\ln x\right) d y=0$.
183. $\frac{x d x+y d y}{\sqrt{x^{2}+y^{2}}}+\frac{x d y-y d x}{x^{2}}=0$.
184. $\left(\sin y+y \sin x+\frac{1}{x}\right) d x+\left(x \cos y-\cos x+\frac{1}{y}\right) d y=0$.
185. $\frac{y+\sin x \cos ^{2} x y}{\cos ^{2} x y} d y+\left(\frac{x}{\cos ^{2} x y}+\sin y\right) d y=0$.
186. $\frac{2 x d x}{y^{3}}+\frac{\left(y^{2}-3 x^{2}\right) d y}{y^{4}}=\left.0 \quad y\right|_{x=1}=1$.
187. $y\left(x^{2}+y^{2}+a^{2}\right) d y+x\left(x^{2}+y^{2}-a^{2}\right) d x=0$.
188. $\left(3 x^{2} y+y^{3}\right) d x+\left(x^{3}+3 x y^{2}\right) d y=0$.

$2^{\circ}$. Integrating Factor. In some cases, when equation (1) is not an equation in total differentials, it is possible to find a function $\mu(x, y)$, such that after multiplying by it, the left side of (1) becomes a total differential

$$
d u=\mu M d x+\mu N d y
$$

Such a function $\mu(x, y)$ is called an integrating factor. From the definition of the integrating factor, we have

$$
\frac{\partial}{\partial y}(\mu M)=\frac{\partial}{\partial x}(\mu N)
$$

or

$$
N \frac{\partial \mu}{\partial x}-M \frac{\partial \mu}{\partial y}=\left(\frac{\partial M}{\partial y}-\frac{\partial N}{\partial x}\right) \mu
$$

from which

$$
N \frac{\partial \ln \mu}{\partial x}-M \frac{\partial \ln \mu}{\partial y}=\frac{\partial M}{\partial y}-\frac{\partial N}{\partial x}
$$

We have obtained an equation in partial derivatives for finding the integrating factor.

Let us note some special cases where it is relatively easy to find a solution to equation (5), i.e., to find the integrating factor.

1. If $\mu=\mu(x)$, then $\frac{\partial \mu}{\partial y}=0$ and equation (5) will take the form

$$
\frac{d \ln \mu}{d x}=\frac{(\partial M / \partial y)-(\partial N / \partial x)}{N}
$$

For the existence of an integrating factor that does not depend on $y$, it is necessary and sufficient that the right-hand side of (6) be a function of $x$ only. In such a case, $\ln \mu$ can be found by quadrature.