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)} $$
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.