Example 2. Find the particular solution of the equation

$$
\left(1+e^{x}\right) y y^{\prime}=e^{x}
$$

satisfying the initial condition $\left.y\right|_{x=0}=1$.
Solution. We have

$$
\left(1+e^{x}\right) y \frac{d y}{d x}=e^{x}
$$

Separating variables, we get

$$
y d y=\frac{e^{x} d x}{1+e^{x}}
$$

Integrating, we find the general integral

$$
\frac{y^{2}}{2}=\ln \left(1+e^{x}\right)+C
$$

Assuming in (1) $x=0$ and $y=1$, we have

$$
\frac{1}{2}=\ln 2+C, \quad \text { from which } \quad C=\frac{1}{2}-\ln 2
$$

Substituting the found value of $C$ into (1), we get the particular solution

$$
y^{2}=1+\ln \left(\frac{1+e^{x}}{2}\right)^{2}, \quad \text { from which } \quad y= \pm \sqrt{1+\ln \left(\frac{1+e^{x}}{2}\right)^{2}},
$$

From the initial condition, it follows that $y>0\left(\left.y\right|_{x=0}=1>0\right)$, so we take the plus sign before the root. Thus, the desired particular solution is

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