# For a $C^{\infty}$ function, is it true that $|f'(x)| \leq 1$ implies that $|f(x)| \leq x$?

Let $$f(x)$$ be a nice/$$C^{\infty}$$ function of some real-variable $$x$$ which satisfies the inequality $$|f'(x)| \leq 1\ \ \ \ \ \ \ \mathrm{for\ all\ }x>0$$ If this is true, does this imply that $$|f(x)| \leq |x| \ \ \ \ \ \ \ \mathrm{for\ all\ }x>0?$$ Or something similar? This seems to follow by integrating both sides''. I've come up with some functions where this seems to be the case (for example $$f'(x) = \tanh(x)$$ satisfies $$|f'(x)| \leq 1$$, and $$f(x) = \log(\cosh(x))$$ satisfies $$|f(x)| < |x|$$).

If this is true, how can you prove it?

If this is not true, what is an example of a counter-example?

• What about $f(x) = 123$? – Martin R Sep 6 at 19:33
• If $f(0)=0$ then yes, from MVT. – rtybase Sep 6 at 19:36

To elaborate a bit: the condition $$|f'(x)| \leq 1\quad\text{ for all } x>0$$ does not imply any bound on $$f$$ because $$f$$ can be shifted by a constant and the derivative does not change. For example, we could shift $$f$$ up by $$100$$, down by $$1000$$, and so on, and the derivative would not change.

A concrete counterexample is given in the comments: if $$f(x) = 1000$$, then $$|f'(x)| = 0$$ so it is bounded by $$1$$, but $$|f(x)|$$ is not bounded by $$|x|$$.

So, if you want the bound on $$|f(x)|$$, you need to additionally specify something like $$f(0) = 0$$. In general, the best bound you can have is $$|f(x)| \le |x| + |f(0)|,$$ which follows by Traingle inequality from Martin's answer.

P.S.: A particular consequence of the bound on the derivative $$|f'(x)| \le 1$$ that your function $$f$$ is Lipschitz continuous with constant $$1$$.

• Assuming we have the bound $|f(x) - f(0)| \leq |x|$. The triangle inequality seems to tell me that $|f(x) - f(0)| \leq |f(x)| + |f(0)|$. But I don't see how your inequality $|f(x)| \leq |x| + |f(0)|$ follows from this. What am I missing? – Greg.Paul Sep 8 at 2:08
• @Greg.Paul There is a second useful form of triangle inequality: $|a - b| \ge |a| - |b|$. To see why this is the same as the usual triangle inequality, you can write $a = b + a'$, and the formula becomes $|a'| \ge |b + a'| - |b|$, which rearranges to $|b + a'| \le |a'| + |b|$. (Follow the steps backwards to go from the regular triangle inequality to this second form) – 6005 Sep 9 at 19:09
• Anyway, using that form of triangle inequality, we have $|f(x) - f(0)| \ge |f(x)| - |f(0)|$. Therefore, $|f(x) \le |f(0)| + |f(x) - f(0)| \le |f(0)| + |x|$. – 6005 Sep 9 at 19:11
• Ah I see, thanks I blanked on that one! – Greg.Paul Sep 9 at 19:56

$$|f'(x)| \leq 1$$ for $$x > 0$$ implies that $$|f(x) - f(0)| \le |x|$$ for $$x \ge 0$$, that is an immediate consequence of the mean-value theorem.

You don't need $$C^\infty$$ for this conclusion, it suffices that $$f$$ is continuous for $$x \ge 0$$ and differentiable for $$x > 0$$.

If in addition $$f(0) = 0$$ then indeed $$|f(x)| \le |x|$$.

• The MVT says that $f$ needs to be continuous on $[a,b]$ and differentiable on $(a,b)$ and then there always exists a $a<c<b$ where $f'(c) = [ f(b) - f(a) ] / (b-a)$. Here is seems like you're picking $a=0$ and $b=x$, and then $c=x$. This doesn't seem kosher to me because $b=c$ here...what am I misunderstanding? – Greg.Paul Sep 8 at 1:54
• Ahh, never mind. I got it now. Pick $a=0$ and $b=x > 0$. By the MVT there exists a $0 < c < x$ where $f'(c) = \frac{f(x) - f(0)}{x}$. The bound $|f'(c)| \leq 1$ then implies that $| \frac{f(x) - f(0)}{x} | \leq 1$ from which the statement follows. Thanks! – Greg.Paul Sep 8 at 2:05

Take $$f(x)=\cos(x)$$

then

$$f$$ is $$C^{\infty}$$ and $$|f'(x)|\le 1$$

but

$$f(0.00001)>0.00001$$