Example 4.7. Find the general integral of the equation

$$
\left(x^{2}+y^{2}\right) d x-x y d y=0
$$
Solution. Let's solve the equation with respect to the derivative $\frac{d y}{d x}$:

$$
y^{\prime}=\frac{x^{2}+y^{2}}{x y} \text {. }
$$

By dividing the numerator and the denominator of the right-hand side of the equation by $x^{2}$, we get:

$$
y^{\prime}=\frac{1+\frac{y^{2}}{x^{2}}}{\frac{y}{x}}
$$

i.e., $y^{\prime}$ is a function of the ratio $\frac{y}{x}$. This means that the given equation is homogeneous.

To solve this equation, we introduce a new function $u=\frac{y}{x}$. Then $y=u x$ and $y^{\prime}=\frac{d u}{d x} x+u$. The equation (*) transforms into a separable equation:

$$
x \frac{d u}{d x}+u=\frac{1+u^{2}}{u}
$$

or

$$
x \frac{d u}{d x}=\frac{1}{u}
$$

from which

$$
\frac{d x}{x}=u d u
$$

Integrating this equation, we get

$$
\ln |x|=\frac{u^{2}}{2}+\ln C
$$

from which

$$
\ln \frac{x}{C}=\frac{u^{2}}{2}
$$

i.e.,

$$
x=C e^{\frac{u^{2}}{2}}
$$

Substituting $u$ with the ratio $\frac{y}{x}$ in the last equation, we finally get:

$$
x=C e^{\frac{y^{2}}{2 x^{2}}}.
$$