How the Mean Value Theorem calculator works
Here’s the theorem in traffic-court terms: if you cover 60 miles in exactly one hour, your average speed was 60 mph — and at some instant during that hour, your speedometer read exactly 60. Not roughly, not on average: exactly. You can’t get from an average of 60 without passing through 60, because speed changes continuously. Some toll systems issue tickets on precisely this logic, timestamping you at two toll plazas and computing the average. The Mean Value Theorem is that idea made rigorous: for a function f that is continuous on [a, b] and differentiable on (a, b), there is at least one point c strictly between a and b where the instantaneous rate of change f′(c) equals the average rate of change over the whole interval.
This calculator computes the average rate (f(b) − f(a))⁄(b − a), then hunts for every c where f′(c) matches it: it estimates the derivative with a symmetric difference quotient (h = 10−5), scans 2,000 subintervals for places where f′(x) − average changes sign, and sharpens each crossing with 40 rounds of bisection — pinning c down to more digits than we display. Supported syntax: numbers, x, the operators + - * / ^, parentheses, the functions sin cos tan asin acos atan sqrt abs ln log exp (log is base 10, ln is natural), and the constants pi and e. Multiplication must be explicit — 2*x, not 2x.
The formula
Here a and b are the interval endpoints, f(a) and f(b) are the function values there, the right-hand side is the slope of the secant line joining (a, f(a)) to (b, f(b)), and c is a point where the tangent line has that exact slope — geometrically, a spot where the tangent runs parallel to the secant. The fine print does real work: f must be continuous on the closed interval [a, b] and differentiable on the open interval (a, b). Both are needed, and the theorem guarantees at least one c — there can be several, and this calculator lists them all.
Worked example
f(x) = x^2 on [1, 4]. The average rate of change is (f(4) − f(1))⁄(4 − 1) = (16 − 1)⁄3 = 5. The derivative is f′(x) = 2x, so we need 2c = 5, giving c = 2.5. Check: 2.5 sits strictly inside (1, 4), and f′(2.5) = 5 — the tangent at x = 2.5 is exactly parallel to the secant through (1, 1) and (4, 16). Enter x^2 with endpoints 1 and 4 and the calculator returns c ≈ 2.5.
Why the hypotheses matter
Drop either condition and the guarantee evaporates. Take f(x) = abs(x) on [−1, 1]: it’s continuous, and the average rate is (1 − 1)⁄2 = 0 — but f′(x) is −1 to the left of zero and +1 to the right, never 0. The theorem isn’t violated; it just never applied, because the corner at x = 0 kills differentiability at one single point, and one point is all it takes. Or take f(x) = 1/x on [−1, 1]: the average rate works out to 1, yet f′(x) = −1/x² is negative everywhere — the discontinuity at x = 0 voids the warranty. When this calculator shows a “hypotheses not met” warning instead of an answer, that’s what it detected: a place inside your interval where f or its derivative stops being a finite number. It’s not being difficult — it’s telling you the theorem has nothing to promise there.