I'm trying to solve $\ln(x) = e^{-x}$ but I can't really get how to do it :(
(Removing a statement that was incorrect, as explained by the comments below)
Additionally, while I started to solve it I ended up with something really weird and I can't really understand what is the wrong passage:
Start with: $$ \ln(x) = e^{-x} $$
My understanding is that if $\ln(x) = a$ then that is equivalent to say that $e^{a} = x$ (assuming $x>0$), so, in the previous case:
$$ e^{e^{-x}} = x $$
And applying the exponent property that: $a^{m^{n}} = a^{mn}$
$$ e^{-ex} = x $$
But at this point it's really weird so I decided to take logarithm of both sides: $$ \ln(e^{-ex}) = \ln(x)\\ -ex\ln(e) = \ln(x)\\ -ex = ln(x)\\ $$
But that clashes with $ln(x) = e^{-x}$ because clearly $e^{-x}$ is not the same as $-ex$.
So could you please tell me which passage I'm doing wrong and how would you approach the initial equation?
Thanks a lot!
You won't find a closed formula for this equation. (Nor for the simpler $e^{-x}=x$, equivalent to $\ln(x)=-x$, though these can be expressed in terms of the Lambert W function, as $W(1)$.) You must resort to numerical root finding.
In this particular case, you will notice that the fixed-point method will work: start from any real value $x_0$ and iterate
$$x_{n+1}=e^{e^{-x_n}}.$$
This sequence always converges and at convergence, $x=e^{e^{-x}}$.