I need to prove the zero derivative theorem. The theorem states that if a differentiable function f defined on the closed interval [a,b] has for every x in (a,b) f has a zero derivative at x, then the function f is constant.

I have an intuitive understanding of why this is true, but I'm not sure how to make this formal. Any help would be great. Thanks