Zero Derivative Implies Constant

Here is a question that seems almost too obvious to ask: if a car's speedometer reads exactly zero for an entire trip, did the car move? Intuition screams no. Calculus lets us prove this with total rigor. But the proof requires more machinery than one might expect. A function can have derivative zero at every single point of an interval without that fact alone telling us anything. We need the derivative to be zero everywhere. And we need the domain to be an interval, connected with no gaps. This result, "zero derivative implies constant," looks like a footnote. But it is actually a linchpin of single-variable calculus. It is the theorem that justifies writing "+C+C" after every indefinite integral. It tells us that two antiderivatives of the same function on an interval can only ever differ by a constant. They never differ by some wilder function that happens to have the same slope everywhere. Without this fact, the entire framework of indefinite integration would rest on sand. Eventually, the Fundamental Theorem of Calculus would rest on sand too. The proof itself is a beautiful, minimal application of the Mean Value Theorem. We don't reinvent anything. We simply notice that MVT hands us exactly the estimate we need on any subinterval. Then we let two points chase each other across the domain. The subtlety worth dwelling on is why the domain must be an interval. Connectedness is doing real work here. A carefully built counterexample on a disconnected set will show exactly where the argument collapses. This article states and proves the theorem in full. It explores the geometric picture of "flat graphs." It works two asymmetric examples. It shows precisely how the connectedness hypothesis is essential. It closes by pointing toward Taylor's Theorem with Remainder. There, the same MVT-based machinery is pushed further. It is used to control not just derivatives but entire polynomial approximations of a function.

