Consider a function $f : [a, b] \rightarrow \mathbb{R}$ defined on a closed and bounded interval. Suppose $f$ is differentiable in $a$. Prove that the condition $f'(a) < 0$ is sufficient to conclude that $f$ reaches a local maximum in $a$.
Attempt: Suppose $f'(a) < 0$. Then we want to show $a$ is a local maximum. Since $f$ is continuous in $a$ (because differentiable) we know that for all $ \epsilon > 0$ there exists a $\delta > 0 $ such that $$ \forall x \in [a, b] : | x - a | < \delta \Rightarrow | f(x) - f(a) | < \epsilon. $$ Now let $x \in [a, b]$ be arbitrary such that $ | x - a | < \delta$. We must then prove that $f(a) \geq f(x)$.
I tried to prove this by contradiction. Suppose that $f(a) < f(x)$ so that $f(x) - f(a) > 0$. Then since $|f(x) - f(a) | < \epsilon $ implies that $f(x) - f(a) < \epsilon$, we would have $$ 0 < f(x) - f(a) < \epsilon. $$ I been staring at this inequality, but not sure how to derive a contradiction. Or maybe a direct proof would be a better approach? Help is appreciated.
$x\in[a,b]$, $x\neq a$ implies that $x−a>0$. If we additionally suppose $f(x)−f(a)>0$, then $$\frac{f(x)-f(a)}{x-a} > 0 \quad \Longrightarrow \quad f'(a) = \lim_{x\to a^+} \frac{f(x)-f(a)}{x-a} \geq 0$$ (And we know the limit exists, since $f$ is differentiable at $a$.) This contradicts the original assumption that $f'(a) < 0$.