Prove that if f'(x) = 0 for all x in (a,b), then f(x) =
Prove that if $f'(x) = 0$ for all $x \in (a,b)$, then $f(x) = \text{const}$ on $(a,b)$.
Explanation of Method
The cornerstone consequence of the mean value theorem.
Step 1: Fix two arbitrary points
Let $x_{1}, x_{2} \in (a,b)$ with $x_{1} \lt x_{2}$. It suffices to show $f(x_{1}) = f(x_{2})$, since $x_{1}$ and $x_{2}$ are arbitrary.
Step 2: Apply the mean value theorem
Being differentiable on $(a,b)$, $f$ is in particular continuous on $[x_{1},x_{2}]$ and differentiable on $(x_{1},x_{2})$ — exactly the hypotheses of Lagrange's mean value theorem. Hence there is a point $c \in (x_{1},x_{2})$ with
\[ f(x_{2}) - f(x_{1}) = f'(c)\,(x_{2}-x_{1}). \]
Step 3: Use the hypothesis
Since $c$ lies in $(x_{1},x_{2}) \subset (a,b)$, the hypothesis gives $f'(c) = 0$, so
\[ f(x_{2}) - f(x_{1}) = 0\cdot(x_{2}-x_{1}) = 0 \;\Longrightarrow\; f(x_{1}) = f(x_{2}). \]
Step 4: Conclude
The two points were arbitrary, so $f$ takes one and the same value throughout $(a,b)$: $f(x) = C \qquad\text{for all } x \in (a,b)$.
Step 5: Why the interval matters
The hypothesis must hold on an interval, that is, on a connected set. The function
\[f(x) = \operatorname{sgn}(x) = \begin{cases} 1, & x \gt 0, \\ -1, & x \lt 0 \end{cases}\]
\[\text{satisfies } f'(x) = 0 \text{ on } \mathbb{R}\setminus\{0\}, \text{ yet is not constant there.}\]
The mean value theorem cannot be applied across the gap, because $f$ is not defined (let alone continuous) at $x = 0$.
Result
Final answer:
\[\boxed{\,f'(x) = 0 \ \text{ on } (a,b) \;\Longrightarrow\; f(x) = \text{const on } (a,b)\,}\]
Remark
Remark. The immediate corollary — if $f' = g'$ on an interval then $f-g$ is constant — is what makes the “$+C$” of indefinite integration legitimate, and it is the engine of Problem 174: to prove an identity, show the difference of the two sides has zero derivative, then pin down the constant at a single convenient point.