# Proving that a function is differentiable and equal to a constant value for all x

Let $f(x)$ denote a strictly positive continuous function defined on all real numbers with the property that $f(2012)=2012$ and $f(x)=f(x+f(x))$ for all $x$. Prove that $f(x)=2012$ for all $x$.

I am trying to prove that f is differentiable before I can do $f'(x)=f'(x+f(x))$. How can I do that? Is this the correct approach?

-
"positive" or "not decreasing" ? – Nikita Evseev May 16 '13 at 8:37
The question says positive. – user76836 May 16 '13 at 9:10
@user76836 Next time, please try to get the basic requirements right from the start. Seeing that "continuous" suddely became a requirement just as I'm about to post my answer is frustrating... – fgp May 16 '13 at 10:35
I am guessing that it is a requirement... I typed the question exactly as it is was in the paper. – user76836 May 16 '13 at 10:41

Here's a counter-example to your assertion as it was originally. You've now added the requirement that $f$ is continuous, which invalidates this. But since I had already written this when I saw the change, I've decided to post it nevertheless $$f(x) = \begin{cases} 2012 &\text{for x \in \mathbb{N}} \\ 2102 &\text{otherwise.} \end{cases}$$
Obviously $f(x) > 0$ for all $x \in \mathbb{R}$.
If $x \in \mathbb{N}$ then $$f(x + f(x)) = f(\underbrace{x + 2012}_{\in \,\mathbb{N}}) = 2012 = f(x) \text{.}$$
If $x \in \mathbb{R}\setminus\mathbb{N}$ then $$f(x + f(x)) = f(\underbrace{x + 2102}_{\in \,\mathbb{R}\setminus\mathbb{N}}) = 2102 = f(x) \text{.}$$