If f is continuous on [a,b] and differentiable on (a,b), there is at least one c between a and b where the tangent (amber) is parallel to the secant (navy).
For this function
Function · f(x)=x3, f′(x)=3x2
With a=−2, b=2 there are two points c=±32≈±1.155.
Secant slope · b−af(b)−f(a)=2−(−1)8−(−1)=3
One pointc has f′(c)=3: the amber tangent there runs parallel to the secant.
Mean Value Theorem (MVT) — if f is continuous on [a,b] and differentiable on (a,b), then there exists at least one c∈(a,b) where f′(c)=(f(b)−f(a))/(b−a).
Secant line — the straight line through the two interval endpoints (a,f(a)) and (b,f(b)). Its slope is the average rate of change of f on [a,b].
Tangent line at c — the straight line touching the curve at (c,f(c)) with slope f′(c). The MVT guarantees at least one such tangent is parallel to the secant.
Average rate of change — (f(b)−f(a))/(b−a), the change in output divided by the change in input on the interval.
Rolle's theorem — the special case of the MVT when f(a)=f(b). The secant is horizontal, so the MVT promises an interior c with f′(c)=0.
Getting Started
The tool has three parts. Across the top runs a bar with the Function menu and the buttons for zooming, the starting view, saving a picture and full screen. On the left is the graph. On the right is the explanation, with the controls under it.
The graph shows the function in blue, dashed gray lines at the ends a and b, and the secant in navy through (a,f(a)) and (b,f(b)). Every point c between them where the curve's slope equals the secant's is marked with an amber dot, and the dashed amber tangent there runs parallel to the secant.
The tool opens with f(x)=x3 on [−1,2]: the secant slope is 3, and one point c has f′(c)=3.
The Function Families
DemoFunctions and their c values
Step 0 of 3
The Function menu lists six smooth functions — continuous and differentiable everywhere, so the theorem always applies:
• Identity — a line: every c works. • Quadratic — c is always the midpoint 2a+b. • Cubic — on [−2,2] there are two points, c=±32≈±1.155. • Sine and Cosine — over a wide interval several points appear; cosine on [−3,3] shows Rolle's theorem. • Exponential — always exactly one point, c=lnb−aeb−ea.
Identity: Every Point Is a c
f(x)=x on [−2,2]. The endpoints are (−2,−2) and (2,2), so the secant slope is
m=2−(−2)2−(−2)=1
and f′(x)=1 everywhere. The theorem asks for a point where f′(c)=m, and here every point in the interval qualifies.
Identity on [-2, 2], frozen
Secant, curve and tangents all coincide, because f′ is 1 everywhere and the secant slope is also 1. The solver returns hundreds of valid c values here; the frozen picture keeps four of them, which looks identical since every tangent is the same line.
The MVT promises at least one c, never exactly one, and this family is the reason that wording matters. The tool's solver reports several hundred solutions on this interval — one per sample step — because there is genuinely no place where the condition fails.
Geometrically the secant, the curve and every tangent are the same line, which is why the picture looks so bare. A straight function has nothing to deviate from its own average rate, so the "somewhere the instantaneous rate equals the average rate" guarantee is satisfied trivially and everywhere at once.
Quadratic: Rolle's Theorem in Disguise
f(x)=x2 on [−2,2]. Because the parabola is symmetric about the origin, the two endpoint heights are equal — f(−2)=f(2)=4 — so the secant is horizontal:
m=2−(−2)4−4=0
Solving f′(c)=2c=0 gives the single solution c=0.
Quadratic on [-2, 2], frozen
Equal endpoint heights make the secant horizontal, so the single tangent at c = 0 is horizontal too. This is the Rolle configuration.
Equal endpoint values is exactly the hypothesis of Rolle's theorem, which is the special case of the MVT where f(a)=f(b) and the conclusion becomes f′(c)=0. This family is the MVT and Rolle's theorem being the same statement.
The location of c is not a coincidence either. For any interval [a,b] on a parabola, the mean value point is the midpoint 2a+b — a property of quadratics specifically, not something the theorem promises in general. Drag the endpoints and watch c track the middle.
Cubic: Two Solutions at Once
f(x)=x3 on [−2,2] runs from −8 to 8, so
m=48−(−8)=4
Solving f′(c)=3c2=4 gives c=±32≈±1.1547 — two solutions, both inside the interval, and the tool draws a tangent at each.
Cubic on [-2, 2], frozen
Three parallel lines at slope 4: the secant, plus tangents at c = -1.1547 and c = +1.1547. Two solutions, both drawn.
Two parallel tangents, one on either side of the origin, both matching the secant's slope of 4. This is the clearest demonstration that the theorem's "at least one" is not merely cautious phrasing.
Between the two solutions the curve is shallower than the secant — at the origin the tangent is flat — and outside them it is steeper. The mean rate of 4 gets attained on the way down to that flat spot and again on the way back up.
Sine: a Full Period With a Flat Secant
f(x)=sin(x) on [0,2π] starts and ends at zero, so the secant is horizontal again:
m=2π0−0=0
Solving cos(c)=0 on (0,2π) gives c=2π≈1.5708 and c=23π≈4.7124 — the peak and the trough.
Sine on [0, 2π], frozen
A full period returns to its starting height, so the secant is flat and the two tangents sit at the crest and the trough - c = π/2 and c = 3π/2.
Another Rolle's-theorem configuration, and the two solutions are precisely the turning points of the wave. That is what a horizontal tangent means for a sine: nothing else on a full period has zero slope.
The lesson worth carrying is about the net-versus-total distinction. The function travels up to 1, down to −1 and back, yet its average rate of change over the interval is exactly zero, because average rate only ever compares the endpoints. All that motion cancels in the numerator.
Cosine: a Secant That Is Not Flat
f(x)=cos(x) on [0,π] falls from 1 to −1, so this time the secant genuinely slopes:
m=π−1−1=−π2≈−0.6366
Solving −sin(c)=−π2 gives two solutions, c≈0.6901 and c≈2.4515, placed symmetrically about 2π.
Cosine on [0, π], frozen
The first family with a genuinely tilted secant, at slope -0.6366. The two tangents are parallel to it, placed symmetrically about the midpoint.
This is the first family where the tangents are visibly tilted rather than horizontal, which makes the actual claim of the theorem easier to see: three parallel lines, one secant and two tangents, all at slope −0.64.
The symmetry of the two solutions about the midpoint reflects the symmetry of sin about 2π on this interval. The cosine descends fastest at the middle and more gently at both ends, so the average steepness is achieved once on the way in and once on the way out.
Exponential: Where the Average Rate Is Attained
f(x)=ex on [0,1] climbs from 1 to e, so
m=1e−1≈1.7183
Since f′=f, solving ec=e−1 gives c=ln(e−1)≈0.5413 — a single solution, slightly right of the midpoint.
Exponential on [0, 1], frozen
One tangent, at c = 0.5413, matching the secant slope e - 1 = 1.7183. Note it sits right of the interval midpoint rather than on it.
That offset is the interesting part. For the parabola the mean value point sat exactly at the midpoint; here it does not, and it never will. Because ex is convex, the function spends more of the interval below its average slope and less above it, which pushes the crossing point past the middle.
The value ln(e−1) also has a neat reading: it is the point where the height of the curve equals the average rate of change across the whole interval — a coincidence available only to a function that is its own derivative.
The a and b Sliders
DemoInterval a and b
Step 0 of 1
The sliders left enda and right endb set the interval, each from −5 to 5. As you move them, the secant turns, its slope changes, and the points c appear, move and disappear: the tool finds every one between a and b at each move.
Set a and b to the same value and there is no secant; the explanation asks you to pull them apart. Press ▶ beside a slider to let it run by itself.
Reading the Secant Slope
The amber label at the bottom of the graph gives the secant slope, b−af(b)−f(a), the average rate of change over [a,b].
The explanation writes the same fraction with the actual numbers, and then says how many points c in the interval have f′(c) equal to it: one, several (the theorem promises at least one), or every point when the function is a straight line.
The Points c
Each point c is an amber dot on the curve labelled c, with a dashed amber tangent through it parallel to the navy secant. Parallel lines have equal slopes, so the picture is the theorem: f′(c)=b−af(b)−f(a).
The points are found without solving an equation: the interval is cut into 400 pieces and each piece where f′(x) minus the secant slope changes sign holds one. When f(a)=f(b), the secant is level and the explanation names Rolle's theorem: the tangent at each c is horizontal.
The Switch and Zoom
DemoRolle's theorem
Step 0 of 2
The switch Secant and tangents under the sliders hides or shows the secant, the points c and their tangents, leaving the curve and the end lines.
The buttons at the top right zoom in and out, return to the starting view, save the graph as a picture and open the tool full screen.
The Concepts Tab
DemoThe Concepts tab
Step 0 of 1
Above the explanation, the Concepts tab holds a page that does not change with the controls:
• the statement of the Mean Value Theorem and its hypotheses; • the speedometer picture of what it says; • why differentiability matters; • Rolle's theorem, and what the theorem is used for.
What Is the MVT
The Mean Value Theorem is one of the central results of differential calculus. It connects the global behavior of a function (its average rate of change over an interval) with its local behavior (its instantaneous rate of change at a single point).
Statement. If f is continuous on [a,b] and differentiable on (a,b), then there exists at least one point c in (a,b) such that
f′(c)=b−af(b)−f(a).
The right side is the slope of the secant line from (a,f(a)) to (b,f(b)). The left side is the slope of the curve at c. The theorem says these two slopes match at some interior point — equivalently, the tangent at c is parallel to the secant.
For the full proof and an extended theoretical treatment, see the mean value theorem page.
The Speedometer Intuition
The simplest way to internalize the MVT is the driving metaphor.
You drive 100 kilometers in exactly one hour. Your average speed is 100 km/h. The MVT says that at some instant during the trip, your speedometer read exactly100 km/h. You cannot average 100 km/h without hitting 100 km/h at some moment.
Mapping back: position is f, time is x, the interval is [a,b]=[start,end], average speed is the secant slope, and instantaneous speed is f′(c). The MVT guarantees there is a c in the trip where instantaneous speed equals average speed.
This is the reason the theorem deserves the word "value" — at some interior point the rate of change takes on the value of the average rate of change. The intuition extends to any quantity that changes over a smooth interval.
Rolle's Theorem
Rolle's theorem is the special case of the MVT when the function's values at the endpoints are equal.
Statement. If f is continuous on [a,b], differentiable on (a,b), and f(a)=f(b), then there exists c∈(a,b) with f′(c)=0.
The secant slope is zero whenever f(a)=f(b), so the MVT immediately gives f′(c)=0 — a horizontal tangent somewhere inside. To see this in the tool, pick the Quadratic family and set a=−1, b=1. Both endpoints give f=1, the secant is horizontal, and the tangent at c=0 is horizontal too.
Rolle's theorem is the geometric kernel of the MVT, and historically came first. It is also the workhorse behind most existence proofs in calculus: if a function has the same value at two points, its derivative must vanish somewhere between them.
For deeper coverage, see the Rolle's theorem page.
Related Concepts
Derivatives — the slope of the tangent at c. The MVT relates this local quantity to a global quantity (the secant slope). See the derivative visualizer.
Rolle's theorem — the special case of the MVT when the endpoint values agree.
Cauchy mean value theorem — a generalization to two functions simultaneously. Used to prove L'Hôpital's rule.
L'Hôpital's rule — for indeterminate limits of the form 0/0 or ∞/∞. A direct application of the Cauchy MVT.
Increasing and decreasing functions — the MVT proves that f′>0 on an interval implies f is strictly increasing there. One of the most useful consequences.
Constant function theorem — if f′=0 everywhere on an interval, then f is constant. Comes directly from the MVT.
Antiderivatives — two antiderivatives of the same function differ by a constant. Proved by the constant function theorem above.