Prove that if G is a continuous function defined on [a, b] such that G′(x) = 0 for all x ∈ (a, b), then G(x) is constant on [a, b] 
Use the Mean Value Theorem to prove that if G is a continuous function defined on [a, b] such that G′(x) = 0 for all x ∈ (a, b), then G(x) is constant on [a, b]

My Thoughts:


*

*I mean its obvious, if the gradient is 0 for all points in the
interval, this means that its a line parallel to the x axis (Gradient
zero). 

*The Mean Value Theorem says that if the average slope is $c$, then
there must be at least one point in the interval $m ∈ (a, b)$ where
$G'(m)=c$.
How do I combine these two ideas together and give a mathematical proof?
I thought about this for quite sometime. The answer is worth 6 marks, and I can't give any good explanation/mathematical proof which deserves 6 marks. It seems like common sense to me.

$$G(x)-G(a)=G'(c)(x-a)=0\implies G(x)=G(a)$$
for all $x\in [a,b]$.
