Mean Value Theorem Calculator

Find where the tangent slope equals the secant slope over an interval, as MVT guarantees.

Mean Value Theorem Calculator

What Is the Mean Value Theorem?

The Mean Value Theorem (MVT) is one of the cornerstone results of differential calculus. It says: if f is continuous on the closed interval [a, b] and differentiable on the open interval (a, b), then there is at least one point c strictly between a and b where

f'(c) = [f(b) − f(a)] / (b − a)

The right-hand side is the average rate of change over the whole interval — the slope of the secant line connecting the endpoints. The theorem guarantees that somewhere inside, the instantaneous rate of change momentarily equals that average. Geometrically: some tangent line inside the interval is exactly parallel to the secant across it.

The everyday version: if you drove 120 miles in 2 hours, your average speed was 60 mph — and the MVT guarantees your speedometer read exactly 60 at some instant. Not approximately, not "probably": exactly, at least once.

How to Use This Calculator

Enter a function and an interval [a, b]. The calculator computes the endpoint values and the secant slope, differentiates f symbolically, then numerically solves f'(c) = secant slope inside the interval, reporting every solution (there can be more than one). The graph shows the whole story: the curve, the secant line through the endpoints (dashed red), and a tangent line at each found c (dotted green) — you can see the parallelism directly. If f isn't differentiable somewhere inside the interval, the theorem's guarantee evaporates, and the calculator will typically find no valid c.

Worked Example

Apply the MVT to f(x) = x² on [0, 4]. The secant slope is [f(4) − f(0)]/(4 − 0) = (16 − 0)/4 = 4. The derivative is f'(x) = 2x, so the MVT equation is 2c = 4, giving c = 2. Check: c = 2 lies strictly inside (0, 4) ✓, and the tangent at x = 2 has slope 4, parallel to the secant ✓. For a parabola the MVT point always lands exactly at the interval's midpoint — a special symmetry of quadratics, not a general rule.

Hypotheses Matter

RequirementWhy it's neededFailure example
Continuous on [a, b]A jump lets the function "teleport" without ever having the average slopeStep function
Differentiable on (a, b)A corner can hide the required slope|x| on [−1, 1]: secant slope 0, but f' is never 0

The |x| example is worth internalizing: its secant over [−1, 1] is horizontal, yet the derivative is −1 or +1 everywhere it exists — never 0. The single non-differentiable point at x = 0 is enough to break the guarantee.

Common Mistakes to Avoid

  • Expecting c to be unique. The theorem promises at least one c; wavy functions often have several. This calculator reports all it finds.
  • Including the endpoints. c must lie strictly inside (a, b) — a matching slope exactly at a or b doesn't satisfy the theorem's conclusion.
  • Skipping the hypothesis check. On exams, verifying continuity and differentiability is usually part of the credit — and as |x| shows, it isn't a formality.
  • Confusing MVT with Rolle's theorem. Rolle's is the special case f(a) = f(b), where the secant is horizontal and the conclusion becomes f'(c) = 0. MVT is Rolle's theorem tilted.

Why the MVT Matters

Beyond geometry, the MVT is the engine behind facts used constantly without comment. It's how we know a function with zero derivative everywhere must be constant — and therefore why two antiderivatives of the same function differ only by a constant, the very fact that makes the "+ C" in indefinite integrals the whole story. It powers error bounds too: the accuracy guarantees for linear approximation and Taylor polynomials are proved by MVT-style arguments, which is how engineers can promise an approximation is within a stated tolerance.

In the real world, the speeding-ticket argument is genuine: average-speed cameras that photograph a car at two points and compute its average speed rely on the MVT to prove the car's instantaneous speed hit that average somewhere between the cameras — evidence that stands up because it's a theorem, not a statistical inference. Similar interval-to-instant reasoning appears in quality control (a batch's average implies some item at the average) and in economics when translating average growth rates into statements about instantaneous ones.

Frequently Asked Questions

What's the difference between the MVT and Rolle's theorem?

Rolle's theorem is the special case where f(a) = f(b): the secant is horizontal, so the guaranteed point has f'(c) = 0 — a critical point. The general MVT is proved from Rolle's theorem by subtracting off the secant line.

Can there be more than one valid c?

Yes — any function that wiggles enough crosses the average slope several times. x³ − 3x on [−2, 2] has two MVT points (c = ±2/√3), and sin(x) over several periods has many. The theorem's "at least one" is a floor, not a count.

Is there a Mean Value Theorem for integrals too?

Yes: a continuous function attains its average value (not slope) somewhere on the interval — f(c) = (1/(b−a))∫f dx for some c. The Average Value Calculator computes that average and locates the c where the function crosses it.

Why does the calculator solve the equation numerically instead of algebraically?

Because f'(c) = secant-slope is only solvable in closed form for simple derivatives. Root-finding on f'(x) − slope handles any differentiable function — trig, exponential, mixed — using the same bisection machinery as the Critical Points Calculator.

Does the MVT say anything when the hypotheses fail?

No — it goes silent rather than false. A function may still happen to have a point with the average slope (the conclusion can hold by luck), but there's no guarantee. |x| on [−1, 1] shows the guarantee genuinely failing.

What is Cauchy's Mean Value Theorem?

A generalization for two functions at once: under the same hypotheses, there's a c where f'(c)/g'(c) = [f(b)−f(a)]/[g(b)−g(a)]. Setting g(x) = x recovers the ordinary MVT. Its starring role is in the standard proof of L'Hôpital's rule — the reason differentiating numerator and denominator separately is legitimate traces directly back to this theorem.