Problem 218
Medium Differentiation Techniques

Find y' for x^y = y^x, x,y > 0

Find $y'$ for $x^{y} = y^{x}$, $x,y \gt 0$.

Explanation of Method

Take logarithms first, then differentiate implicitly.

Step 1: Take logarithms of both sides

With the variable in both base and exponent on each side, logarithms are the only practical first move: \[y\ln x = x\ln y. \tag{1}\]

Step 2: Differentiate (1) with respect to $x$

Both sides are products of two functions of $x$: $y'\ln x + \frac{y}{x} = \ln y + \frac{x\,y'}{y}$.

Step 3: Collect the terms containing $y'$

\[ y'\left(\ln x - \frac{x}{y}\right) = \ln y - \frac{y}{x}. \]

Step 4: Solve and clear the fractions

Multiplying numerator and denominator by $xy$: \[y' = \frac{\ln y - \dfrac{y}{x}}{\ln x - \dfrac{x}{y}} = \frac{xy\ln y - y^{2}}{xy\ln x - x^{2}} = \frac{y\bigl(x\ln y - y\bigr)}{x\bigl(y\ln x - x\bigr)}.\]

Step 5: Verification

The line $y = x$ satisfies $x^{y} = y^{x}$ trivially, and the formula returns its slope: \[y = x:\quad y' = \frac{x\bigl(x\ln x - x\bigr)}{x\bigl(x\ln x - x\bigr)} = 1 \;\;\checkmark\]

\[(x,y) = (2,4):\quad 2^{4} = 16 = 4^{2} \;\checkmark; \qquad y' = \frac{4\bigl(2\ln 4-4\bigr)}{2\bigl(4\ln 2-2\bigr)} \approx -1.24902\]

Step 6: The two branches

The solution set of $x^{y} = y^{x}$ consists of the line $y = x$ together with a separate curve through $(2,4)$ and $(4,2)$ — the only integer pair with $2^{4} = 4^{2}$. On the second branch the slope is negative, as the computation above confirms.


Result

Final answer:

\[\boxed{\,y' = \dfrac{y\bigl(x\ln y - y\bigr)}{x\bigl(y\ln x - x\bigr)}\,}\]

Remark

Remark. The expression is antisymmetric in a precise sense: swapping $x \leftrightarrow y$ replaces $y'$ by $1/y'$, which is what one expects, since the relation is symmetric and reflecting a curve in $y=x$ inverts its slopes. At $(2,4)$ the slope is $\approx -1.249$; at $(4,2)$ it is $\approx -0.801 = 1/(-1.249)$.