Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Mean Value Theorem Visualizer

How to use
  1. Pick a function in the Function menu at the top; all six are smooth, so the theorem applies. Learn more about the functions
  2. Move the left end aa and right end bb; the navy secant joins (a,f(a))(a, f(a)) and (b,f(b))(b, f(b)). Learn more about the sliders
  3. The label gives the secant slope; the explanation works it out and counts the points cc. Learn more about the secant slope
  4. Every cc with f′(c)f'(c) equal to the secant slope is an amber dot with a tangent parallel to the secant. Learn more about the points c
  5. The switch hides the secant and tangents; the Concepts tab explains the theorem in general. Learn more about the Concepts tab


Mean Value Theorem
f(x)f(x)
a=−1a = -1b=2b = 2secant slope=3\text{secant slope} = 3
Mean Value Theorem · Cubic
f′(c)=f(b)−f(a)b−a\displaystyle f'(c) = \frac{f(b) - f(a)}{b - a}
General

If ff is continuous on [a,b][a, b] and differentiable on (a,b)(a, b), there is at least one cc between aa and bb where the tangent (amber) is parallel to the secant (navy).

For this function

Function · f(x)=x3f(x) = x^3, f′(x)=3x2f'(x) = 3x^2

With a=−2a = -2, b=2b = 2 there are two points c=±23≈±1.155c = \pm\frac{2}{\sqrt{3}} \approx \pm 1.155.

Secant slope · f(b)−f(a)b−a=8−(−1)2−(−1)=3\dfrac{f(b) - f(a)}{b - a} = \dfrac{ 8 - (-1) }{ 2 - (-1) } = 3

One point cc has f′(c)=3f'(c) = 3: the amber tangent there runs parallel to the secant.

a=−1a = -1
b=2b = 2
Speed




Key Terms



Key Terms

Mean Value Theorem (MVT) — if ff is continuous on [a,b][a, b] and differentiable on (a,b)(a, b), then there exists at least one c∈(a,b)c \in (a, b) where f′(c)=(f(b)−f(a))/(b−a)f'(c) = (f(b) - f(a)) / (b - a).

Secant line — the straight line through the two interval endpoints (a,f(a))(a, f(a)) and (b,f(b))(b, f(b)). Its slope is the average rate of change of ff on [a,b][a, b].

Tangent line at c — the straight line touching the curve at (c,f(c))(c, f(c)) with slope f′(c)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)(f(b) - f(a)) / (b - a), the change in output divided by the change in input on the interval.

Instantaneous rate of change — f′(c)f'(c), the rate of change at a single point.

Rolle's theorem — the special case of the MVT when f(a)=f(b)f(a) = f(b). The secant is horizontal, so the MVT promises an interior cc with f′(c)=0f'(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 aa and bb, and the secant in navy through (a,f(a))(a, f(a)) and (b,f(b))(b, f(b)). Every point cc 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)=x3f(x) = x^3 on [−1,2][-1, 2]: the secant slope is 33, and one point cc has f′(c)=3f'(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 cc works.
• Quadratic — cc is always the midpoint a+b2\frac{a + b}{2}.
• Cubic — on [−2,2][-2, 2] there are two points, c=±23≈±1.155c = \pm\frac{2}{\sqrt{3}} \approx \pm 1.155.
• Sine and Cosine — over a wide interval several points appear; cosine on [−3,3][-3, 3] shows Rolle's theorem.
• Exponential — always exactly one point, c=ln⁡eb−eab−ac = \ln\frac{e^b - e^a}{b - a}.

Identity: Every Point Is a c

f(x)=xf(x) = x on [−2,2][-2, 2]. The endpoints are (−2,−2)(-2, -2) and (2,2)(2, 2), so the secant slope is

m=2−(−2)2−(−2)=1m = \frac{2 - (-2)}{2 - (-2)} = 1

and f′(x)=1f'(x) = 1 everywhere. The theorem asks for a point where f′(c)=mf'(c) = m, and here every point in the interval qualifies.
-5 -4 -3 -2 -1 1 2 3 4 5 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 x y f(x) = x y = f(a) + 1·(x − a) y = f(c) + 1·(x − c) y = f(c) + 1·(x − c) y = f(c) + 1·(x − c) y = f(c) + 1·(x − c)
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 cc, 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)=x2f(x) = x^2 on [−2,2][-2, 2]. Because the parabola is symmetric about the origin, the two endpoint heights are equal — f(−2)=f(2)=4f(-2) = f(2) = 4 — so the secant is horizontal:

m=4−42−(−2)=0m = \frac{4 - 4}{2 - (-2)} = 0

Solving f′(c)=2c=0f'(c) = 2c = 0 gives the single solution c=0c = 0.
-4 -2 2 4 -4 -2 2 4 6 8 10 12 14 16 18 20 22 24 x y f(x) = x² y = f(a) + 0·(x − a) y = f(c) + 0·(x − c)
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)f(a) = f(b) and the conclusion becomes f′(c)=0f'(c) = 0. This family is the MVT and Rolle's theorem being the same statement.

The location of cc is not a coincidence either. For any interval [a,b][a, b] on a parabola, the mean value point is the midpoint a+b2\frac{a+b}{2} — a property of quadratics specifically, not something the theorem promises in general. Drag the endpoints and watch cc track the middle.

