Example 3.31. Find the derivatives $y^{\prime}$ and $y^{\prime \prime}$ of the function given implicitly by the equation: $x^{y}-y^{x}=0$.
Solution. The derivative of an implicit function of one variable will be found using formula (3.19). In the considered case, $F(x, y)=x^{y}-y^{x}$. We find the partial derivatives $F_{x}^{\prime}$ and $F_{y}^{\prime}$ according to formula (3.19). We have:

$$
F_{x}^{\prime}=y x^{y-1}-y^{x} \ln y ; F_{y}^{\prime}=x^{y} \ln x-x y^{x-1}
$$

Substituting the found partial derivatives into (3.19):

$$
y^{\prime}=-\frac{y x^{y-1}-y^{x} \ln y}{x^{y} \ln x-x y^{x-1}}
$$

The obtained expression for $y^{\prime}$ can be simplified by using the equation defining the implicit function. According to the equation $x^{y}=y^{x}$ and $y \ln x=x \ln y$. Taking this into account, we get

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

Thus,

$$
y^{\prime}=\frac{y^{2}}{x^{2}} \frac{\ln x-1}{\ln y-1}
$$

The second-order derivative $y^{\prime \prime}$ will be found by differentiating the obtained expression for $y^{\prime}$ with respect to $x$. We have, successively differentiating the product and substituting the previously obtained expression,

$$
\begin{gathered}
y^{\prime \prime}=\left(\frac{\ln x-1}{x^{2}}\right)_{x}^{\prime} \frac{y^{2}}{\ln y-1}+\frac{\ln x-1}{x^{2}}\left(\frac{y^{2}}{\ln y-1}\right)_{x}^{\prime}= \\
=\frac{x^{2} \frac{1}{x}-2 x(\ln x-1)}{x^{4}(\ln y-1)} y^{2}+\frac{(\ln x-1)\left(2 y y^{\prime}(\ln y-1)\right)-y^{2} \frac{y^{\prime}}{y}}{x^{2}(\ln y-1)^{2}}= \\
=\frac{(3-2 \ln x) y^{2}}{x^{3}(\ln y-1)}+\frac{(\ln x-1)^{2}(2 \ln y-3) y^{3}}{x^{4}(\ln y-1)^{3}}= \\
=\frac{x(3-2 \ln x)(\ln y-1)^{2}+y(\ln x-1)^{2}(2 \ln y-3)}{x^{4}(\ln y-1)^{3}} y^{2}
\end{gathered}
$$