## f(f(x)) = 4x

There are plenty of continuous functions ${f}$ such that ${f(f(x)) \equiv x}$. Besides the trivial examples ${f(x)=x}$ and ${f(x)=-x}$, one can take any equation ${F(x,y)=0}$ that is symmetric in ${x,y}$ and has a unique solution for one variable in terms of the other. For example: ${x^3+y^3-1 =0 }$ leads to ${f(x) = (1-x^3)^{1/3}}$.

I can’t think of an explicit example that is also differentiable, but implicitly one can be defined by ${x^3+y^3+x+y=1}$, for example. In principle, this can be made explicit by solving the cubic equation for ${x}$, but I’d rather not.

At the time of writing, I could not think of any diffeomorphism ${f\colon \mathbb R \rightarrow \mathbb R}$ such that both ${f}$ and ${f^{-1}}$ have a nice explicit form. But Carl Feynman pointed out in a comment that the hyperbolic sine ${f(x)= \sinh x = (e^x-e^{-x})/2}$ has the inverse ${f^{-1}(x) = \log(x+\sqrt{x^2+1})}$ which certainly qualifies as nice and explicit.

Let’s change the problem to ${f(f(x))=4x}$. There are still two trivial, linear solutions: ${f(x)=2x}$ and ${f(x)=-2x}$. Any other? The new equation imposes stronger constraints on ${f}$: for example, it implies

$\displaystyle f(4x) = f(f(f(x)) = 4f(x)$

But here is a reasonably simple nonlinear continuous example: define

$\displaystyle f(x) = \begin{cases} 2^x,\quad & 1\le x\le 2 \\ 4\log_2 x,\quad &2\le x\le 4 \end{cases}$

and extend to all ${x}$ by ${f(\pm 4x) = \pm 4f(x)}$. The result looks like this, with the line ${y=2x}$ drawn in red for comparison.

To check that this works, notice that ${2^x}$ maps ${[1,2]}$ to ${[2,4]}$, which the function ${4\log_2 x}$ maps to ${[4,8]}$, and of course ${4\log _2 2^x = 4x}$.

From the plot, this function may appear to be differentiable for ${x\ne 0}$, but it is not. For example, at ${x=2}$ the left derivative is ${4\ln 2 \approx 2.8}$ while the right derivative is ${2/\ln 2 \approx 2.9}$.
This could be fixed by picking another building block instead of ${2^x}$, but not worth the effort. After all, the property ${f(4x)=4f(x)}$ is inconsistent with differentiability at ${0}$ as long as ${f}$ is nonlinear.

The plots were made in Sage, with the function f define thus:

def f(x):
if x == 0:
return 0
xa = abs(x)
m = math.floor(math.log(xa, 2))
if m % 2 == 0:
return math.copysign(2**(m + xa/2**m), x)
else:
return math.copysign(2**(m+1) * (math.log(xa, 2)-m+1), x)

## Misuse of bi-

The prefix bi- is apt to cause confusion; how often does a bimonthly event occur? Its usage in mathematics is not free of inconsistency, either. Compare:

• Biholomorphic: a holomorphic map $f$ such that $f^{-1}$ is also holomorphic
• Biharmonic: a function $u$ such that $\Delta \Delta u=0$

Both of these usages are well established. Let’s switch them around just for the fun of it.

(1) Recall that $f\colon \Omega\to\mathbb C$ (where $\Omega\subset \mathbb C$) is holomorphic if $\displaystyle\frac{\partial }{\partial \bar z}f=0$. Following the second usage pattern, we would call $f$ “biholomorphic” if $\displaystyle \frac{\partial}{\partial \bar z}\frac{\partial}{\partial \bar z} f=0$. What can we say about such functions? Let $\displaystyle g=\frac{\partial }{\partial \bar z}f$. Clearly, $g$ is holomorphic. Now introduce $h(z)=f(z)-\bar zg(z)$. This function satisfies $\displaystyle \frac{\partial }{\partial \bar z}h(z) = g(z)-g(z)=0$, i.e., it is also holomorphic. Conclusion: the solutions of the equation $\displaystyle \left(\frac{\partial}{\partial \bar z}\right)^2 f=0$ are precisely the functions of the form $f(z)=h(z)+\bar z g(z)$ where $h$ and $g$ are holomorphic.

This representation formula tells us a lot about “biholomorphic” functions. They are very smooth: the real and imaginary parts are real-analytic. They are locally invertible outside of the set $\{z\colon |h'(z)+\bar zg'(z)|=|g(z)|\}$, which is usually 1-dimensional (compare to the discreteness of the branch set of holomorphic functions). They are not open in general: consider $f(z)=z\bar z = |z|^2$ for example. The modulus $|f|$ does not satisfy the maximum principle: consider $f(z)=1-|z|^2$. But Liouville’s theorem does hold: if $f$ is bounded in $\mathbb C$, it is constant.

(2) A map $f\colon \Omega\to\mathbb C$ (where $\Omega\subset \mathbb C$) is harmonic if $\Delta f=0$, or, put another way, if $f=u+iv$ where $u$ and $v$ are real harmonic functions. Following the first usage pattern, we would call $f$ “biharmonic” if $f^{-1}$ exists and is also harmonic. Any invertible holomorphic map clearly satisfies this definition. Anything else? Well, there are affine maps $f(z)=a z+b\bar z+c$ which are invertible as long as $|a|\ne |b|$ (here $a,b,c\in\mathbb C$ are constant.) The inverse of an affine map is also affine, hence harmonic. Anything else? Nothing comes to mind.

But in 1945 Gustave Choquet gave this example:

$\displaystyle x+iy\mapsto x+iv,\qquad \tan v \tan y = \tanh x$

That’s not a typo: both the regular tangent and its hyperbolic cousin appear in the formula. It is not at all obvious (but true) that $v$ is a harmonic function of $x$ and $y$. It is rather obvious that the map is an involution, hence “biharmonic” according to our definition.

Now that we have one “biharmonic” map that’s neither holomorphic nor affine, are there others? No (apart from trivial variations of $f$). Choquet attributed this uniqueness result to Jacques Deny who did not publish it. The first published classification of “biharmonic” maps appeared in a 1987 paper by Edgar Reich in a rather different form:

If $f$ and $f^{-1}$ are harmonic, then $f$ is either holomorphic, affine, or of the form $\displaystyle f(z)=\alpha(\beta z+2i\arg (\gamma-e^{\beta z}))+\delta$ where $\alpha,\beta,\gamma,\delta$ are complex constants such that $\alpha\beta\gamma\ne 0$ and $|e^{-\beta z}|<\gamma$ in the domain of $f$.

The proof can be found in Peter Duren’s book from which I quoted the statement of this result.