Bound on difference of derivatives of convex functions Let $f:[0, \infty) \to \mathbb{R}$ be a convex function.
Let us assume further that $f(0) = 0, f'(x) \geq 0$ and that for every $x > 0$
$$|f(x) -x^2| \leq \varepsilon,$$
for some $\varepsilon > 0$.
Can we uniformly bound
$$\sup_{x\geq 0}|f'(x)-2x|$$
in terms of $\varepsilon?$
If this is not possible? what can be said about
$$\sup_{T\geq x\geq 0}|f'(x)-2x|,$$
for some fixed $T$.
Note that uniformly one cannot deduce uniform bounds on derivatives from uniform bounds on the functions. But I'm hoping that convexity can help here.
 A: A possible approach: For $a > 0$ one can use the convexity condition
$$
f(x+a) \ge f(x) + a f'(x)
$$
to get an upper bound for $f'(x)$:
$$
 f'(x) \le \frac{f(x+a)-f(x)}{a} \le \frac{(x+a)^2-x^2+2\varepsilon}{a}
= 2x + a + 2 \frac{\epsilon}{a} \, .
$$
The additive constant on the right is smallest for $a = \sqrt {2\epsilon}$, that gives the upper bound
$$
 f'(x) - 2x \le 2  \sqrt {2\epsilon} \, .
$$
A lower bound can be obtained similarly, so that
$$
\sup_{x\geq 0}|f'(x)-2x| \le  2  \sqrt {2\epsilon} \, .
$$

Addendum: If $f: [0, \infty) \to \Bbb R$ is an increasing convex function, $k > 0$ and $g: [0, \infty) \to \Bbb R$ is defined as
$$
 g(x) = k f\left(\frac{x}{\sqrt k}\right)
$$
then
$$
 \sup_{x \ge 0}|g(x) -x^2|  = k \sup_{x \ge 0}|f(x) -x^2| 
$$
and
$$
 \sup_{x \ge 0}|g'(x) -2x|  = \sqrt k \sup_{x \ge 0}|f'(x) -2x|  \, .
$$
This shows that the bound $ 2  \sqrt {2\epsilon}$ that we obtained is “of the right order.”
More precisely, if we define for $\epsilon > 0$
$$
 {\cal F}(\epsilon) = \{ f: [0, \infty) \to \Bbb R \text{ is increasing and convex, } |f(x)-x^2| \le \epsilon \text{ for all } x \ge 0 \}
$$
and
$$
 B(\epsilon) = \sup \{ \sup_{x \ge 0}|f'(x) -2x| : f \in {\cal F}(\epsilon) \}
$$
then the above considerations show that for all $k > 0$
$$
 B(k \epsilon) = \sqrt k B(\epsilon)
$$
so that
$$
 B(\epsilon) = \sqrt \epsilon B(1) \, .
$$
Our initial calculation shows that $B(1) \le 2 \sqrt 2$.
Further remarks: The condition $f(0) = 0$ is not needed at all. The condition  $f'(x) \ge 0$ is only needed to get a lower bound for $f'(x)$ near $x=0$. Without that restriction one gets
$$
\sup_{x\geq \sqrt{2\epsilon}}|f'(x)-2x| \le  2  \sqrt {2\epsilon} \, .
$$
