The Mean Value Theorem and Monotonicity

Published on 2026-11-04·v1.0

Learning Objectives

  • State Rolle's theorem and the Mean Value Theorem with every hypothesis, and explain what each hypothesis is for.
  • Show with a concrete function that the conclusion fails when continuity on the closed interval or differentiability on the open interval is dropped.
  • Use the Mean Value Theorem to prove that a zero derivative on an interval means a constant function, and that two functions with the same derivative differ by a constant.
  • Decide where a function increases or decreases from the sign of its derivative, and say why the word "interval" matters.
  • Turn the theorem into a quantitative tool: bound a change in a function by a bound on its derivative.

Context & Motivation

A derivative is local information: the slope at one point. Most questions are global. Is the function larger at bb than at aa? By how much at most? If two cars start together and the first is never slower than the second, can the second be ahead at the end? The Mean Value Theorem is the bridge from local to global. It says that if a function is smooth enough, the average rate of change over an interval equals the instantaneous rate at some point inside it.

The consequences are used constantly: the first derivative test for extrema, the fact that a function is determined by its derivative up to a constant, and the error bounds of numerical methods all rest on it. In computing, the same idea appears as a Lipschitz bound: if ∣f′∣≤L\lvert f'\rvert \le L everywhere, then changing the input by δ\delta changes the output by at most LδL\delta. Applied to a gradient, this is behind step-size rules in gradient descent; applied to an activation function, it bounds how much noise in the input can reach the output. This lesson builds on the-derivative-as-a-rate-of-change and continuity-and-the-intermediate-value-theorem, and it prepares extrema-concavity-and-optimization.

Core Theory

Fermat's observation

Suppose ff has a local maximum at an interior point cc and f′(c)f'(c) exists. For small h>0h > 0 the quotient f(c+h)−f(c)h\frac{f(c+h) - f(c)}{h} is at most 00, and for small h<0h < 0 it is at least 00. The limit exists, so it is both ≤0\le 0 and ≥0\ge 0, hence f′(c)=0f'(c) = 0. The same argument covers a local minimum. The hypothesis "f′(c)f'(c) exists" matters: ∣x∣\lvert x\rvert has a minimum at 00 where the derivative is not zero, because it does not exist.

Rolle's theorem

Rolle's theorem. Let ff be continuous on [a,b][a, b] and differentiable on (a,b)(a, b), with f(a)=f(b)f(a) = f(b). Then there is some c∈(a,b)c \in (a, b) with f′(c)=0f'(c) = 0.

The idea: a continuous function on a closed interval attains a largest and a smallest value (the Extreme Value Theorem, stated carefully in the next lesson). If both equal f(a)f(a), the function is constant and every point works. Otherwise one of them differs from f(a)=f(b)f(a) = f(b), so it is attained at an interior point, and Fermat's observation gives f′(c)=0f'(c) = 0.

The Mean Value Theorem

Mean Value Theorem (MVT). Let ff be continuous on [a,b][a, b] and differentiable on (a,b)(a, b). Then there is some c∈(a,b)c \in (a, b) with

f′(c)=f(b)−f(a)b−a.f'(c) = \frac{f(b) - f(a)}{b - a}.

Proof from Rolle: let m=f(b)−f(a)b−am = \frac{f(b) - f(a)}{b - a} and define g(x)=f(x)−f(a)−m(x−a)g(x) = f(x) - f(a) - m(x - a). This is ff minus the secant line, so g(a)=g(b)=0g(a) = g(b) = 0, and gg inherits continuity and differentiability. Rolle gives cc with g′(c)=f′(c)−m=0g'(c) = f'(c) - m = 0.

Geometrically, some tangent line is parallel to the secant line. The theorem does not say where cc is, only that one exists; there can be several.

What fails when a hypothesis is dropped

Each hypothesis earns its place. Three functions show it.

  • f(x)=∣x∣f(x) = \lvert x\rvert on [−1,1][-1, 1]: continuous, and f(−1)=f(1)f(-1) = f(1), but not differentiable at 00. For x≠0x \ne 0 the derivative is ±1\pm 1, never 00. Rolle's conclusion fails. On [−1,2][-1, 2] the secant slope is 2−13=13\frac{2 - 1}{3} = \frac13, but f′∈{−1,1}f' \in \{-1, 1\} wherever it exists, so the MVT conclusion fails too. A single corner is enough.
  • f(x)=x−⌊x⌋f(x) = x - \lfloor x\rfloor on [0,1][0, 1]: it equals xx on [0,1)[0, 1) and jumps back to 00 at x=1x = 1, so f(0)=f(1)=0f(0) = f(1) = 0 and ff is differentiable on (0,1)(0, 1), but it is not continuous at 11. Here f′(x)=1f'(x) = 1 everywhere inside, never 00.
  • The hypotheses are sufficient, not necessary. Let f(x)=x2f(x) = x^2 on [−1,1)[-1, 1) and f(1)=2f(1) = 2. It is discontinuous at 11, yet the secant slope is 2−12=12\frac{2 - 1}{2} = \frac12 and f′(c)=2c=12f'(c) = 2c = \frac12 at c=14c = \frac14. Failing a hypothesis makes the theorem silent, not the conclusion false.

