← Back to learning objective

Implicit differentiation of x^y = y^x using logarithms

Consider the curve defined implicitly by xy=yx.x^y = y^x. Use logarithmic implicit differentiation (take ln⁡\ln of both sides, then differentiate with respect to xx) to find dydx\dfrac{dy}{dx} in terms of xx and yy.

Hint

Take the natural log of both sides first to turn the exponents into products: yln⁡x=xln⁡yy\ln x = x\ln y. Then differentiate both sides with respect to xx, remembering to use the product rule on each side and the chain rule for ddx[ln⁡y]=1ydydx\frac{d}{dx}[\ln y] = \frac{1}{y}\frac{dy}{dx}. Finally, collect all terms containing dydx\frac{dy}{dx} on one side and solve.

Step-by-step solution

Take the natural logarithm of both sides of xy=yxx^y = y^x to get yln⁡x=xln⁡yy\ln x = x \ln y. This removes the variable exponents so the equation can be differentiated using the product rule instead of needing logarithmic differentiation on exponentials directly.

Differentiate both sides with respect to xx, applying the product rule to each side: on the left, dydxln⁡x+y⋅1x\frac{dy}{dx}\ln x + y\cdot\frac{1}{x}; on the right, ln⁡y+x⋅1ydydx\ln y + x\cdot\frac{1}{y}\frac{dy}{dx}. This gives dydxln⁡x+yx=ln⁡y+xydydx.\frac{dy}{dx}\ln x + \frac{y}{x} = \ln y + \frac{x}{y}\frac{dy}{dx}.

Collect all terms containing dydx\frac{dy}{dx} on one side: dydx(ln⁡x−xy)=ln⁡y−yx.\frac{dy}{dx}\left(\ln x - \frac{x}{y}\right) = \ln y - \frac{y}{x}. Solving for dydx\frac{dy}{dx} gives dydx=ln⁡y−yxln⁡x−xy,\frac{dy}{dx} = \frac{\ln y - \dfrac{y}{x}}{\ln x - \dfrac{x}{y}}, which can also be written as dydx=y(xln⁡y−y)x(yln⁡x−x)\dfrac{dy}{dx} = \dfrac{y(x\ln y - y)}{x(y\ln x - x)} after clearing fractions.

Related problems

Practice similar Calculus problems interactively.

Start Closing the Gap