Example 8. Solve the Bernoulli equation

$$
x y^{\prime}+y=y^{2} \ln x
$$
Solution. We apply the method of variation of arbitrary constant. The general solution of the corresponding homogeneous equation $x y^{\prime}+y=0$ is $y=\frac{C}{x}$. We seek the general solution of equation (16) in the form

$$
y=\frac{C(x)}{x}
$$

where $C(x)$ is a new unknown function.

Substituting (17) into (16), we get

$$
C^{\prime}(x)=C^{2}(x) \frac{\ln x}{x^{2}}
$$

To find the function $C(x)$, we obtain a separable variable equation, from which, separating the variables and integrating, we find

$$
\frac{1}{C(x)}=\frac{\ln x}{x}+\frac{1}{x}+C ; \quad C(x)=\frac{x}{1+C x+\ln x}
$$

The general solution of equation (16) is

$$
y=\frac{1}{1+C x+\ln x}
$$

Some nonlinear first-order equations can be reduced to linear equations or Bernoulli equations by a well-chosen change of variables.