Key takeaways
  • If f′(x)=0f'(x) = 0 for every xx in an interval II, then ff is constant on II.
  • The proof is a direct, one-line consequence of the Mean Value Theorem applied to any two points of II.
  • Corollary: if f′(x)=g′(x)f'(x) = g'(x) on an interval, then f−gf - g is constant there — the origin of "+C+C."
  • The hypothesis that the domain is an interval (connected) is not decorative — it is essential.
  • On a disconnected domain, a function can have zero derivative everywhere yet take different values on different pieces.
  • Key idea: the Mean Value Theorem converts a pointwise fact (f′=0f'=0 everywhere) into a global fact (constancy), because it links the difference f(b)−f(a)f(b)-f(a) to a single derivative value in between.

Where this lives today

This theorem is invisible infrastructure: it is used constantly, rarely cited by name. Every time a calculus student writes ∫f′(x) dx=f(x)+C\int f'(x)\,dx = f(x) + C, they are relying on the Corollary above to guarantee that no other antiderivative sneaks in beyond a constant shift. In differential equations, uniqueness of solutions to initial value problems of the simplest type (y′=h(x)y' = h(x)) depends on exactly this fact, and it is the base case that more sophisticated uniqueness theorems (Picard–Lindelöf, Gronwall's inequality) build upon. In physics, it justifies the statement that an object with zero velocity throughout an interval of time has not moved — the intuitive starting point of kinematics made airtight. In numerical analysis and control theory, monotonicity and constancy tests derived from sign conditions on the derivative (a close relative of this theorem, proved by the identical MVT technique) underlie root-finding, stability analysis, and Lyapunov-function arguments. In cryptography and coding theory, seemingly distant fields, algebraic identities of the type appearing in Example 1 are frequently verified by exactly this derivative-vanishing trick rather than direct algebraic manipulation, since differentiating a claimed identity and showing the result is identically zero is often far easier than manipulating the original expression. Finally, this theorem is the direct logical ancestor of Taylor's Theorem with Remainder: there, one controls not the zeroth-order difference f(b)−f(a)f(b)-f(a) but the entire remainder after a degree-nn polynomial approximation, using repeated application of the same Mean-Value-Theorem machinery (in the guise of Cauchy's or Lagrange's remainder forms) to pin down that remainder exactly.

Ask the tutor: How does this same Mean-Value-Theorem technique generalize to prove Taylor's Theorem with Remainder?

DefinitionConstant function on an interval; the setup

Let I⊆RI \subseteq \mathbb{R} be an interval (possibly unbounded, possibly including or excluding endpoints), and let f:I→Rf: I \to \mathbb{R}. We say ff is differentiable on II if f′(x)f'(x) exists at every point x∈Ix \in I (at an endpoint of a closed interval, this means the appropriate one-sided derivative exists). We say ff is constant on II if there exists c∈Rc \in \mathbb{R} such that f(x)=cf(x) = c for every x∈Ix \in I. The object of study is the implication

f′(x)=0 for all x∈I⟹f is constant on I,f'(x) = 0 \text{ for all } x \in I \quad \Longrightarrow \quad f \text{ is constant on } I,

together with its corollary comparing two functions with identical derivatives.

Intuition

Think of f′(x)f'(x) as the instantaneous slope of the graph of ff at xx. If the slope is zero at every single point of an interval, the graph can never tilt up or down anywhere along that interval — it must be perfectly flat. This is the "speedometer always reads zero" picture: a car whose speed is identically zero throughout a time interval cannot have moved, because to move even a tiny amount it would need, at some instant, a nonzero average velocity, and the Mean Value Theorem promises that this average velocity is realized as an actual instantaneous velocity somewhere in between. This is the crucial logical move: the Mean Value Theorem is a bridge between local information (the derivative at one particular point) and global information (the total change f(b)−f(a)f(b) - f(a) over an interval). Without MVT, knowing f′(x)=0f'(x) = 0 at every point individually says nothing about how f(b)f(b) compares to f(a)f(a); a priori, the values could still differ. MVT is precisely the tool that forces f(b)−f(a)f(b) - f(a) to be expressible as (length of interval) ×\times (some derivative value in between), and if every derivative value is zero, that product is zero no matter which point MVT selects. The picture below shows the flat graph on one connected interval versus the broken picture: two horizontal segments at different heights on two separate intervals, each individually flat, but not equal to each other — because you cannot walk continuously from one piece to the other without leaving the domain.

Figure
Flat graph on a connected interval vs. two flat pieces on a disconnected domain
Connected interval: f' = 0 everywhere ⟹ f constant f(x) = c on [a, b] a b Disconnected domain: f' = 0 on each piece, but pieces need not agree f = 1 here, f = 2 there

The dashed line in the second picture emphasizes that nothing legally connects the two flat segments: any path from the left piece to the right piece must jump through a gap in the domain, a gap where ff is not even defined, so MVT can never be applied across that gap. That is exactly the loophole a genuine interval closes.

TheoremZero Derivative Implies Constant

Let I⊆RI \subseteq \mathbb{R} be an interval, and let f:I→Rf: I \to \mathbb{R} be differentiable at every point of II, with

f′(x)=0for all x∈I.f'(x) = 0 \quad \text{for all } x \in I.

Then ff is constant on II: there exists c∈Rc \in \mathbb{R} such that f(x)=cf(x) = c for every x∈Ix \in I.

Corollary (functions with equal derivatives). Let f,g:I→Rf, g: I \to \mathbb{R} be differentiable on the interval II with f′(x)=g′(x)f'(x) = g'(x) for all x∈Ix \in I. Then there is a constant cc such that

f(x)=g(x)+cfor all x∈I.f(x) = g(x) + c \quad \text{for all } x \in I.
Proof

Technique: fix an arbitrary pair of points and apply the <span class="wiki-link-missing">Mean Value Theorem</span> to the closed sub-segment between them. Step 1 — Set up an arbitrary pair of points. Fix any point x0∈Ix_0 \in I, and let c:=f(x0)c := f(x_0). We will show f(x)=cf(x) = c for every x∈Ix \in I. Let x∈Ix \in I be arbitrary with x≠x0x \neq x_0; without loss of generality assume x0<xx_0 < x (the case x<x0x < x_0 is identical with the roles swapped). Step 2 — The closed segment [x0,x][x_0, x] lies in II. Since II is an interval and x0,x∈Ix_0, x \in I, by the defining property of an interval, every point tt with x0≤t≤xx_0 \le t \le x also lies in II. (This is precisely what "interval" means: a set II is an interval if and only if for any two of its points, every point between them is also in the set.) Hence the closed segment [x0,x]⊆I[x_0, x] \subseteq I. Step 3 — Verify the hypotheses of the Mean Value Theorem on [x0,x][x_0, x]. Since ff is differentiable at every point of II, and [x0,x]⊆I[x_0,x] \subseteq I, ff is differentiable at every point of [x0,x][x_0, x]. Differentiability at a point implies continuity at that point, so ff is continuous on [x0,x][x_0,x]. Thus ff is continuous on the closed interval [x0,x][x_0, x] and differentiable on the open interval (x0,x)(x_0, x): exactly the hypotheses of the Mean Value Theorem. Step 4 — Apply the Mean Value Theorem. By the Mean Value Theorem, there exists a point ξ∈(x0,x)\xi \in (x_0, x) such that

f(x)−f(x0)=f′(ξ)(x−x0).f(x) - f(x_0) = f'(\xi)(x - x_0).

Step 5 — Use the hypothesis f′≡0f' \equiv 0. Since ξ∈(x0,x)⊂I\xi \in (x_0, x) \subset I, and f′f' vanishes at every point of II by hypothesis, we have f′(ξ)=0f'(\xi) = 0. Substituting into Step 4,

f(x)−f(x0)=0⋅(x−x0)=0,f(x) - f(x_0) = 0 \cdot (x - x_0) = 0,

so f(x)=f(x0)=cf(x) = f(x_0) = c. Step 6 — Conclude. Since x∈Ix \in I was an arbitrary point distinct from x0x_0 (and the equation f(x0)=cf(x_0) = c holds trivially when x=x0x = x_0), we have shown f(x)=cf(x) = c for every x∈Ix \in I. Hence ff is constant on II. ■\blacksquare

Proof of the Corollary. Define h:I→Rh: I \to \mathbb{R} by h(x):=f(x)−g(x)h(x) := f(x) - g(x). Since ff and gg are each differentiable on II, so is hh (difference of differentiable functions is differentiable, by the linearity of the derivative), and for every x∈Ix \in I,

h′(x)=f′(x)−g′(x)=0h'(x) = f'(x) - g'(x) = 0

by hypothesis. Now hh satisfies exactly the hypotheses of the theorem just proved: it is differentiable on the interval II with derivative identically zero there. By the theorem, hh is constant on II: there is c∈Rc \in \mathbb{R} with h(x)=ch(x) = c for all x∈Ix \in I, i.e.

f(x)−g(x)=c⟺f(x)=g(x)+cf(x) - g(x) = c \quad \Longleftrightarrow \quad f(x) = g(x) + c

for all x∈Ix \in I. ■\blacksquare

∎

Worked examples

Example 1 — a nontrivial-looking function that is secretly constant. Let I=(−1,1)I = (-1, 1) and define

f(x)=arcsin⁡ ⁣(2x1+x2)−2arctan⁡(x).f(x) = \arcsin\!\left(\frac{2x}{1+x^2}\right) - 2\arctan(x).

This looks like it could be some genuinely interesting curve. Let's check whether it's actually constant by computing f′f'. First, recall ddxarctan⁡(x)=11+x2\dfrac{d}{dx}\arctan(x) = \dfrac{1}{1+x^2}. For the arcsine term, let u(x)=2x1+x2u(x) = \dfrac{2x}{1+x^2}. Note that for x∈(−1,1)x \in (-1,1), ∣u(x)∣<1|u(x)| < 1 (indeed ∣2x1+x2∣≤1\left|\frac{2x}{1+x^2}\right| \le 1 always, with equality only at x=±1x=\pm1, which are excluded), so arcsin⁡(u(x))\arcsin(u(x)) is well defined and differentiable on II, with

ddxarcsin⁡(u(x))=u′(x)1−u(x)2.\frac{d}{dx}\arcsin(u(x)) = \frac{u'(x)}{\sqrt{1 - u(x)^2}}.

Compute u′(x)u'(x) by the quotient rule:

u′(x)=2(1+x2)−2x(2x)(1+x2)2=2−2x2(1+x2)2=2(1−x2)(1+x2)2.u'(x) = \frac{2(1+x^2) - 2x(2x)}{(1+x^2)^2} = \frac{2 - 2x^2}{(1+x^2)^2} = \frac{2(1-x^2)}{(1+x^2)^2}.

Compute 1−u(x)21 - u(x)^2:

1−(2x1+x2)2=(1+x2)2−4x2(1+x2)2=(1−x2)2(1+x2)2,1 - \left(\frac{2x}{1+x^2}\right)^2 = \frac{(1+x^2)^2 - 4x^2}{(1+x^2)^2} = \frac{(1-x^2)^2}{(1+x^2)^2},

using (1+x2)2−4x2=1+2x2+x4−4x2=1−2x2+x4=(1−x2)2(1+x^2)^2 - 4x^2 = 1 + 2x^2 + x^4 - 4x^2 = 1 - 2x^2 + x^4 = (1-x^2)^2. For x∈(−1,1)x \in (-1,1) we have 1−x2>01 - x^2 > 0, so

1−u(x)2=1−x21+x2.\sqrt{1 - u(x)^2} = \frac{1-x^2}{1+x^2}.

Therefore

ddxarcsin⁡(u(x))=2(1−x2)/(1+x2)2(1−x2)/(1+x2)=21+x2.\frac{d}{dx}\arcsin(u(x)) = \frac{2(1-x^2)/(1+x^2)^2}{(1-x^2)/(1+x^2)} = \frac{2}{1+x^2}.

Now assemble:

f′(x)=21+x2−2⋅11+x2=0for all x∈(−1,1).f'(x) = \frac{2}{1+x^2} - 2\cdot\frac{1}{1+x^2} = 0 \quad \text{for all } x \in (-1,1).

The domain I=(−1,1)I = (-1,1) is an interval, and ff is differentiable everywhere on it (both terms are compositions of differentiable functions with well-defined, nonsingular inner expressions on II, as checked above). By the theorem, ff is constant on II. To find the constant, evaluate at the convenient point x0=0x_0 = 0:

f(0)=arcsin⁡(0)−2arctan⁡(0)=0−0=0.f(0) = \arcsin(0) - 2\arctan(0) = 0 - 0 = 0.

Hence f(x)=0f(x) = 0 for all x∈(−1,1)x \in (-1,1), i.e.

arcsin⁡ ⁣(2x1+x2)=2arctan⁡(x)for all x∈(−1,1),\arcsin\!\left(\frac{2x}{1+x^2}\right) = 2\arctan(x) \quad \text{for all } x \in (-1,1),

a genuine trigonometric identity discovered purely by a derivative computation and the theorem — no geometric argument required.

Example 2 — using the corollary to solve a differential equation up to a constant. Suppose we are told gg is differentiable on R\mathbb{R} and satisfies

g′(x)=6x2−4x+5for all x∈R,g(1)=10.g'(x) = 6x^2 - 4x + 5 \quad \text{for all } x \in \mathbb{R}, \qquad g(1) = 10.

We want to pin down gg completely, not just up to a constant. Let F(x)=2x3−2x2+5xF(x) = 2x^3 - 2x^2 + 5x. Direct differentiation gives

F′(x)=6x2−4x+5=g′(x)for all x∈R.F'(x) = 6x^2 - 4x + 5 = g'(x) \quad \text{for all } x \in \mathbb{R}.

Since R\mathbb{R} is an interval and F,gF, g are differentiable on it with F′=g′F' = g' everywhere, the Corollary applies: there is a constant cc with

g(x)=F(x)+cfor all x∈R.g(x) = F(x) + c \quad \text{for all } x \in \mathbb{R}.

Now use the side condition g(1)=10g(1) = 10 to solve for cc:

F(1)=2(1)−2(1)+5(1)=2−2+5=5,F(1) = 2(1) - 2(1) + 5(1) = 2 - 2 + 5 = 5,

so 10=g(1)=F(1)+c=5+c10 = g(1) = F(1) + c = 5 + c, giving c=5c = 5. Hence

g(x)=2x3−2x2+5x+5for all x∈R.g(x) = 2x^3 - 2x^2 + 5x + 5 \quad \text{for all } x \in \mathbb{R}.

This is the mechanism, in miniature, behind solving any initial value problem of the form y′=h(x)y' = h(x), y(x0)=y0y(x_0) = y_0: find one antiderivative, then use the Corollary to justify that all antiderivatives differ from it by a constant, and finally use the initial condition to fix that constant uniquely.

CounterexampleWhy the domain must be an interval (connectedness is essential)

Drop the hypothesis that the domain is an interval, keeping every other hypothesis of the theorem intact (differentiability, derivative identically zero). Let

D=(0,1)∪(2,3),f:D→R,f(x)={10<x<122<x<3.D = (0,1) \cup (2,3), \qquad f: D \to \mathbb{R}, \qquad f(x) = \begin{cases} 1 & 0 < x < 1 \\ 2 & 2 < x < 3.\end{cases}

Check differentiability and the derivative. On (0,1)(0,1), ff is the constant function 11, so f′(x)=0f'(x) = 0 for every x∈(0,1)x \in (0,1). On (2,3)(2,3), ff is the constant function 22, so f′(x)=0f'(x) = 0 for every x∈(2,3)x \in (2,3). There are no other points of DD to check. Hence ff is differentiable at every point of DD, and f′(x)=0f'(x) = 0 for all x∈Dx \in D — the pointwise hypothesis of the theorem holds exactly as stated.

Check the conclusion fails. Take x0=0.5∈Dx_0 = 0.5 \in D and x1=2.5∈Dx_1 = 2.5 \in D. Then

f(x0)=1≠2=f(x1),f(x_0) = 1 \neq 2 = f(x_1),

so ff is not constant on DD.

Diagnosing exactly where the proof breaks. Revisit Step 2 of the proof: we needed the closed segment between two chosen points, say [0.5,2.5][0.5, 2.5], to be a subset of the domain, so that the Mean Value Theorem could be invoked on it. But

[0.5,2.5]⊈D,[0.5, 2.5] \not\subseteq D,

since, for instance, 1.5∈[0.5,2.5]1.5 \in [0.5,2.5] but 1.5∉D1.5 \notin D (the gap [1,2][1,2] is entirely missing from DD). Because ff is not even defined at 1.51.5, the Mean Value Theorem cannot be applied to ff on [0.5,2.5][0.5, 2.5] — its continuity/differentiability hypotheses are meaningless there. The bridge from "local slope zero" to "global value equal" is never built across the gap, and indeed no valid bridge exists: the two pieces of ff can be assigned completely independent constants. This shows the interval (connectedness) hypothesis is not a technicality but the load-bearing structural assumption of the entire theorem.

Scope, edge cases & common traps

SituationDoes the theorem apply?Why
f′=0f'=0 on an open interval (a,b)(a,b)YesStandard case; proof applies directly
f′=0f'=0 on a closed interval [a,b][a,b], one-sided derivatives at endpointsYesMVT works with one-sided differentiability at endpoints included in the closed sub-segment argument
f′=0f'=0 on R\mathbb{R}YesR\mathbb{R} is an interval
f′=0f'=0 on (0,1)∪(2,3)(0,1)\cup(2,3)NoDomain not an interval — see counterexample above
f′=0f'=0 except at one point where ff is undefined, e.g. ff on (−1,0)∪(0,1)(-1,0)\cup(0,1)NoA single missing point already disconnects the domain
ff differentiable a.e. but not everywhere (e.g. a corner)No, not directlyTheorem requires differentiability (hence continuity) at every point of II; a jump at even one point can break constancy

The mathematician behind it

Origins · 1 minJoseph-Louis Lagrange and how this was discovered
JL
Joseph-Louis Lagrange
1736–1813 · Analytic mechanics and the rigorous foundations of the calculus of variations

Lagrange, born in Turin and later a towering figure at the Berlin and Paris academies, is best remembered for reformulating mechanics in terms of generalized coordinates and for foundational contributions to the calculus of variations and number theory. His 1797 treatise Théorie des fonctions analytiques attempted to place calculus on an algebraic footing using power series, and it was in exactly this spirit of demanding proofs from first principles — rather than appeals to infinitesimal intuition — that results like the Mean Value Theorem and its corollaries, including the zero-derivative theorem, were later given the rigorous treatment that Cauchy and his successors made standard.

History
- 1797 — Lagrange's Théorie des fonctions analytiques pushes for algebraic rigor in calculus and popularizes the "mean value" style of estimate that underlies this theorem.
- 1823 — Augustin-Louis Cauchy, in his Résumé des leçons données sur le calcul infinitésimal, gives a rigorous proof of the Mean Value Theorem using the newly precise definition of the derivative as a limit.
- 1868 — Cauchy's mean value theorem (the ratio form) is used systematically by Serret and others to justify uniqueness statements like the "+C+C" rule in integral calculus texts.
- 1900s — The theorem becomes a standard early application of MVT in analysis textbooks (Goursat, Hardy), cementing its role as the bridge from local to global behavior.
- Present — Stated and proved in essentially the same three lines in every rigorous calculus course, exactly as presented here, and generalized to vector-valued and multivariable settings via the Mean Value Inequality.
Do I need f′f' to be continuous for this theorem to hold?

No. The theorem only requires that ff be differentiable at every point of the interval II, with f′(x)=0f'(x)=0 there; it says nothing about the derivative being continuous. This is worth emphasizing because derivatives, in general, need not be continuous (Darboux's theorem shows they still satisfy the intermediate value property even when discontinuous, but continuity is a genuinely stronger and unnecessary demand here). The Mean Value Theorem itself only requires continuity of ff on the closed segment and differentiability on the open segment — no hypothesis on the continuity of f′f' appears anywhere in its statement or in this proof.

Does the theorem work if II is a single point or empty?

The theorem is vacuously true or trivially true in these degenerate cases, but they are usually excluded by convention since "interval" typically means a set with more than one point. If I={a}I = \{a\} is a single point, "ff is constant on II" is automatically true for any function, since there is only one value to compare. If I=∅I = \emptyset, the statement "ff is constant on II" is vacuously true. Neither case is interesting, and the proof as given implicitly assumes at least two distinct points x0,xx_0, x exist to compare, which is the substantive situation.

Can this theorem be extended to vector-valued or multivariable functions?

Yes, with care. For f:I→Rnf: I \to \mathbb{R}^n (a curve), if every component function has derivative zero on the interval II, the same argument applied componentwise shows each component is constant, so ff itself is constant. For f:U→Rf: U \to \mathbb{R} where U⊆RnU \subseteq \mathbb{R}^n is an open set, the correct hypothesis is that UU be connected (path-connected, or equivalently open-connected for open subsets of Rn\mathbb{R}^n) rather than an "interval," and the proof uses the Mean Value Theorem along straight-line segments (or along a polygonal path) connecting nearby points, then propagates constancy across the connected set. The key structural requirement — connectedness — is the exact higher-dimensional analogue of "being an interval."

How does this theorem justify the "+C+C" in indefinite integration?

When we write ∫h(x) dx=F(x)+C\int h(x)\,dx = F(x) + C, we mean: FF is one function whose derivative equals hh, and the Corollary guarantees that any other function GG with G′=hG' = h on the same interval must satisfy G(x)=F(x)+cG(x) = F(x) + c for some constant cc. Without the Corollary, we would only know that FF is one solution to y′=hy' = h; we could not claim to have found the general solution, since some entirely different function unrelated to FF by a constant shift could conceivably also have derivative hh. The Corollary rules this out completely, but only on an interval — which is exactly why textbooks are careful to say "on an interval" when discussing antiderivatives.

What role does the Mean Value Theorem's existence of ξ\xi actually play?

It is the entire mechanism. The equation f(x)−f(x0)=f′(ξ)(x−x0)f(x) - f(x_0) = f'(\xi)(x-x_0) converts the unknown global quantity f(x)−f(x0)f(x)-f(x_0) into a product involving a single, specific derivative value f′(ξ)f'(\xi). We don't need to know exactly which ξ\xi the theorem produces — we only need to know that ξ\xi lies somewhere in II, so that the hypothesis "f′f' vanishes at every point of II" applies to it too. This is what makes the argument work for an arbitrary pair of points: no matter which ξ\xi the Mean Value Theorem hands us, it is trapped inside II and therefore forced to be a zero of f′f'.

Is the converse true: does ff constant imply f′=0f'=0 everywhere?

Yes, and this direction is easier, requiring no Mean Value Theorem at all. If f(x)=cf(x) = c for all x∈Ix \in I, then for any x0∈Ix_0 \in I,

f′(x0)=lim⁡h→0f(x0+h)−f(x0)h=lim⁡h→0c−ch=lim⁡h→00=0,f'(x_0) = \lim_{h\to 0} \frac{f(x_0+h)-f(x_0)}{h} = \lim_{h\to 0}\frac{c-c}{h} = \lim_{h\to0} 0 = 0,

directly from the definition of the derivative as a limit of difference quotients. So the full statement is an if and only if: on an interval, ff is constant exactly when f′≡0f'\equiv 0. The content and difficulty of the theorem lies entirely in the forward direction proved above, which is why that is the direction emphasized throughout this article.

Before this

Where this leads