8
$\begingroup$

Solving $x^y = y^x$ analytically in terms of the Lambert $W$ function

This "solution" for $x^y=y^x$ should simplify to $y=x$, but for some reason no pointed that out in the OP.

According to the stack exchange, the answer is $y= \frac{-xW(-\frac{ln(x)}{x})}{ln(x)}$. However, the term $\frac{-ln(x)}{x}$ itself can be rewritten as

$$\frac{-ln(x)}{x}=-ln(x)e^{-ln(x)}$$

Therefore, the productlog of that expression should simplify as follows,

$y= \frac{-xW(-\frac{ln(x)}{x})}{ln(x)}, \ \ \ \ \ $ $y= \frac{-xW(-ln(x)e^{-ln(x)})}{ln(x)}, \ \ \ \ \ $ $y=\frac{-x(-ln(x))}{ln(x)}=x$

Did this simplification just slip past everyone or is there something wrong about my algebra?

$\endgroup$
  • 7
    $\begingroup$ Why should it reduce to that? $x=4$ and $y=2$ has $x \neq y$. $\endgroup$ – Randall Jan 14 at 3:54
  • 4
    $\begingroup$ No, $2^4=16=4^2$. $\endgroup$ – Randall Jan 14 at 3:56
  • 8
    $\begingroup$ I'm just confused why the solution "should" simplify to $x=y$ when there are solutions that do not satisfy $x = y$. $\endgroup$ – Randall Jan 14 at 3:58
  • 1
    $\begingroup$ Anyway, to potentially answer your question, your algebra moves are invalid if $x$ is negative, and there are solutions with negative $x$. $\endgroup$ – Randall Jan 14 at 3:59
  • 1
    $\begingroup$ But if the solution is algebraically equivalent to $y=x$, so why does the original representation contain any more solutions than $y=x$? There is definitely something more complicated being left out here. $\endgroup$ – user14554 Jan 14 at 4:07
11
$\begingroup$

The Lambert $W$ function is not single-valued for negative arguments.

enter image description here

Using your "simplification" forces use of the lower branch, $W \leq -1$ when you assume $W^{-1}(-\ln x)$ only equals $-\ln (x) \mathrm{e}^{- \ln x}$. (The same thing happens when you assume the only square root of $3^2$ is $3$ or the only arcsine of $1$ is $-3\pi/2$.) You get two values from $W^{-1}(-\ln x)$ having the same algebraic form, but one has $0 < x \leq \mathrm{e}$ and one has $x > \mathrm{e}$. ("$3^2$" and "$(-3)^2$" have the same algebraic form, "$x^2$", but one has $x>0$ and one has $x < 0$.)

This is indicated explicitly in the identities at the Lambert $W$ function article on the English Wikipedia.

Edit: Got myself turned around with too many minus signs. I originally claimed the $x=y$ solutions were on $W \geq -1$, but this is backwards. It is corrected above.

$\endgroup$
  • $\begingroup$ What is confusing is how $W(z)e^{W(z)}=z$ always simplifies no matter which branch you use, but $W(ze^{z})$ does not. $\endgroup$ – user14554 Jan 14 at 4:18
  • $\begingroup$ +1 for the first parenthetical. $\endgroup$ – Randall Jan 14 at 4:19
  • $\begingroup$ @user14554 : This is the usual problem with inverse functions. $\sqrt{9} = 3$, but "the things which square to $9$" is $\{-3,3\}$. This is always lurking around when you are solving equations. $\endgroup$ – Eric Towers Jan 14 at 4:19
  • 1
    $\begingroup$ @user14554 : When $x = 6$, $W_{-1}$ gives $y = 6$ and $W_0$ gives $y = 1.624\dots$. You get them back the same way you do with any other function whose domain must be restricted to obtain the inverse function: you use a full set of inverses whose ranges cover the entire domain of the unrestricted function. $\endgroup$ – Eric Towers Jan 14 at 4:27
  • 1
    $\begingroup$ @user14554 : I disagree. Every time you apply a $W^{-1}$, you get a contribution from $W_0$ and another from $W_{-1}$. You are, of course, free to incorrectly ignore solutions. I, on the other hand, will continue to find that $(x^2 - 3)^2-1=0$ has four real roots. $\endgroup$ – Eric Towers Jan 14 at 5:08
2
$\begingroup$

The solution is:

$$y = -\frac{x W\left(-\frac{\log (x)}{x}\right)}{\log (x)}$$

which has the following form:

enter image description here

Clearly there are solutions other than $x = y$. Indeed, we see that for $y=2$ we can have $x=2$ or $x=4$ (intersection between blue and red dashed line).

$\endgroup$
  • $\begingroup$ So it has something to do with the multiple branches of the log and productlog then. For $W_{0}(x)$ it simplifies, but when it changes to $W_{-1}(x)$ it doesn't. $\endgroup$ – user14554 Jan 14 at 4:09
  • $\begingroup$ I think OP's question is why isn't the blue line simply $y=x$? It is tantalizing that it is $y=x$ for a while and then there's a sudden change. $\endgroup$ – Randall Jan 14 at 4:09
  • $\begingroup$ Right, why isn't it $y=x$ all the way. $\endgroup$ – user14554 Jan 14 at 4:09
  • $\begingroup$ @user14554 I see your question now. $\endgroup$ – Randall Jan 14 at 4:10
  • $\begingroup$ user14554 and Randall: There must be a branch cut in the Lambert W function. $\endgroup$ – David G. Stork Jan 14 at 4:11

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.