Let $f:\mathbb{R^n} \rightarrow \mathbb{R}$ be a differentiable function. Assume that f has a local maximum at $x_0 \in \mathbb{R^n}$. Show that $f'(x_0) = 0$.
I have the definition
$$\begin{cases}f(x_0 + h) = f(x_0) + f'(x_0)h + r(h) \\ \lim_{h\rightarrow0} \dfrac{|r(h)|}{|h|} = 0 \end{cases} $$
But am unsure how to apply it in this situation. The outcome is trivial but the technical proof is eluding me.
Note that your $f'$ is actually a gradient. To show that $f'(x_0)=0$ is equivalent to showing that the directional derivative of $f(x)$ in each of the coordinate directions $e_1,\ldots,e_n$ is zero. Fix $1\leq i\leq n$. The trick to showing that the derivative in direction $e_i$ is zero is to show that $f'(x_0)e_i\leq 0$ and that $f'(x_0)e_i\geq 0$.
I'll indicate how to show the first inequality. Since $f$ has a local maximum at $x_0$, this means that for all $\epsilon>0$ sufficiently small, $f(x_0+\epsilon e_i)\leq f(x_0)$. By definition, $$f'(x_0)e_i=\frac{f(x_0+\epsilon e_i)-f(x_0)}{\epsilon}-\frac{r(\epsilon e_i)}{\epsilon}.$$ The limit as $\epsilon\to 0$ of the second fraction is zero, and the first fraction is always less than or equal to zero. Thus $f'(x_0)e_i\leq 0$.
I'll leave it to you to fill in the other inequality, and to see why this implies the result.