Calculus · Differential calculus

The Mean Value Theorems: What the Derivative Guarantees

You drive 150 km in exactly 2 hours. Your average speed was 75 km/h, and so, at some moment during the trip, your speedometer must have shown exactly 75 km/h. That everyday intuition is a theorem, and it is one of the most useful in all of calculus. This post presents the three mean value theorems (Rolle, Lagrange and Cauchy), explains what they mean, why they are true, and what they are good for.

1. Rolle's theorem

Rolle's theorem If the function \(y = f(x)\)
  1. is continuous on the closed interval \([a, b]\),
  2. has a derivative \(f'(x)\) for \(x \in (a, b)\), and
  3. satisfies \( f(a) = f(b) = 0 \),
then there is at least one value \(x = \xi\), with \(\xi \in (a, b)\), such that \[ f'(\xi) = 0. \]

The theorem holds just as well under the weaker condition \( f(a) = f(b) \) (equal values, not necessarily zero): subtracting the constant \(f(a)\) from \(f\) changes neither the hypotheses nor the derivative.

Geometric meaning: if a smooth curve starts and ends at the same height, then somewhere in between it has a horizontal tangent. A ball thrown upward and caught at the same height must, at some instant, stop rising and start falling: at that instant its vertical velocity is zero.

a b ξ f′(ξ) = 0 y = f(x)
Figure 1. Rolle's theorem: \(f(a) = f(b)\), so at some point \(\xi\) between them the tangent (green) is horizontal.

Why it is true. A continuous function on a closed interval attains its largest and smallest values (Weierstrass' theorem).

Example 1 · Checking the theorem \( f(x) = x^2 - 4x + 3 \) on \([1, 3]\): \( f(1) = f(3) = 0 \), and \(f\) is a polynomial, so all hypotheses hold. Then \( f'(x) = 2x - 4 = 0 \) gives \( \xi = 2 \in (1, 3) \), the vertex of the parabola.
Example 2 · Counting roots Show that \( x^3 + x - 1 = 0 \) has exactly one real root.

At least one: \(f(0) = -1 < 0\) and \(f(1) = 1 > 0\), so by continuity \(f\) has a root in \((0, 1)\).

At most one: if there were two roots \(x_1 < x_2\), then \(f(x_1) = f(x_2) = 0\) and Rolle's theorem would give a \(\xi\) with \(f'(\xi) = 0\). But \( f'(x) = 3x^2 + 1 > 0 \) everywhere. Contradiction.

The general principle: between any two roots of \(f\) lies a root of \(f'\). So if \(f'\) has \(k\) real roots, \(f\) has at most \(k + 1\).

2. Why every hypothesis matters

Each of the three conditions is essential. Remove any one, and the conclusion can fail:

Three counterexamples
  • No derivative at one point: \( f(x) = 1 - |x| \) on \([-1, 1]\). It is continuous and \(f(-1) = f(1) = 0\), but \(f'(x) = \pm 1\) wherever it exists. There is no horizontal tangent; the peak at \(x = 0\) is a corner, where the derivative does not exist.
  • Not continuous at an endpoint: \( f(x) = x \) for \(0 \le x < 1\) and \(f(1) = 0\). Then \(f(0) = f(1) = 0\) and \(f'(x) = 1\) on \((0, 1)\). The jump at \(x = 1\) breaks the theorem.
  • Different values at the ends: \( f(x) = x \) on \([0, 1]\). Everything is smooth, but \(f(0) \ne f(1)\), and \(f' = 1\) never vanishes. (This case is handled by Lagrange's theorem below.)

Note also what the theorem does not say: it guarantees at least one \(\xi\), but there may be several, and the theorem doesn't tell you where they are. It is an existence theorem.

3. Lagrange's theorem

Now drop the condition \(f(a) = f(b)\). Tilt Figure 1 and the horizontal chord becomes a sloping one. The horizontal tangent becomes a tangent parallel to the chord.

Lagrange's theorem (the mean value theorem) If the function \(y = f(x)\) is continuous for \(x \in [a, b]\) and has a derivative \(f'(x)\) for \(x \in (a, b)\), then \[ f(b) - f(a) = (b - a)\,f'(\xi), \qquad \text{for some } \xi \in (a, b). \]

Dividing by \(b - a\) gives the more memorable form

\[ \frac{f(b) - f(a)}{b - a} = f'(\xi). \]
A B a b ξ₁ ξ₂ chord y = f(x)
Figure 2. Lagrange's theorem: the tangents at \(\xi_1\) and \(\xi_2\) (green) are parallel to the chord \(AB\) (red). Here there are two such points; the theorem guarantees at least one.

Proof. Subtract the chord from the curve. The function

\[ g(x) = f(x) - f(a) - \frac{f(b) - f(a)}{b - a}(x - a) \]

measures the vertical distance between the curve and the chord. It is continuous on \([a, b]\), differentiable on \((a, b)\), and \(g(a) = g(b) = 0\). By Rolle's theorem, \(g'(\xi) = 0\) for some \(\xi \in (a, b)\), that is,

\[ f'(\xi) - \frac{f(b) - f(a)}{b - a} = 0. \]

Lagrange's theorem is simply Rolle's theorem viewed at an angle.

The increment form

Write \(a = x\), \(b = x + \Delta x\). Every point between them can be written as \( \xi = x + \theta\,\Delta x \) with \(0 < \theta < 1\), so

\[ f(x + \Delta x) - f(x) = f'(x + \theta\,\Delta x)\,\Delta x \qquad (0 < \theta < 1). \]

Compare with the post on the differential, where we had the approximation \( \Delta y \approx f'(x)\,\Delta x \). Lagrange's theorem makes it exact, at the price of evaluating the derivative at an unknown intermediate point. For this reason it is also called the formula of finite increments.

Example 3 · Finding ξ For \( f(x) = x^2 \) on \([a, b]\): \[ \frac{b^2 - a^2}{b - a} = a + b = 2\xi \quad\Longrightarrow\quad \xi = \frac{a + b}{2}. \] For a parabola, the tangent parallel to a chord is always above the midpoint of the interval.

4. Consequences of Lagrange's theorem

Lagrange's theorem is the bridge from information about the derivative to information about the function. Almost every theorem connecting the two is proved with it.

4.1 Zero derivative means constant

Corollary 1 If \( f'(x) = 0 \) for every \(x\) in an interval, then \(f\) is constant on that interval.

Proof: for any two points \(x_1 < x_2\), \( f(x_2) - f(x_1) = (x_2 - x_1)f'(\xi) = 0 \). Consequence: two functions with the same derivative differ by a constant. This is exactly why every indefinite integral has a "\(+\,C\)".

Example 4 · An identity without trigonometry Let \( F(x) = \operatorname{arctg}x + \operatorname{arcctg}x \). Then \( F'(x) = \frac{1}{1 + x^2} - \frac{1}{1 + x^2} = 0 \), so \(F\) is constant. At \(x = 1\): \( F(1) = \frac\pi4 + \frac\pi4 \). Hence \[ \operatorname{arctg}x + \operatorname{arcctg}x = \frac\pi2 \quad \text{for all } x. \]

4.2 The sign of the derivative and monotonicity

Corollary 2 If \( f'(x) > 0 \) on an interval, then \(f\) is increasing there; if \( f'(x) < 0 \), \(f\) is decreasing.

Proof: for \(x_1 < x_2\), \( f(x_2) - f(x_1) = (x_2 - x_1)f'(\xi) \), and both factors are positive. This is the basis of every "increasing / decreasing" table you will draw when sketching graphs.

4.3 Inequalities

If you know bounds on \(f'\), Lagrange's theorem turns them into bounds on \(f\):

\[ m \le f'(x) \le M \ \text{on } (a, b) \quad\Longrightarrow\quad m(b - a) \le f(b) - f(a) \le M(b - a). \]
Example 5 · \( |\sin a - \sin b| \le |a - b| \) By Lagrange, \( \sin a - \sin b = (a - b)\cos\xi \), and \( |\cos\xi| \le 1 \). So the sine never changes faster than its argument. (Functions with this property are called Lipschitz continuous.)
Example 6 · \( \frac{x}{1 + x} < \ln(1 + x) < x \) for \(x > 0\) Apply Lagrange to \( \ln t \) on \([1, 1 + x]\): \[ \ln(1 + x) - \ln 1 = x\cdot\frac{1}{\xi}, \qquad 1 < \xi < 1 + x. \] Since \( \frac{1}{1 + x} < \frac1\xi < 1 \), multiplying by \(x > 0\) gives the result. For example, with \(x = 1\): \( 0.5 < \ln 2 < 1 \).

5. Cauchy's theorem

Cauchy's theorem generalizes Lagrange's to two functions at once.

Cauchy's theorem (generalized mean value theorem) If the functions \(f(x)\) and \(\varphi(x)\)
  1. are continuous for \(x \in [a, b]\),
  2. have derivatives \(f'(x)\) and \(\varphi'(x)\) for \(x \in (a, b)\) that are not simultaneously equal to zero, and
  3. \( \varphi(b) \ne \varphi(a) \),
then \[ \frac{f(b) - f(a)}{\varphi(b) - \varphi(a)} = \frac{f'(\xi)}{\varphi'(\xi)}, \qquad \text{for some } \xi \in (a, b). \]

The crucial point is the single \(\xi\). One might try to apply Lagrange's theorem to \(f\) and \(\varphi\) separately and divide:

\[ \frac{f(b) - f(a)}{\varphi(b) - \varphi(a)} = \frac{(b - a)f'(\xi_1)}{(b - a)\varphi'(\xi_2)}. \]

But this gives two different points \(\xi_1\) and \(\xi_2\). Cauchy's theorem says that one common point \(\xi\) works for both, which is much stronger.

Proof. Apply Rolle's theorem to

\[ g(x) = \big[f(x) - f(a)\big]\big[\varphi(b) - \varphi(a)\big] - \big[\varphi(x) - \varphi(a)\big]\big[f(b) - f(a)\big]. \]

It satisfies \(g(a) = g(b) = 0\), so \(g'(\xi) = 0\) for some \(\xi\):

\[ f'(\xi)\big[\varphi(b) - \varphi(a)\big] = \varphi'(\xi)\big[f(b) - f(a)\big]. \]

If \(\varphi'(\xi)\) were \(0\), the left side would force \(f'(\xi) = 0\) too (because \(\varphi(b) \ne \varphi(a)\)), which contradicts hypothesis 2. So \(\varphi'(\xi) \ne 0\), and we may divide. This shows exactly what hypothesis 2 is for: it guarantees that the denominator \(\varphi'(\xi)\) is not zero.

Geometric meaning. Consider the curve given parametrically by \( x = \varphi(t) \), \( y = f(t) \), \( t \in [a, b] \). The left side is the slope of the chord joining its endpoints; the right side, \( \frac{f'(\xi)}{\varphi'(\xi)} = \frac{dy}{dx} \), is the slope of the tangent at the parameter value \(\xi\) (post on higher derivatives). So Cauchy's theorem is Lagrange's theorem for parametric curves: some tangent is parallel to the chord.

With \(\varphi(x) = x\), Cauchy's theorem reduces to Lagrange's. And its most famous application is L'Hôpital's rule for limits of the form \( \frac00 \): if \(f(a) = \varphi(a) = 0\), then \( \frac{f(x)}{\varphi(x)} = \frac{f'(\xi)}{\varphi'(\xi)} \) with \(\xi\) between \(a\) and \(x\), and as \(x \to a\) also \(\xi \to a\).

Example 7 · Finding ξ For \( f(x) = x^3 \), \( \varphi(x) = x^2 \) on \([1, 2]\): \[ \frac{8 - 1}{4 - 1} = \frac73 = \frac{3\xi^2}{2\xi} = \frac{3\xi}{2} \quad\Longrightarrow\quad \xi = \frac{14}{9} \approx 1.56 \in (1, 2). \] With two separate applications of Lagrange we would get \( \xi_1 = \sqrt{7/3} \approx 1.53 \) for \(x^3\) and \( \xi_2 = 1.5 \) for \(x^2\): different points, as warned above.

6. Summary

TheoremExtra hypothesisConclusionGeometric meaning
Rolle\(f(a) = f(b)\)\( f'(\xi) = 0 \)horizontal tangent
Lagrangenone\( f(b) - f(a) = (b - a)f'(\xi) \)tangent parallel to the chord
Cauchy\(f', \varphi'\) not both zero, \(\varphi(b) \ne \varphi(a)\)\( \frac{f(b) - f(a)}{\varphi(b) - \varphi(a)} = \frac{f'(\xi)}{\varphi'(\xi)} \)same, for a parametric curve

In all three: \(f\) (and \(\varphi\)) continuous on \([a, b]\), differentiable on \((a, b)\), and \(\xi \in (a, b)\) exists but is generally unknown. Each theorem is a special case of the next: Rolle is Lagrange with \(f(a) = f(b)\), and Lagrange is Cauchy with \(\varphi(x) = x\). Yet the proofs run the other way: Lagrange and Cauchy are both proved from Rolle.

7. Practice problems

Try each one before opening the solution. More solved problems from this topic are in Differential Calculus.

Problem 1: Verify Rolle's theorem for \( f(x) = \sin x \) on \([0, \pi]\).

\(f\) is continuous and differentiable, \( f(0) = f(\pi) = 0 \). \( f'(x) = \cos x = 0 \) gives \( \xi = \frac\pi2 \in (0, \pi) \).

Problem 2: Find \(\xi\) in Lagrange's theorem for \( f(x) = x^3 \) on \([0, 2]\).

\( \frac{8 - 0}{2} = 4 = 3\xi^2 \Rightarrow \xi = \frac{2}{\sqrt3} \approx 1.155 \in (0, 2) \).

Problem 3: Why doesn't Rolle's theorem apply to \( f(x) = 1 - \sqrt[3]{x^2} \) on \([-1, 1]\)?

\( f(-1) = f(1) = 0 \) and \(f\) is continuous, but \( f'(x) = -\frac{2}{3\sqrt[3]{x}} \) does not exist at \(x = 0\) (a cusp, as in the post on derivatives). Indeed \(f'\) is never zero.

Problem 4: Show that \( e^x \ge 1 + x \) for all \(x\).

For \(x \ne 0\), Lagrange on \([0, x]\) (or \([x, 0]\)) gives \( e^x - 1 = x\,e^\xi \) with \(\xi\) between \(0\) and \(x\). If \(x > 0\): \(e^\xi > 1\), so \( e^x - 1 > x \). If \(x < 0\): \(e^\xi < 1\) and \(x < 0\), so \( x\,e^\xi > x \). Equality holds only at \(x = 0\).

Problem 5: Show that \( x^5 + x + 1 = 0 \) has exactly one real root.

\( f(-1) = -1 < 0 \), \( f(0) = 1 > 0 \): at least one root. \( f'(x) = 5x^4 + 1 > 0 \): by Rolle's theorem, at most one.

Problem 6: Prove that \( |\operatorname{arctg}a - \operatorname{arctg}b| \le |a - b| \).

\( \operatorname{arctg}a - \operatorname{arctg}b = \frac{a - b}{1 + \xi^2} \), and \( \frac{1}{1 + \xi^2} \le 1 \).

Problem 7: Find \(\xi\) in Cauchy's theorem for \( f(x) = \sin x \), \( \varphi(x) = \cos x \) on \(\big[0, \frac\pi2\big]\).

\( \frac{1 - 0}{0 - 1} = -1 = \frac{\cos\xi}{-\sin\xi} \Rightarrow \operatorname{ctg}\xi = 1 \Rightarrow \xi = \frac\pi4 \).

Problem 8: Show that \( \arcsin x + \arccos x = \frac\pi2 \) for \(x \in [-1, 1]\).

On \((-1, 1)\) the derivative is \( \frac{1}{\sqrt{1 - x^2}} - \frac{1}{\sqrt{1 - x^2}} = 0 \), so the sum is constant there; at \(x = 0\) it equals \( 0 + \frac\pi2 \). At \(x = \pm1\) check directly: \( \frac\pi2 + 0 \) and \( -\frac\pi2 + \pi \).

Final thoughts

The mean value theorems don't compute anything: they tell you that a certain point exists, without saying where. That sounds weak, yet it is exactly what turns local information (the derivative at each point) into global information (how the function behaves on a whole interval). Monotonicity, constant functions, inequalities, counting roots, L'Hôpital's rule and Taylor's formula with remainder all rest on them. The picture to remember: somewhere, the tangent is parallel to the chord.

Next in the series: L'Hôpital's rule and Taylor's formula.