Are these two methods of solving for x in $x^c=c^x$ using Lambert W functions correct?

59 Views Asked by At

I've identified two ways of solving for $x$ in $x^c=c^x$ using Lambert W functions, but my methods arrive at different expressions. I'm trying to determine if the expressions are valid or there are mistakes made in the derivation. (I believe if the expressions are valid they must also be equal, but they don't match any check for equality that I know about). The analysis assumes $c,x>0$

In the derivation shown my first method arrives at $x=e^{-W{(-\ln(c)/c)}}$ and my second method arrives at $x=\frac{-cW(-\ln(⁡c)/c)}{\ln(⁡c)}$

Steps performed - method 1 $$ x^c=c^x $$ Take natural logs, divide through by $x$ and $c$ $$ \frac{ln(x)}{x}=\frac{ln(c)}{c} $$ Write $1/x$ as $e^{-\ln(x)}$, negate both sides $$ -\ln(x)e^{-\ln(x)}=\frac{-ln(c)}{c} $$ Apply Lambert-W $$ -\ln(x)=W(\frac{-\ln(c)}{c}) $$ Solve for $x$ to give final result for this method: $$ x=e^{-W\bigl(\cfrac{-\ln(c)}{c}\bigr)} $$

Steps performed - method 2 $$ c^x=x^c $$ Take natural logs, divide through by $c$ and negate both sides $$ \frac{-x\ln(c)}{c}=-\ln(x) $$ Raise both sides to $e$ $$ e^{\biggl(\cfrac{-x\ln(c)}{c}\biggr)}=e^{\bigl(-\ln(x)\bigr)}=\frac{1}{x} $$ Multiply by $\frac{-x\ln(c)}{c}$ $$ \cfrac{-x\ln(c)}{c}e^{\biggl(\cfrac{-x\ln(c)}{c}\biggr)}=\cfrac{-x\ln(c)}{c}\frac{1}{x}=\frac{-\ln(c)}{c} $$ Apply Lambert-W $$ \cfrac{-x\ln(c)}{c}=W(\frac{-\ln(c)}{c}) $$ Solve for $x$ to give final result for this method: $$ x=\cfrac{-cW(\cfrac{-\ln(c)}{c})}{\ln(c)} $$

3

There are 3 best solutions below

1
On BEST ANSWER

We have $x=we^w$ iff $w=xe^{-w}$. Thus $$ W(x) = xe^{-W(x)} . $$ In particular we have $$ W\left(\frac{-\log c}{c}\right) = \frac{-\log c}{c}\exp\left(-W\left(\frac{-\log c}{c}\right)\right) . $$ From this we get $$ \frac{c}{-\log c}W\left(\frac{-\log c}{c}\right) = \exp\left(-W\left(\frac{-\log c}{c}\right)\right) . $$

Thus the two answers are the same.

1
On

In method 1, the definition of Lambert W function (in appropriate domain and range) is that

$$w = W(z) \implies z = we^w$$

Rearranging,

$$\begin{align*} z &= W(z) e ^{W(z)}\\ e^{-W(z)} &= \frac{W(z)}z\\ e^{-W\left(-\frac{\ln c}c\right)} &= \frac{W\left(-\frac{\ln c}c\right)}{-\frac{\ln c}c}\\ &= -\frac{cW\left(-\frac{\ln c}c\right)}{\ln c}\\ \end{align*}$$

Which is the form from method 2.

0
On

You can rewrite the equation as

$$x\left(\frac1{\sqrt[c]c}\right)^x=xa^x=1$$

or

$$x\log a\,e^{x\log a}=\log a,$$ which leads to your second form

$$x=\dfrac{W(\log a)}{\log a}.$$

But $x$ is also $e^{-x\log a}$, hence your first form

$$x=e^{-W(\log a)}.$$