TITLE: How do I construct a function $\operatorname{sog}$ such that $\operatorname{sog}\circ\operatorname{sog} = \log$?
QUESTION [16 upvotes]: Imagine a real-valued semilog function $\DeclareMathOperator{\sog}{sog}\sog$ with the property that

$$\sog(\sog(x)) = \log(x)$$
  for all real $x>0$.

My questions: 

Does such a function exist?
How do I compute it?

REPLY [3 votes]: This question already has a great answer, but I thought that you might like to see an actual piecewise construction of such a function (defined on $(-\ln(2),\infty)$). My function is not analytic, but it is continuous and differentiable on $\mathbb R$.
First notice that if we find a function $h$ with the property
$$(h\circ h)(x)=e^x$$
then it follows that
$$(h^{-1}\circ h^{-1})(x)=\log(x)$$
and we may use $h^{-1}=\text{sog}$.
Okay, this piecewise definition gets a bit gross, so bear with me.
Define a sequence $a_n$ as follows:
$$a_{-1}=-\log(2),\space\space a_0=0$$
$$a_{n+2}=\exp(a_n)$$
and define a sequence of functions $H_n$ as follows:
$$H_{-2}(x)=\log(e^x+0.5)$$
$$H_{n+1}(x)=\exp(H^{-1}_n(x))$$
Then one may show verify rather simply that the function
$$h(x) = \left\{
     \begin{array}{lr}
       H_{-2}(x) & : -\infty \lt x \le -\log(2)\\
       H_n(x) & : a_n\lt x \le a_{n+1}
     \end{array}
   \right.\\$$
satisfies $(h\circ h)(x)=e^x$. If it helps, I can write the definition out for you this way:
$$h(x) = \left\{
     \begin{array}{lr}
       \ln(e^x+0.5) & : -\infty \lt x \le -\log(2)\\
       e^x-0.5 & : -\log(2)\lt x \le 0\\
       x+0.5 & : 0\lt x \le 0.5\\
       e^{x-0.5} & : 0.5\lt x \le 1\\
       \text{etc}...\\
     \end{array}
   \right.\\$$
 With a bit more difficulty (and induction), one may prove that it is differentiable on $\mathbb R$ (unfortunately, it is not twice differentiable). Here is a its graph (in orange) alongside a graph of $y=e^x$ (in purple):

Now, for $\text{sog}(x)$, all we need to do is graph $y=h^{-1}(x)$: