The Function picker on the left lists six families in two groups, Polynomial and Transcendental, each tagged with how many c values to expect; tapping one loads it with its default interval. Learn more about the function families
The Display checkboxes switch the curve, the secant, the tangent at c and the dashed lines at a and b on and off. Learn more about the display toggles
The left endpoint a and right endpoint b sliders set the interval; the secant, the tangents and the cards follow, and Reset next to Parameters restores the family default. Learn more about the a and b sliders
The Accent color picker under Appearance recolors the result box and the slider thumbs; its Reset restores the default blue. Learn more about the accent color
The S, M, L and XL buttons set the plot size, and the legend under the plot names the layers that are switched on. Learn more about the plot and legend
The three cards under the plot give the secant slope, the number of c values found and f′(c) at each c. Learn more about the result cards
The info panel has two tabs: Explanation gives the interval, the secant slope and the c values right now, and Concepts covers the theorem and Rolle's theorem. Learn more about the info panel
Quadraticf(x) = x²
×
880 × 460
f(x) = x²secant from (a, f(a)) to (b, f(b))tangent at c (parallel to secant)x = a, x = b
Mean Value Theorem on [a, b][a, b] = [-2, 2]
Secant slope
0
(f(b) − f(a)) / (b − a)
c values found
1
at c = 0
f'(c) at each c
0
matches secant slope
cc = 0→f'(c) = 0= secant slope 0
The secant slope from a to b equals f'(c) at every c — the tangent at c is parallel to the secant.MVT
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 page opens with the Quadratic family f(x)=x2 loaded on the interval [−2,2]. You see three things on the graph:
• The solid blue curve of f.
• A deep-blue secant line connecting (−2,4) to (2,4). Its slope is 0.
• A light-blue tangent at c=0, parallel to the secant (also slope 0). The midpoint of the interval, exactly as the theorem predicts for a parabola.
Dashed vertical gray lines mark a and b. The boxed card below the graph reports the secant slope, the number of c values found, and the value of f′ at each c.
To explore, drag the left endpoint a and right endpoint b sliders to set any interval, or switch families in the left panel to see how the number of c values can change.
The Function Families
DemoFamilies and their c values
Step 0 of 5
Six families are organized into two groups in the left panel, each tagged with the typical number of c values you can expect.
Polynomial:
• Identityf(x)=x — every point is a c. The function is its own secant.
• Quadraticf(x)=x2 — exactly one c, always at the midpoint (a+b)/2.
• Cubicf(x)=x3 — up to two c values, depending on whether the interval crosses the inflection point.
Transcendental:
• Sinef(x)=sinx — multiple c values on a long enough interval. Defaults to [0,2π].
• Cosinef(x)=cosx — similar; defaults to [0,π].
• Exponentialf(x)=ex — exactly one c. Because f′=f=ex is strictly increasing, f′(c)=m has a unique solution.
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 5
The left endpoint a and right endpoint b sliders set the interval. As you drag either:
• The dashed vertical lines at a and b follow.
• The dark markers at (a,f(a)) and (b,f(b)) snap to the new endpoints.
• The secant line rotates to match the new endpoints.
• The c finder re-runs, redrawing every interior tangent parallel to the new secant.
• The numeric cards update.
If you set a>b, the tool transparently swaps them — only the interval matters, not the order. If the interval shrinks below a tiny threshold, the tool waits until you give it a real interval to work with.
The Reset button next to Parameters returns the interval to the family's default.
Reading the Three Result Cards
The boxed card below the graph displays three quantities side by side:
• Secant slope — the value (f(b)−f(a))/(b−a), the average rate of change on [a,b]. This is the target slope every interior tangent must match.
• c values found — the count of c values in (a,b) where f′(c) equals the secant slope, with their numeric values listed below.
• f'(c) at each c — the derivative evaluated at each c. These numbers should all equal the secant slope above (modulo numerical rounding).
The MVT guarantees the count is at least one. Depending on the function and interval, you may see exactly one (parabola, exponential) or several (sine on a wide interval, cubic crossing its inflection point). The cubic on a symmetric interval [−2,2] produces two c values, mirrored around the origin.
The Per-c Detail Rows
When there is more than one c, the tool lists each in its own row below the cards. Each row shows:
• A small label tag — c, or c₁, c₂, c₃ when numbered.
• The numerical value of c.
• The value of f′(c) at that c.
• A reminder of the secant slope, for direct comparison.
The reason these rows matter: the MVT only guarantees at least one c, but the actual count depends on how oscillatory or curved the function is on the interval. A cubic on [−2,2] yields two; a sine on [0,2π] can yield two as well. Each tangent is drawn on the plot in the same light-blue color, all parallel to the secant — a family of parallel lines that visually confirms the theorem.
Display Toggles
DemoDisplay toggles and accent color
Step 0 of 5
The Display section in the left panel lets you hide individual layers:
• f(x) — toggles the function curve.
• secant — toggles the deep-blue secant line.
• tangent at c — toggles every light-blue tangent line at each c. Useful when there are several and you want to focus on just the secant.
• a, b lines — toggles the dashed vertical reference lines at the interval endpoints.
Any combination is valid. The legend below the graph updates to show only the visible layers.
The Accent color picker at the bottom recolors the highlight throughout the tool — useful for screenshots or personal preference.
The Plot, Legend and Info Panel
DemoPlot size and info panel
Step 0 of 4
The center panel is headed by the family name, with its formula in a chip beside it, for example f(x)=x2. The S, M, L and XL buttons above the plot set its size, and the readout next to them shows it in pixels: 500 × 400, 700 × 550, 900 × 850 or 1100 × 850. The page opens at 880 × 460. The curve, the secant, the tangents and the endpoint lines are redrawn at the new size; nothing else changes.
The legend under the plot names only the layers that are switched on: the curve f(x), the secant from (a,f(a)) to (b,f(b)), the tangent at c, parallel to the secant, and the lines x=a and x=b. Which layers show is set in Display Toggles.
The Applied strip at the bottom of the center panel repeats the current a and b.
The info panel on the right has two tabs:
• Explanation — the current function, a Right now line with the interval, the secant slope and every c found, a note on how c is found, and a short note on where the family leads, with a link to its section on this page.
• Concepts — the statement of the theorem, what it really says, why differentiability matters, Rolle's theorem as a special case, and what the theorem powers. The full treatment is in What Is the MVT.
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.