How would you solve $\ln x = e^{\cos x}$ algebraically? I am not sure where to start, of course, I can get; $$x = e^{e^{\cos(x)}}$$ or $$\ln(\ln(x)) = \cos(x)$$ however neither seem to be helpful in this case. I am aware that lambert W function may be used somewhere.
 A: There is a logarithm and a trigonometric function in the same equation. This means that no amount of special function wrangling will help you here.
There are five real solutions:
$$x=1.969924\dots$$
$$x=5.241507\dots$$
$$x=7.114341\dots$$
$$x=12.151777\dots$$
$$x=12.916245\dots$$
A: I will show an approximation method which can reduce the problem to an (approximate) algebraic one. Looking at the graph of the function $e^{e^{\cos x}}$,

it suggests a piecewise approximation by a set of Lorentzian-shape functions seperated by $ 2\pi$
$$
f_n(x)=\frac{a}{(x-2n\pi)^2+b}, \ \ {\rm for}\  x\in[(2n-1)\pi,(2n+1)\pi],\ n\ge0
$$
where $a,b>0$.
We can get an approximation for $a$ and $b$ by equating the values to the original function function at $x=0$ and $x=\pi/2$ (we only need the branch at $n=0$ since it is periodic). We obtain the linear equations:
$$
e^e=\frac{a}{b},\ \ e=\frac{a}{ \frac{\pi^2}{4}+b}
$$
Solving it we get $a=8.173,\ \ b=0.5393$ so we have to solve
$$
x=\frac{8.173}{(x-2n\pi)^2+0.5393}, \ \ {\rm for}\  x\in[ (2n-1)\pi,(2n+1)\pi], n\ge0
$$
This is a cubic that can be solved algebraically.
There are no solutions for $n<0$.
For the $n=0$ branch we get:
$$x_1=1.93$$
For the $n=1$ branch we get:
$$x_2=5.28\\x_3=7.07$$
For the $n=2$ branch we get:
$$x_4=12.20\\x_5=12.87$$
These can be compared with a direct numerical computation of the equation:
$$x_1=1.97\\
 x_2=5.24\\x_3=7.11\\
x_4=12.15\\x_5=12.91$$
which shows an error of about $0.5\%$ at most . There are no solutions for $n>5$ since $\max f_5(x) =e^e<5\pi$ and the $y=x$ line cannot intersect the graph of the function.
A: Too long for a comment;
Very interested by @am301's approach, I noticed that the $[0,2]$ Padé approximant built around $x=2n\pi$ is
$$e^{e^{\cos (x)}}=\frac{2 e^e}{e (x-2n \pi )^2+2}$$ which is  close to the Lorentzian-shape function proposed in @am301's answer.
This approximation would lead to the estimates
$$\{2.12,5.07,7.19,12.14,12.92\}$$ which are not as good as @am301's ones.
In any manner, with the different proposed estimates, Newton method works like a charm. Doing it for the first root (to which corresponds the worse estimate)
$$\left(
\begin{array}{cccc}
 n & x_n \\ 
 0 & 2.124348  \\
 1 & 1.957533  \\
 2 & 1.969841  \\
 3 & 1.969924
\end{array}
\right)$$
Edit
All of this could be  improved (except for the first root) using the next Padé approximant which is
$$e^{e^{\cos (x)}}=e^e \frac{1-\frac{\left(31-60 e+15 e^2\right) }{30 (3 e-4)}(x-2 n\pi )^2 } {1+\frac{\left(30 e^2-31\right) }{30 (3 e-4)}(x-2 n\pi  )^2+\frac{\left(6 e+5
   e^3\right) }{40 (3 e-4)}(x-2 n\pi  )^4 }$$ which is of no use for this problem since leading to quintic equations.
The generated estimates would be
$$\{1.80,5.25,7.11,12.15,12.92\}$$ while the solutions are
$$\{1.97,5.24,7.11,12.15,12.92\}$$
Using the same idea, we could assume that
$$e^{e^{\cos (x)}}=a+\frac b {(x-2n \pi)^2+c}$$ and obtain the $(a,b,c)$ parameters minimizing
$$\Phi=\int_{-\pi}^\pi \left(a+\frac{b}{x^2+c}+e^{e^{\cos (x)}}\right)^2\,dx$$ This leads to
$$a=0.232893 \qquad b=8.39717\qquad c=0.550011$$ and then the estimates
$$\{2.03,5.22,7.10,12.17,12.90\}$$
