could you please check my attempt at proving the following lemma.
Suppose $f: \mathbb{R} \rightarrow \mathbb{R}$ has two continuous derivatives, has only one critical point $x_{0}$ and $f''(x_{0})< 0$. Then $f$ achieves its global maximum at $x_{0}$, that is, $f(x)\leq f(x_{0})$ $\forall x \in R$.
Attempt:
By Cauchy's Mean Value Theorem, there is a point $c \in (x,x_{0})$ such that
$$f''(c)=\frac{f'(x)-f'(x_{0})}{x-x_{0}}<0,$$
hence
$$f'(x)<f'(x_{0}).\tag1$$
Integrating both sides of $(1)$ with respect to $x$, we have
$$\int f'(x) dx<\int f'(x_{0})dx,$$
Therefore $f(x)<f(x_{0})$ for all $x \in \mathbb{R}.$
Q.E.D.
Thank you for your time :)