Example 1. Solve the equation $x y^{\prime}=\sqrt{x^{2}-y^{2}}+y$.
Solution. Let's write the equation in the form

$$
y^{\prime}=\sqrt{1-\left(\frac{y}{x}\right)^{2}}+\frac{y}{x}
$$

so that the given equation turns out to be homogeneous with respect to $x$ and $y$. Let $u=\frac{y}{x}$, or $y=u x$. Then $y^{\prime}=x u^{\prime}+u$. Substituting the expressions for $y$ and $y^{\prime}$ into the equation, we get

$$
x \frac{d u}{d x}=\sqrt{1-u^{2}} .
$$

Separating the variables:

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

From this, by integration, we find

$$
\arcsin u=\ln |x|+\ln C_{1}\left(C_{1}>0\right) \text {, or } \quad \arcsin u=\ln C_{1}|x| .
$$

Since $C_{1}|x|= \pm C_{1} x$, denoting $\pm C_{1}=C$, we get $\arcsin u=\ln C x$, where $|\ln C x| \leqslant \frac{\pi}{2}$ or $e^{-\pi / 2} \leqslant C x \leqslant e^{\pi / 2}$. Replacing $u$ with $\frac{y}{x}$, we obtain the general integral

$$
\arcsin \frac{y}{x}=\ln C x
$$

From this, the general solution is: $y=x \sin \ln C x$.

When separating the variables, we divided both sides of the equation by the product $x \sqrt{1-u^{2}}$, so we could have lost solutions that make this product zero.

Now let's set $x=0$ and $\sqrt{1-u^{2}}=0$. But $x \neq 0$ due to the substitution $u=\frac{y}{x}$, and from the relation $\sqrt{1-u^{2}}=0$ we get that $1-\frac{y^{2}}{x^{2}}=0$, from which $y= \pm x$. Direct verification shows that the functions $y=-x$ and $y=x$ are also solutions to the given equation.

![](https://cdn.mathpix.com/cropped/2024_05_22_a0612bb33256580e6dcdg-028.jpg?height=433&width=427&top_left_y=159&top_left_x=827)

Fig. 12