Consequences for monotonicity

Let II be an interval, and let ff (and gg, in item 2) be continuous on II and differentiable at its interior points.

  1. If f′=0f' = 0 on the interior of II, then ff is constant on II. For any x1<x2x_1 < x_2 in II, the MVT gives f(x2)−f(x1)=f′(c)(x2−x1)=0f(x_2) - f(x_1) = f'(c)(x_2 - x_1) = 0.
  2. If f′=g′f' = g' on the interior of II, then f−gf - g is constant on II. Apply item 1 to f−gf - g, which is continuous on II because both functions are. Continuity of gg on all of II is needed: on I=[0,1]I = [0, 1] take f=0f = 0 and g=0g = 0 on [0,1)[0, 1) with g(1)=1g(1) = 1. Then f′=g′f' = g' on (0,1)(0, 1), but f−gf - g is not constant.
  3. If f′>0f' > 0 on the interior of II, then ff is strictly increasing on II. The same formula gives f(x2)−f(x1)=f′(c)(x2−x1)>0f(x_2) - f(x_1) = f'(c)(x_2 - x_1) > 0. If f′≥0f' \ge 0, ff is non-decreasing. Reversing the signs gives decreasing.

All three hold on an interval: the proofs need any two points to be joined by a stretch inside the domain.

Worked Examples

Example 1: finding cc, and a failing case

Rolle on f(x)=x3−3xf(x) = x^3 - 3x over [−3,3][-\sqrt3, \sqrt3]. Both endpoint values are 00, because x(x2−3)x(x^2 - 3) vanishes at x=0,±3x = 0, \pm\sqrt3. The derivative is 3x2−3=3(x−1)(x+1)3x^2 - 3 = 3(x - 1)(x + 1), zero at c=±1c = \pm 1, both inside the interval. Rolle promised at least one; here there are two.

MVT on f(x)=xf(x) = \sqrt x over [1,4][1, 4]: ff is continuous on [1,4][1, 4] and differentiable on (1,4)(1, 4). The secant slope is 2−13=13\frac{2 - 1}{3} = \frac13. Solving 12c=13\frac{1}{2\sqrt c} = \frac13 gives c=32\sqrt c = \frac32, so c=94∈(1,4)c = \frac94 \in (1, 4).

Now a failing case. Here x2/3x^{2/3} means (x3)2(\sqrt[3]{x})^2, the square of the real cube root, and x−1/3x^{-1/3} means 1/x31/\sqrt[3]{x}, so both are defined for negative xx. (In code, numpy.power(-1.0, 2/3) returns nan, while numpy.cbrt(-1.0)**2 gives 1.0.) The function g(x)=x2/3g(x) = x^{2/3} on [−1,1][-1, 1] has g(−1)=g(1)=1g(-1) = g(1) = 1 and a cusp at 00 where g′g' does not exist. For x≠0x \ne 0, g′(x)=23x−1/3g'(x) = \frac{2}{3}x^{-1/3} is never 00, so Rolle's conclusion fails. The habit to build: check differentiability at every interior point, not just the typical ones.

Example 2: bounding a value

How large is 26\sqrt{26}? Apply the MVT to x\sqrt x on [25,26][25, 26]: 26−5=12c\sqrt{26} - 5 = \frac{1}{2\sqrt c} for some c∈(25,26)c \in (25, 26). Since c>25c > 25, c>5\sqrt c > 5, so 26−5<110\sqrt{26} - 5 < \frac{1}{10}, which gives 26<5.1\sqrt{26} < 5.1. Now c<26<5.1\sqrt c < \sqrt{26} < 5.1, so 26−5>12⋅5.1=110.2≈0.09804\sqrt{26} - 5 > \frac{1}{2 \cdot 5.1} = \frac{1}{10.2} \approx 0.09804. Together, 5.0980<26<5.15.0980 < \sqrt{26} < 5.1, a rigorous bracket that never uses the value of 26\sqrt{26} itself. The true value is 5.099025.09902.

The same technique proves ex>1+xe^x > 1 + x for x≠0x \ne 0. For x>0x > 0: ex−1=ecxe^x - 1 = e^c x with 0<c<x0 < c < x, and ec>1e^c > 1, so ex−1>xe^x - 1 > x. For x<0x < 0: ex−1=ecxe^x - 1 = e^c x with x<c<0x < c < 0, so ec<1e^c < 1, and multiplying by the negative number xx flips the inequality: ecx>xe^c x > x. The sign of xx changes the argument, which is why both cases are written out.

