Generalization
The second example illustrates the following generalization of Rolle's theorem:
Consider a real-valued, continuous function f on a closed interval with f(a) = f(b). If for every x in the open interval (a,b) the right-hand limit
and the left-hand limit
exist in the extended real line, then there is some number c in the open interval (a,b) such that one of the two limits
is ≥ 0 and the other one is ≤ 0 (in the extended real line). If the right- and left-hand limit agree for every x, then they agree in particular for c, hence the derivative of f exists at c and is equal to zero.
Read more about this topic: Rolle's Theorem