Example 3 (to item $4^{\circ}$). For the function $y(x)$ defined implicitly by the equation $y e^{x}+e^{y}=e+1$, find $y^{\prime \prime}$.
Solution. After two consecutive differentiations of the given equation with respect to $y=y(x)$, we obtain

$$
y^{\prime} e^{x}+e^{x} y+e^{y} y^{\prime}=0
$$

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

From the second equality, we find

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

From the first equality, we find

$$
y^{\prime}=-\frac{y e^{x}}{e^{x}+e^{y}}
$$

and substitute this into the previous equality. After simplification, we obtain

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