# Given $|f(x) - f(y)| \leq 7(x-y)^2$ show $f$ is a constant function [duplicate]

I think that I've managed to figure this one out, I was just wondering if someone could look it over because there are a few areas that I'm not sure about my steps. Here is the full question:

Suppose $f$ is a real valued function defined on all $x$ and $|f(x) - f(y)| \leq 7(x-y)^2$ for all $x$ and $y$. Prove $f$ is a constant function.

First, define $y = x+h$ and take $h \neq 0$, then $|f(y) - f(x)| \leq 7(x-y)^2$ becomes $|f(x+h) - f(x)| \leq 7h^2$. Dividing by $|h|$ we get:

$\left|\frac{f(x+h) - f(x)}{h}\right| \leq 7|h|$.

Clearly, $\lim_{h\rightarrow 0} 7|h| = 0$. Then by the sandwich theorem (squeeze theorem):

$\lim_{h\rightarrow 0} \left|\frac{f(x+h) - f(x)}{h}\right| = 0.$ And thus $f'(x) = 0$ for arbitrary $x$. So $f(x)$ is a constant function.

Added crucial condition on $h$ thanks to help from comments

## marked as duplicate by Did real-analysis StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 21 '18 at 16:57

• Looks great. When defining $y$, I would personally explicitly state that $h \neq 0$, since then it is not weird to divide by $h$. – Vincent Apr 2 '17 at 18:00
• Yes, thank you! – student_t Apr 2 '17 at 18:06
• Actually those are called $\alpha$-Hölder continuous functions, (in your case $\alpha = 2$) see en.wikipedia.org/wiki/H%C3%B6lder_condition – Luca Apr 2 '17 at 18:20

Let us take two arbitrary real numbers $x$ and $y$. Let $h=y-x.$
Let us subdivide $(x,y)$ into $n$ equal length intervals $(x_k,x_{k+1})$ with $x_0=x$ and $x_n=y$, (thus all with length $\tfrac{h}{n}$):
$$|f(x)-f(y)|=|\sum_{k=0}^{n-1}(f(x_{k+1})-f(x_k))|\leq \sum_{k=0}^{n-1}|(f(x_{k+1})-f(x_k)|\leq n 7 (\tfrac{h}{n})^2=7\tfrac{h^2}{n}$$
Thus $f(x)=f(y)$; as $x$ and $y$ are arbitrary, $f$ is thus a constant function.
Remark: of course, coefficient $7$ could be replaced by any positive constant. Moreover exponent $2$ could have been any (Hölder) exponent $\alpha>1$ (see remark by @Luca).