1373. Integrate the equation

$$
x d y=(x+y) d x
$$

and find the particular solution that satisfies the initial conditions $y=2$ when $x=-1$.
Solution. We will solve the given equation with respect to the derivative. We obtain an equation of the form (6):

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

The function on the right-hand side of this equation is homogeneous of degree zero, hence the original equation is homogeneous. We apply the substitution $y=u x$. We find the derivative $y^{\prime}=u^{\prime} x+u$ and substitute the new values of $y$ and $y^{\prime}$ into the equation. We obtain a separable variable equation

$$
u^{\prime} x+u=\frac{x+u x}{x}
$$

from which

$$
\begin{aligned}
u^{\prime} x & =1, \quad d u=\frac{d x}{x} \\
u=\ln |x|+C, \quad \frac{y}{x} & =\ln |x|+C, \quad y=x \ln |x|+C x
\end{aligned}
$$

We find the particular solution that satisfies the initial conditions. If $x=-1, y=2$, then

$$
2=-1 \ln 1-C, C=-2, y=x \ln |x|-2 x
$$