Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 68 · Derivatives

Rolle's and Mean Value Theorems

Learn Rolle's theorem, the Mean Value Theorem and Cauchy's version, with the conditions that matter, worked examples and Python code that finds the point c.

A derivative describes what a function does at one instant. An average rate of change describes what it does over a whole interval. The Mean Value Theorem (MVT) is the bridge between the two: it promises that somewhere inside the interval, the instantaneous rate equals the average rate. It sounds almost too obvious to need a proof, yet it is the reason a large part of calculus works. It explains why a function with zero derivative must be constant, why derivative bounds give error bounds, and why Taylor's theorem has the remainder term it has.

This lesson covers three closely related results: Rolle's theorem (the special case), the Mean Value Theorem (the general case) and Cauchy's Mean Value Theorem (the two-function version). You will see exactly which conditions are needed, what goes wrong when they fail, and how to compute the guaranteed point c numerically. It builds on the derivative definition and continuity, and it prepares you for applications of derivatives and Taylor series.

Rolle's theorem

Imagine throwing a ball straight up and catching it at the same height. At the top, the ball is momentarily still: its velocity is zero. Rolle's theorem is that observation stated for any function.

Rolle's theorem. Suppose f is continuous on the closed interval [a, b], differentiable on the open interval (a, b), and f(a) = f(b). Then there is at least one c in (a, b) with f'(c) = 0.

The reasoning is short. A continuous function on a closed interval reaches a maximum and a minimum. If both happen at the endpoints, the function is constant and f' is zero everywhere. Otherwise one of them happens inside the interval, and at an interior extreme point the derivative must be zero: a smooth peak or valley has a flat tangent.

Every condition matters:

  • Without continuity on [a, b], the function can jump and avoid any flat spot.
  • Without differentiability inside, you can have a sharp corner at the top. The function f(x) = |x| on [-1, 1] has f(-1) = f(1) = 1, but no point where the slope is zero, because the only candidate, x = 0, is a corner.
  • Without equal endpoint values, the function can simply climb.
flowchart LR
    A["f(a) = f(b)<br/>continuous and smooth"] --> B["a max or min<br/>lies inside"]
    B --> C["tangent is flat there"]
    C --> D["f'(c) = 0"]

Equal endpoint heights force a turning point, and a turning point of a smooth curve has slope zero.

The Mean Value Theorem

Tilt Rolle's picture. Draw the chord (the straight secant line) from the point (a, f(a)) to (b, f(b)). The MVT says that some tangent line is parallel to that chord.

Mean Value Theorem. If f is continuous on [a, b] and differentiable on (a, b), then there is at least one c in (a, b) with f'(c) = (f(b) - f(a)) / (b - a).

You can see why it follows from Rolle. Subtract the chord from f: define g(x) = f(x) - f(a) - m (x - a) where m is the chord slope. Then g(a) = 0 and g(b) = 0, so Rolle gives a c with g'(c) = 0, which means f'(c) = m.

The most familiar real-world version is the speed trap. If a car covers 3 km in 100 seconds, its average speed is 108 km/h. The MVT guarantees that at some moment the speedometer read exactly 108 km/h, even if you never looked at it. Cameras at two points on a road use this idea to prove speeding without watching the car in between.

Finding the point c

The theorem tells you that c exists, not where it is. For a given function you can often solve for it. The program below solves two cases with SymPy and one numerically with a root finder. For f(x) = x**3 on [0, 2], the chord slope is (8 - 0) / 2 = 4, and f'(c) = 3*c**2 = 4 gives c = 2/sqrt(3).

Python Find the Rolle and MVT points

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that the point need not be unique. For x**3 - 3*x, Rolle's theorem finds two points, -1 and 1. The theorem only promises at least one.

When the conditions fail

A good habit is to test the theorem on a function that breaks it, so you remember the hypotheses are not decoration. Take f(x) = |x| on [-1, 2]. The chord slope is (2 - 1) / 3 = 1/3, but the derivative of |x| is -1 for negative x and +1 for positive x, and never equals 1/3. The corner at 0 is the culprit.

Another failure: f(x) = 1/x on [-1, 1] is not even continuous. The chord slope is (1 - (-1)) / 2 = 1, yet f'(x) = -1/x**2 is negative everywhere it exists.

Python Counter-examples where the hypotheses fail

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

What the MVT is good for

Constant functions. If f'(x) = 0 on an interval, any two points p < q give f(q) - f(p) = f'(c)(q - p) = 0. So f is constant. Two functions with the same derivative differ by a constant, which is why the + C appears in indefinite integrals.

Monotonicity. If f'(x) > 0 throughout an interval, then f(q) - f(p) = f'(c)(q - p) is positive for p < q, so f is increasing. This is the proof behind the sign-of-derivative test in derivative applications.

Inequalities. Suppose |f'(x)| <= K everywhere. Then |f(q) - f(p)| <= K |q - p|. With f = sin and K = 1, you get |sin(q) - sin(p)| <= |q - p| for all p and q: sine cannot change faster than its input does. Functions with this property are called Lipschitz, and the property is what guarantees that numerical ODE methods behave.

Error estimates. If you approximate f(b) by f(a), the error is f'(c)(b - a) for some unknown c. Bounding |f'| on the interval bounds the error. Taylor's theorem is this same idea extended to higher derivatives.

Counting roots. If f has two roots, Rolle's theorem says f' has a root between them. A polynomial of degree n therefore cannot have more than n real roots: if it had n + 1, its derivative (degree n - 1) would have n, and so on down to a non-zero constant with a root.

Python Using the MVT for a bound

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The roots of p' land between the roots of p, exactly as Rolle predicts.

