Problem: Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be differentiable. Suppose $f(0)=0$, and $f'(x) < \frac{1}{2}$ for all $a$. Show $f(4) < 2$.
This question is intuitively pretty simple, but I'm not sure what is generally regarded as sufficiently rigorous.
Simply, if the slope of the function never reaches $\frac{1}{2}$, then combining all these small intervals will produce $f(4) <2$.
$\forall a \in \mathbb{R}, \lim\limits_{x \to a} \frac{f(x)-f(a)}{x-a} < \frac{1}{2} \implies \forall a \in \mathbb{R}, f(x)-f(a) < \frac{1}{2}(x-a)$
Letting $a=0, x=4$, we have $f(4) < 2$.
My Question:
I'm not sure if I'm skipping a ton of steps in that implication above. It looks like I just jumped to the conclusion without proving anything.
Is what I'm missing some sort of "interval argument"?
For example: If I translated using the delta-epsilon definition of limits $$\forall a \in \mathbb{R}, \lim\limits_{x \to a} \frac{f(x)-f(a)}{x-a}$$
to $f(x)-f(a) < \frac{1}{2}(x-a)$ for some open interval $ x \in (a- \delta, a+ \delta)$.
I would still need to show that the union of infinitely many of such small intervals satisfies $f(x)-f(a) < \frac{1}{2}(x-a)$. How do I write this rigorously?