Find $f'(1)$ if $f$ is continuous and such that $f (f (x))=1+x$ for every $x$

Here is a family of continuous solutions:

Pick any continuous increasing bijection $g : [0, 1/2] \to [0, 1/2]$ (so that in particular $g(0) = 0$ and $g(1/2) = 1/2$). Now define $f$ on $[0, 1]$ by

$$ f(x) = \begin{cases} g(x) + \frac{1}{2}, & x \in [0, \frac{1}{2}] \\ g^{-1}(x - \frac{1}{2}) + 1, & x \in [\frac{1}{2}, 1] \end{cases} $$

and extend it to all of $\Bbb{R}$ by the relation $f(x + 1) = f(x) + 1$. By the pasting lemma, $f$ is continuous. Moreover,

  • If $x \in [0, \frac{1}{2}]$ then $$f(f(x)) = f(g(x) + \tfrac{1}{2}) = g^{-1}(g(x)) + 1 = x + 1. $$

  • If $x \in [\frac{1}{2}, 1]$, then \begin{align*} f(f(x)) &= f(g^{-1}(x - \tfrac{1}{2}) + 1) = f(g^{-1}(x - \tfrac{1}{2})) + 1 \\ &= g(g^{-1}(x - \tfrac{1}{2})) + \tfrac{3}{2} = x + 1 \end{align*}

  • For arbitrary $x \in \Bbb{R}$, we have $$f(f(x)) = f(f(x - [x]) + [x]) = f(f(x - [x])) + [x] = (x - [x] + 1) + [x] = x + 1. $$

Therefore $f$ is continuous and solves the given relation. But both the differentiability of $f$ and the value of $f'(1)$ (when it exists) depends on the choice of $g$, we have no single answer.


Addendum. By extending this argument a little bit, I was able to describe the solution:

Claim. $f : \Bbb{R} \to \Bbb{R}$ is a continuous solution of the equation $f(f(x)) = x+1$ if and only if there exists $a \in (0, 1)$ an a continuous increasing bijection $g : [0, a] \to [0, 1-a]$ such that $f(x)$ is given by $$ f(x) = \begin{cases} g(x) + a, & x \in [0, a] \\ g^{-1}(x - a) + 1, & x \in [a, 1], \\ f(x - [x]) + [x], & \text{otherwise} \end{cases} \tag{*} $$

It is straightforward to check that $\text{(*)}$ solves the equation as above. Now we claim that any continuous solution of the equation $f(f(x)) = x+1$ is of the form $\text{(*)}$.

  1. From the equation $f(f(x)) = x+1$, we know that $f$ is both injective and surjective.

  2. Since $f$ is continuous and bijective, it is either increasing or decreasing. But since $$f(x+1) = f(f(f(x))) = f(x) + 1, $$ $f$ must be increasing.

  3. Let $a = f(0)$. We claim that $a \in (0, 1)$. To this end, assume otherwise. If $a \leq 0$, then $1 = f(a) \leq f(0) = a \leq 0$, a contradiction. If $a \geq 1$, then $2 \leq a + 1 = f(1) \leq f(a) = 1$, a contradiction.

  4. Define $g : [0, a] \to \Bbb{R}$ by $g(x) = f(x) - a$. Then $g$ is continuous increasing and $g(0) = 0$. Moreover, $g(a) = f(a) - a = 1 - a$ and hence the range of $g$ is $[0, 1-a]$.

  5. When $x \in [0, a]$ we have $x = f(f(x)) - 1 = f(g(x) + a) - 1$ and thus $g^{-1}(y) = f(y+a) - 1$.

Combining altogether, we find that $f(x)$ satisfies $\text{(*)}$ with $g$ defined above as desired.