Cauchy's Mean Value Theorem

Sometimes you compare two functions rather than one function and a straight line. Cauchy's MVT says: if f and g are continuous on [a, b], differentiable on (a, b), and g'(x) is never zero there, then some c satisfies

f'(c) / g'(c) = (f(b) - f(a)) / (g(b) - g(a))

Taking g(x) = x gives back the ordinary MVT. Geometrically, if (g(t), f(t)) traces a parametric curve, the theorem says some tangent to the curve is parallel to the chord between its end points. This is the key step in proving L'Hôpital's rule (see limit laws and tricks).

Proofs of the Lagrange and Cauchy theorems

The ordinary MVT is also called Lagrange's mean value theorem. Each of the three theorems in this lesson is a short proof built on the one before, and seeing the chain once makes the statements easier to remember.

Step 1: Rolle's theorem. Two facts carry the whole proof.

  • Extreme value theorem: a function continuous on a closed interval [a, b] attains a maximum value M and a minimum value m at points of that interval.
  • Fermat's theorem: if f has a maximum or minimum at an interior point c and f'(c) exists, then f'(c) = 0. (To the right of a maximum the difference quotient is <= 0, to the left it is >= 0, and the only number that can be both is 0.)

If M = m the function is constant and any c works. Otherwise at least one of M and m differs from the common endpoint value f(a) = f(b), so it is attained at an interior point, where Fermat's theorem gives f'(c) = 0.

Step 2: Lagrange's MVT. Define the auxiliary function

g(x) = f(x) - f(a) - ((f(b) - f(a)) / (b - a)) (x - a)

which is f minus the chord. It is continuous on [a, b], differentiable on (a, b), and g(a) = g(b) = 0. Rolle gives c with g'(c) = 0, that is f'(c) = (f(b) - f(a)) / (b - a). Geometrically, g measures the vertical gap between the curve and the chord, and the point where that gap is largest has a tangent parallel to the chord.

Step 3: Cauchy's MVT. Let f and g be continuous on [a, b] and differentiable on (a, b), with g'(x) != 0 on (a, b). First, g(b) != g(a): otherwise Rolle would give a point where g' = 0. Now define

h(x) = f(x) (g(b) - g(a)) - g(x) (f(b) - f(a))

Substituting shows h(a) = f(a) g(b) - g(a) f(b) = h(b). Rolle gives c with h'(c) = 0:

f'(c) (g(b) - g(a)) = g'(c) (f(b) - f(a))

and dividing by g'(c) (g(b) - g(a)) gives f'(c) / g'(c) = (f(b) - f(a)) / (g(b) - g(a)). Choosing g(x) = x makes g'(c) = 1 and recovers Lagrange's theorem, so Cauchy's version is the more general of the two. The same machinery proves L'Hôpital's rule: see Limit Laws and Algebraic Tricks.

flowchart LR
    R["Rolle<br/>f(a) = f(b) gives f'(c) = 0"] --> L["Lagrange<br/>subtract the chord"]
    L --> C["Cauchy<br/>compare two functions"]
    C --> H["L'Hopital's rule"]

Each theorem is proved by building an auxiliary function whose endpoint values are equal, then applying Rolle.

Python Check Cauchy's theorem and its auxiliary function

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

For f = x**3 and g = x**2 on [1, 3], the ratio of the changes is 26 / 8 = 3.25, and f'(c) / g'(c) = 3c / 2 = 3.25 gives c = 13/6 = 2.1667. The auxiliary function takes the value -18 at both ends (equal, as the proof needs), and its derivative vanishes at c. For e**x on [0, 1], Lagrange's theorem places c = ln(e - 1) = 0.5413, where the tangent slope e**c equals the chord slope e - 1 = 1.7183.

Common mistakes

  • Forgetting to check the hypotheses. A function that is continuous but has a corner inside the interval can fail the MVT.
  • Thinking c is the midpoint. For x**3 on [0, 2], c is about 1.155, not 1.
  • Assuming c is unique. The theorem only guarantees at least one.
  • Applying Rolle's theorem without checking that f(a) really equals f(b).

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which condition is NOT required for Rolle's theorem?

    An increasing function can never satisfy f(a) = f(b) unless it is constant. Rolle's theorem requires continuity, differentiability inside and equal endpoint values.
  2. 2. For f(x) = x^3 on [0, 2], the MVT point c satisfies 3c^2 = 4. What is c?

    The chord slope is (8 - 0) / 2 = 4, and f'(c) = 3c^2 = 4 gives c^2 = 4/3, so c = 2/sqrt(3), roughly 1.155.
  3. 3. Why does the MVT fail for f(x) = |x| on [-1, 2]?

    |x| is continuous but not differentiable at 0. The slope jumps from -1 to +1 and never equals the chord slope of 1/3.
  4. 4. If f'(x) = 0 for every x in an interval, what does the MVT let you conclude?

    For any two points p < q, f(q) - f(p) = f'(c)(q - p) = 0, so all values are equal.

Summary

  • Rolle's theorem: continuous, differentiable inside, equal endpoint values, so some f'(c) = 0.
  • Mean Value Theorem: some tangent is parallel to the chord, f'(c) = (f(b) - f(a)) / (b - a).
  • Cauchy's MVT compares two functions and underlies L'Hôpital's rule.
  • The hypotheses are essential; corners and jumps break the conclusion.
  • Uses: zero derivative means constant, positive derivative means increasing, derivative bounds give Lipschitz and error bounds, and a limit on the number of roots of a polynomial.

Next: put these ideas to work in Derivative Applications.