Example 3: a Lipschitz bound for the sigmoid

The logistic sigmoid σ(t)=11+e−t\sigma(t) = \frac{1}{1 + e^{-t}} has σ′(t)=σ(t) (1−σ(t))\sigma'(t) = \sigma(t)\,(1 - \sigma(t)). Since u(1−u)≤14u(1 - u) \le \frac14 for any uu, we get 0<σ′≤140 < \sigma' \le \frac14 everywhere. The MVT then says that for any a<ba < b,

∣σ(b)−σ(a)∣=σ′(c) (b−a)≤b−a4.\lvert\sigma(b) - \sigma(a)\rvert = \sigma'(c)\,(b - a) \le \frac{b - a}{4}.

Take a=0.5a = 0.5 and b=3b = 3. The true difference is σ(3)−σ(0.5)≈0.3301\sigma(3) - \sigma(0.5) \approx 0.3301, the bound gives 0.6250.625, and the secant slope is ≈0.1320\approx 0.1320, which equals σ′(c)\sigma'(c) at c≈1.684c \approx 1.684. The bound is loose here but holds for every pair of inputs, and σ′>0\sigma' > 0 also shows σ\sigma is strictly increasing.

Example 4: the constant can change across a gap

Let h(x)=arctan⁡x+arctan⁡1xh(x) = \arctan x + \arctan\frac1x, defined for x≠0x \ne 0. Using ddxarctan⁡x=11+x2\frac{d}{dx}\arctan x = \frac{1}{1 + x^2}, the derivative is 11+x2+11+1/x2⋅(−1x2)=0\frac{1}{1 + x^2} + \frac{1}{1 + 1/x^2}\cdot\left(-\frac{1}{x^2}\right) = 0 for every x≠0x \ne 0. So hh is constant on (0,∞)(0, \infty) and constant on (−∞,0)(-\infty, 0), but the domain is not an interval. Indeed h(2)=h(12)≈1.5708=π2h(2) = h(\tfrac12) \approx 1.5708 = \frac{\pi}{2} while h(−2)≈−1.5708=−π2h(-2) \approx -1.5708 = -\frac{\pi}{2}. Two constants, one per piece.

Common Misconceptions & Pitfalls

  • "Derivative positive at a point means increasing near it." False. Let f(x)=x2+x2sin⁡1xf(x) = \frac{x}{2} + x^2 \sin\frac1x with f(0)=0f(0) = 0. Then f′(0)=12>0f'(0) = \frac12 > 0, but for x≠0x \ne 0, f′(x)=12+2xsin⁡1x−cos⁡1xf'(x) = \frac12 + 2x\sin\frac1x - \cos\frac1x, and at x=12πkx = \frac{1}{2\pi k} this equals −12-\frac12. Negative slopes occur arbitrarily close to 00, so ff is not increasing on any interval around 00. The theorem needs f′>0f' > 0 on a whole interval.
  • "Negative derivative everywhere means decreasing." Only on an interval. f(x)=1xf(x) = \frac1x has f′(x)=−1x2<0f'(x) = -\frac{1}{x^2} < 0 at every point of its domain, but f(−1)=−1<f(1)=1f(-1) = -1 < f(1) = 1. It decreases on (−∞,0)(-\infty, 0) and on (0,∞)(0, \infty) separately.
  • "Strictly increasing requires f′>0f' > 0 everywhere." No: f(x)=x3f(x) = x^3 has f′(0)=0f'(0) = 0 and is still strictly increasing. Positive derivative is sufficient, not necessary. What does follow is that f′f' cannot vanish on a whole interval.
  • "The MVT gives the point cc." It only asserts existence. In Example 3, c≈1.684c \approx 1.684 had to be solved for separately, and in general it may not be expressible in closed form.

Summary

Rolle's theorem and the Mean Value Theorem need continuity on [a,b][a, b] and differentiability on (a,b)(a, b), and Rolle also needs f(a)=f(b)f(a) = f(b). Dropping either hypothesis can make the conclusion fail: ∣x∣\lvert x\rvert has a corner, x−⌊x⌋x - \lfloor x\rfloor has a jump, and in both cases no point has the required slope. From the MVT on an interval follow the three workhorse facts: a zero derivative gives a constant, equal derivatives give functions that differ by a constant, and a positive derivative gives a strictly increasing function. The word "interval" cannot be dropped, as 1x\frac1x and arctan⁡x+arctan⁡1x\arctan x + \arctan\frac1x show. The theorem also converts bounds on f′f' into bounds on ff, which gave a rigorous bracket for 26\sqrt{26} and the Lipschitz constant 14\frac14 for the sigmoid. The next lesson, extrema-concavity-and-optimization, uses these facts to turn signs of derivatives into maxima and minima.

Documentation Links