Cubic: Two Solutions at Once

f(x)=x3f(x) = x^3 on [−2,2][-2, 2] runs from −8-8 to 88, so

m=8−(−8)4=4m = \frac{8 - (-8)}{4} = 4

Solving f′(c)=3c2=4f'(c) = 3c^2 = 4 gives c=±23≈±1.1547c = \pm\frac{2}{\sqrt{3}} \approx \pm 1.1547 — two solutions, both inside the interval, and the tool draws a tangent at each.
-5 5 -25 -20 -15 -10 -5 5 10 15 20 25 x y f(x) = x³ y = f(a) + 4·(x − a) y = f(c) + 4·(x − c) y = f(c) + 4·(x − c)
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)f(x) = \sin(x) on [0,2π][0, 2\pi] starts and ends at zero, so the secant is horizontal again:

m=0−02π=0m = \frac{0 - 0}{2\pi} = 0

Solving cos⁡(c)=0\cos(c) = 0 on (0,2π)(0, 2\pi) gives c=π2≈1.5708c = \frac{\pi}{2} \approx 1.5708 and c=3π2≈4.7124c = \frac{3\pi}{2} \approx 4.7124 — the peak and the trough.
-5 -4 -3 -2 -1 1 2 3 4 5 -1 1 x y f(x) = sin(x) y = f(a) + 0·(x − a) y = f(c) + 0·(x − c) y = f(c) + 0·(x − c)
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-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)f(x) = \cos(x) on [0,π][0, \pi] falls from 11 to −1-1, so this time the secant genuinely slopes:

m=−1−1π=−2π≈−0.6366m = \frac{-1 - 1}{\pi} = -\frac{2}{\pi} \approx -0.6366

Solving −sin⁡(c)=−2π-\sin(c) = -\frac{2}{\pi} gives two solutions, c≈0.6901c \approx 0.6901 and c≈2.4515c \approx 2.4515, placed symmetrically about π2\frac{\pi}{2}.
-5 -4 -3 -2 -1 1 2 3 4 5 -1 1 x y f(x) = cos(x) y = f(a) + -0.637·(x − a) y = f(c) + -0.637·(x − c) y = f(c) + -0.637·(x − c)
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-0.64.

The symmetry of the two solutions about the midpoint reflects the symmetry of sin⁡\sin about π2\frac{\pi}{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)=exf(x) = e^x on [0,1][0, 1] climbs from 11 to ee, so

m=e−11≈1.7183m = \frac{e - 1}{1} \approx 1.7183

Since f′=ff' = f, solving ec=e−1e^c = e - 1 gives c=ln⁡(e−1)≈0.5413c = \ln(e - 1) \approx 0.5413 — a single solution, slightly right of the midpoint.
-4 -2 2 4 -4 -2 2 4 6 8 10 12 14 16 18 20 22 24 x y f(x) = eˣ y = f(a) + 1.718·(x − a) y = f(c) + 1.718·(x − c)
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 exe^x 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)\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 end aa and right end bb set the interval, each from −5-5 to 55. As you move them, the secant turns, its slope changes, and the points cc appear, move and disappear: the tool finds every one between aa and bb at each move.

Set aa and bb 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, f(b)−f(a)b−a\dfrac{f(b) - f(a)}{b - a}, the average rate of change over [a,b][a, b].

The explanation writes the same fraction with the actual numbers, and then says how many points cc in the interval have f′(c)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 cc 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)=f(b)−f(a)b−af'(c) = \dfrac{f(b) - f(a)}{b - a}.

The points are found without solving an equation: the interval is cut into 400 pieces and each piece where f′(x)f'(x) minus the secant slope changes sign holds one. When f(a)=f(b)f(a) = f(b), the secant is level and the explanation names Rolle's theorem: the tangent at each cc 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 cc 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 ff is continuous on [a,b][a, b] and differentiable on (a,b)(a, b), then there exists at least one point cc in (a,b)(a, b) such that

f′(c)=f(b)−f(a)b−a.f'(c) = \frac{f(b) - f(a)}{b - a}.


The right side is the slope of the secant line from (a,f(a))(a, f(a)) to (b,f(b))(b, f(b)). The left side is the slope of the curve at cc. The theorem says these two slopes match at some interior point — equivalently, the tangent at cc 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 100100 kilometers in exactly one hour. Your average speed is 100100 km/h. The MVT says that at some instant during the trip, your speedometer read exactly 100100 km/h. You cannot average 100100 km/h without hitting 100100 km/h at some moment.

Mapping back: position is ff, time is xx, the interval is [a,b]=[start,end][a, b] = [\text{start}, \text{end}], average speed is the secant slope, and instantaneous speed is f′(c)f'(c). The MVT guarantees there is a cc 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 ff is continuous on [a,b][a, b], differentiable on (a,b)(a, b), and f(a)=f(b)f(a) = f(b), then there exists c∈(a,b)c \in (a, b) with f′(c)=0f'(c) = 0.

The secant slope is zero whenever f(a)=f(b)f(a) = f(b), so the MVT immediately gives f′(c)=0f'(c) = 0 — a horizontal tangent somewhere inside. To see this in the tool, pick the Quadratic family and set a=−1a = -1, b=1b = 1. Both endpoints give f=1f = 1, the secant is horizontal, and the tangent at c=0c = 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.