Mean Value Theorem Calculator
Find point(s) c ∈ (a, b) where tangent slope equals secant line slope.
The Mean Value Theorem makes a precise promise: if a function is well behaved on an interval, somewhere inside it is a point where its instantaneous rate of change equals its average rate of change across the whole interval. This calculator finds that point: enter a function and an interval, and it checks the conditions, solves for the value (or values) of c, and draws the curve with its secant and tangent lines.
What Is the Mean Value Theorem?
Here is the theorem stated formally:
If f is continuous on the closed interval [a, b] and differentiable on the open interval (a, b), then there exists at least one number c in (a, b) such that f'(c) = (f(b) − f(a)) / (b − a).
In plain words: work out the average rate of change from a to b, and the theorem guarantees the function actually moves at exactly that rate at some interior point — the road-trip idea made rigorous. Average 60 km/h over a journey, and your speedometer read exactly 60 at least once.
The Two Conditions, in Plain Words
- Continuous on [a, b]: the graph has no breaks, jumps or holes from a to b — drawable in one stroke without lifting your pen.
- Differentiable on (a, b): inside the interval the graph is smooth, with no corners, cusps or vertical tangents, so f'(x) exists at every interior point.
Differentiability is required only inside the interval, not at the endpoints. Both conditions must hold first — hence the calculator’s condition check on every problem.
The Formula, Symbol by Symbol
f'(c) = (f(b) − f(a)) / (b − a)
- f(a) and f(b) — the function’s values at the two endpoints.
- (f(b) − f(a)) / (b − a) — the average rate of change over the interval; geometrically, the slope of the secant line joining the endpoints.
- f'(c) — the derivative at c; the slope of the tangent line there.
- c — the guaranteed point, always strictly inside: a < c < b, never at an endpoint.
What It Looks Like on a Graph
Draw the secant line through the curve’s two endpoints: there is a point c where the tangent is parallel to it — the curve momentarily moves in exactly the average direction. The calculator’s graph shows function, secant and tangent at c together.
How to Use the Calculator
- Type your function into the f(x) field, with x as the variable: powers as
x^2, and the supported formssin(x),cos(x),e^x,sqrt(x). - Enter the lower bound (a) and upper bound (b).
- Or start from one of the quick examples.
- Read the results: the condition check says whether the theorem applies, and if it does you get the valid value(s) of c, the secant slope, f(a) and f(b), f'(c), and the graph.
Worked Example 1: f(x) = x² on [1, 3]
- Check the conditions. f(x) = x² is a polynomial — continuous and differentiable everywhere, so the theorem applies.
- Evaluate the endpoints. f(1) = 1 and f(3) = 9.
- Average rate of change. (f(3) − f(1)) / (3 − 1) = (9 − 1) / 2 = 4.
- Differentiate. f'(x) = 2x, so f'(c) = 2c.
- Set them equal and solve. 2c = 4, so c = 2.
- Confirm c is inside the interval. 2 lies between 1 and 3, as required — at x = 2 the tangent slope is exactly 4, matching the secant. Try it in the calculator to see them running parallel.
Worked Example 2: f(x) = sqrt(x) on [1, 4]
- Check the conditions. The square root function is continuous on [1, 4] and differentiable on (1, 4), so the theorem applies.
- Evaluate the endpoints. f(1) = 1 and f(4) = 2.
- Average rate of change. (2 − 1) / (4 − 1) = 1/3.
- Differentiate. f'(x) = 1 / (2√x).
- Set them equal and solve. 1 / (2√c) = 1/3 gives 2√c = 3, so √c = 3/2 and c = 9/4 = 2.25.
- Confirm. 2.25 lies inside (1, 4) — a valid point.
When the Theorem Does NOT Apply
Consider f(x) = 1/x on [−1, 1]. The endpoints give a secant slope of (1 − (−1)) / (1 − (−1)) = 1, but f is not continuous at x = 0 — not even defined there — so the first condition fails and the theorem stays silent. Sure enough, no c exists: f'(x) = −1/x² is negative everywhere, so the tangent slope is never 1. A corner causes the other classic failure: |x| is continuous everywhere but not differentiable at 0. Run the condition check before trusting any c.
Mean Value Theorem vs Rolle’s Theorem
Rolle’s Theorem is the Mean Value Theorem in the special case where the endpoint values are equal. If f(a) = f(b), the formula’s right-hand side becomes 0 and the conclusion simplifies to f'(c) = 0: a horizontal tangent. Example: sin(x) on [0, π] has f(0) = f(π) = 0, and the special point is c = π/2, where cos(π/2) = 0.
| Mean Value Theorem | Rolle’s Theorem | |
|---|---|---|
| Extra condition on the endpoints | None | f(a) = f(b) |
| Conclusion | f'(c) = (f(b) − f(a)) / (b − a) | f'(c) = 0 |
| Conditions on f | Continuous on [a, b], differentiable on (a, b) | The same |
Common Mistakes
- Solving f(c) instead of f'(c). The secant slope must equal the derivative at c: differentiate first, then substitute c into f'(x).
- Skipping the condition check. If a condition fails, no c is guaranteed, however reasonable the arithmetic looks.
- Accepting a c outside the interval. A solution counts only if it lies strictly between a and b.
- Expecting exactly one answer. The theorem promises at least one c; some functions have several, and the calculator reports every valid one.
Frequently Asked Questions
What does the value c actually mean?
It is the x-coordinate where the instantaneous rate of change equals the average rate of change over the interval — where the tangent line runs parallel to the secant through the endpoints.
Can there be more than one value of c?
Yes — at least one is guaranteed, but there may be several. For sin(x) on [0, 2π], the secant slope is 0 and cos(c) = 0 at both c = π/2 and c = 3π/2, so both are valid.
What if the calculator says the theorem does not apply?
A condition failed — usually a discontinuity or a non-differentiable point such as a corner. The theorem then guarantees nothing: a matching point might exist by luck, but often there is none.
Does f need to be differentiable at the endpoints a and b?
No. Differentiability is required only on the open interval (a, b); continuity must hold on the whole closed interval [a, b], but the derivative’s behaviour exactly at a or b is irrelevant.
How is the Mean Value Theorem used in real life?
It is the rigorous version of the average-speed argument: an average rate over an interval must occur as an exact instantaneous rate somewhere inside it. It is also a workhorse of proofs — used, for instance, to show that a function with positive derivative is increasing.
Related Tools
- GPA Calculator — Convert grades and credit hours into a grade point average.
- Percentage Calculator — Work out percentages and percentage change in seconds.
- Age Calculator — Find your exact age in years, months and days.
- BMI Calculator — Check your body mass index and healthy weight range.