Find $f'(1)$ if $f$ is continuous and such that $f (f (x))=1+x$ for every $x$ 
If $ f $ is a continuous function satisfying $f (f (x))=1+x$ find $f'(1)$.

I just guessed $f (x)=x+1/2$.Any formal method for this sum ?
 A: 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{(*)}$.


*

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

*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.

*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.

*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]$.

*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.
A: The relationship $f(f(x))=x+1$ implies that $f^{-1}(x+1)=f(x)$. This implies that when the inverse function is shifted to the left by one unit it must give back the original function. Indeed, $f(x)=x+1/2$ satisfies this requirement and has $f^{-1}(x)=x-\frac{1}{2}$. Although this doesn't show that this is the only function, there may be more
A: Take the $\lim_{x\rightarrow 1}{{f(f(x))-f(f(1))}\over {x-1}}
=\lim_{x\rightarrow 1}{{x+1-2}\over{ x-1}}=1.$ 
So $f'(f(1))=1$. 
We now derivate for x:
$${d\over {dx}}[f(f(x))]={d\over dx}(1+x)$$
$$f'(x)\cdot f'(f(x))=1.$$ Hence for $x=1:$ $$f'(1)\cdot f'(f(1))=1$$
$$f'(1)\cdot 1=1$$
$$f'(1)=1.$$
