Wolfram Alpha gives the solutions to $x^y=y^x$, where $W$ is the Lambert $W$ function:


I'm not very familiar with how to manipulate the Lambert $W$ function, so I am a little lost when it comes to deriving the solutions that Wolfram Alpha came up with.

Here is my attempt:






Substituting $x=\frac{y\log(x)}{\log(y)}$ for $\log(x)$ gives an equation that reduces to $x=x$. I understand that if I can get a expression of the form $f(x)e^{f(x)}$, $W(f(x))$ becomes a solution for $f(x)$ (ick, that's the wrong way to phrase it), but I'm just not sure how to get such an expression.

  • $\begingroup$ "that reduces to x=x" ? Isn't there a typo ? $\endgroup$ – Peter Sep 13 '17 at 19:12

Let's continue from the fourth equation of your attempt: $$\frac{\log(x)}{x}=\frac{\log(y)}{y}$$

Based on the form of the left hand side, it is convenient to substitute $x=e^{-u}$. Then, we obtain for the LHS: $$\frac{\log(x)}{x}=\frac{-u}{e^{-u}}=-ue^u$$ As a consequence of our substitution, it is easy to see that we can just simply apply the definition of the Lambert W function. This gives us: $$u=W\left(-\frac{\log(y)}{y}\right)$$

Note that if you just simply substitute back to obtain $x$, you will obtain the following: $$x=e^{-W\left(-\frac{\log(y)}{y}\right)}$$ This is an acceptable solution, but note that you can make use of the identity $e^{-W(z)}=\dfrac{W(z)}{z}$ (a specific case of the more general identity $e^{nW(z)}=z^n W(z)^{-n}, n\in \mathbb{Z}$) to obtain the solution in the same form as Wolfram Alpha.


Write $$x=y^{x/y}=e^{x\ln y/y}.$$

Then with $x\ln y/y=-t$,

$$-t\frac y{\ln y}=e^{-t},$$

$$te^t=-\frac{\ln y}y.$$


Hint : Substituting $\log(x)=u$ transforms $\frac{\log(x)}{x}$ into $\frac{u}{e^u}=ue^{-u}=-(-ue^{-u})$

  • $\begingroup$ This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review $\endgroup$ – mlc Sep 13 '17 at 19:32
  • 1
    $\begingroup$ I do not agree. The substitution leads to an expression of the form $ye^y$ so that the Lambert-W-function can be applied. And the question above whether "x=x" is a typo has nothing to do with my answer. $\endgroup$ – Peter Sep 13 '17 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.