Trying to prove Rolle's Theorem, which says that for a function $f$ continuous over $[a,b]$ and differentiable over $(a,b)$ (no idea why the endpoints aren't included here), such that $f(a) = f(b)$, then there exists a point $c$ where $a \lt c \lt b$ and $f'(c) = 0$.
It makes sense to me intuitively but I am not actually sure how you prove it.
If $f$ is a constant function $f(x) = k$ then at least I can show that $f(a) = f(c) = f(b) = k$, and $f'(c) = \lim_{h \to 0} \frac{f(c+h) - f(c)}{h} = \lim_{h \to 0} \frac{k - k}{h} = \lim_{h \to 0} \frac{0}{h} = 0$.
But if $f$ is not a constant function I'm at a loss because there are infinitely many types of functions that could be connecting the points at $(a,f(a))$ and $(b,f(b))$. I don't know how to prove that there must be at least one maximum or minimum present in between.
But let's suppose we know such a maximum exists at $x=c$. This means $f(c+h) \leq f(c)$ for all $h$. Then:
$$f'(c) = \lim_{h \to 0-}\frac{f(c+h) - f(c)}{h} \geq 0$$
$$f'(c) = \lim_{h \to 0+}\frac{f(c+h) - f(c)}{h} \leq 0$$
(Do I need to prove these two statements more explicitly? The numerator is always $\leq 0$ and the direction of the inequality depends on whether $h>0$ or $h<0$)
Since $f$ is continuous, $f(c)$ is defined and equal to the two-sided limit, so
$$f'(c) = \lim_{h \to 0}\frac{f(c+h) - f(c)}{h} = 0$$
I mean is this enough to prove it?
I would rearrange your start a little.
(As an alternative to the one-sided limits, use Fermat's theorem directly: $c$ is a point where $f$ has a local extremum, $f$ is differentiable on $(a,b)$, containing $c$, so $f'$ is zero at $c$. Notice if we go this way, we don't have to fiddle with minus signs, since whichever extremum is in the interior is the point with a zero derivative.)