TITLE: Intuition behind proving that $f$ is constant
QUESTION [6 upvotes]: Let $f: \mathbb R \to \mathbb R$ is a continuous function such that $\lim_{h \to 0^+} \frac{f(x+2h)-f(x+h)}{h}=0$. Prove that $f$ is constant.

This is a question taken from the book Putnam and Beyond, question 389. I looked at the solution, which goes roughly as follows. Suppose on the contrary that there is $a < b$ with different image, say $f(a) > f(b)$. Define $g(x) =f(x)+ \lambda x$ where $\lambda >0$ is sufficiently small to make $g(a) > g(b)$. We have that $\lim_{h \to 0^+} \frac{g(x+2h)-g(x+h)}{h}=\lambda$. Since $g$ is continuous on $[a,b]$ a closed and bounded interval, $g$ attains a maximum, say $c \neq b$. fix $\epsilon >0, \epsilon < \lambda$. Then by continuity there is $\delta$ such that $0 < \lambda - \epsilon < \frac{g(x+2h)-g(x+h)}{h} < \lambda + \epsilon$ for all $0 < h< \delta$. Fix $0< h_0<min\{\delta, (b-c)/2\}$. Then $g(c+2h_0) >g(c+h_0) >...>g(c+\frac{h_0}{2^m})$... for any natural number $m$ so that, by taking the limit as $m$ goes to infinity, $g(c+2h_0) > g(c)$ contradicting the maximality of $g$ on $[a,b]$. Thus it must be that our initial assumption was false, and hence our conclusion.
I get the proof, but I was wondering what is the intuition behind this solution. How would a problem solver come up with the idea for this solution? Please be more specific than 'it takes practice to recognize pattern'.

REPLY [1 votes]: Another proof. For any $\varepsilon >0$ take $\delta>0$ thuch that the implication $$0<h<\delta\Rightarrow |f(x+h)-f(x+\frac h2)|<\varepsilon h$$ is valid. Taking $0<h<\delta$ we have 
$|f(x+h)-f(x+\frac{h}{2^n})|\leqslant \sum\limits_{k=0}^{n-1}|f(x+\frac{h}{2^k})-f(x+\frac{h}{2^{k+1}})|< \varepsilon(h+\frac h2+\ldots+ \frac{h}{2^{n-1}})<2h\varepsilon.  $
As $f$ is continious by $n\to \infty$ we have $|f(x+h)-f(x)|\leqslant 2h\varepsilon$ and so $f$ has right derivative and $f_+'(x)=0.$
{"set_name": "stack_exchange", "score": 6, "question_id": 2664178}