Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Average Rate of Change


Local view · f(x) = ⅓x³ − x

f'(x) = x² − 1  ·  max at x = −1  ·  min at x = 1
Step
Drag P1 or P2, or pick a scenario to watch it unfold.
P1 x =-1.40
P2 x =-0.40
slope =-0.11
f(x)secantΔx, Δy







Key Terms

Average rate of change — the slope of the line through two points on a function's graph, measuring how much the output changes per unit of input across an interval.

Secant line — the straight line that passes through two distinct points on a curve. Its slope equals the average rate of change between those points.

Δx\Delta x — the change in the input, computed as x2x1x_2 - x_1.

Δy\Delta y — the change in the output, computed as f(x2)f(x1)f(x_2) - f(x_1).

Derivative — the instantaneous rate of change at a single point, defined as the limit of the average rate of change as Δx0\Delta x \to 0.

Local maximum / minimum — an interior point where the function reaches a peak or valley relative to nearby values.

Getting Started with the Visualizer

    The visualizer shows the cubic function f(x)=13x3xf(x) = \frac{1}{3}x^3 - x together with two sample points labeled P1P_1 and P2P_2. The straight line connecting them is the secant line, and its slope is the average rate of change between the two points.

    The interface is split into two parts. The left panel holds the graph, four scenario buttons, and a row of numeric readouts. The right panel is a tabbed sidebar with three views: Computation, Meaning, and Theory.

    There are two ways to drive the tool:

  • Drag P1P_1 or P2P_2 along the curve to place them anywhere you like. The slope, Δx\Delta x, and Δy\Delta y all update in real time.
  • Pick a scenario to play a guided animation that moves the points into a textbook configuration and walks through every measurement step by step.

  • Use dragging to explore freely; use scenarios to learn what each configuration is telling you.

Choosing Among the Four Scenarios

    Four buttons sit below the graph, each tied to a color theme and a short narrated animation.

  • Ascending (blue) — places both points on the left wing where the curve is climbing. The secant slope comes out positive.
  • Descending (red) — places the points on either side of the middle interval where the curve is falling. The slope is negative.
  • Local max (amber) — straddles the peak at x=1x = -1. The animation continues with two extra tighten steps that bring the points together symmetrically, shrinking the slope toward zero.
  • Local min (teal) — does the same around the valley at x=1x = 1, with the slope approaching zero from the other side.

  • Click Reset to clear the scenario and return P1P_1 and P2P_2 to their default positions for free dragging. While an animation is running, dragging is temporarily disabled so the scripted sequence can play out without interference.

Ascending: a Positive Average Rate

The Ascending scenario puts P1P_1 at x=2.05x = -2.05 and P2P_2 at x=1.35x = -1.35, both on the left wing where the cubic is climbing. The two coordinates are f(2.05)=0.8217f(-2.05) = -0.8217 and f(1.35)=0.5299f(-1.35) = 0.5299, so

ext{slope} = rac{0.5299 - (-0.8217)}{-1.35 - (-2.05)} = rac{1.3516}{0.70} = 1.93

A positive average rate, and the chevrons along the shaded band all point uphill to confirm it.
-2-112-110xyΔxΔym = 1.93P₁P₂
Ascending, frozen at the end of the run

Both points on the rising left wing, Δx = 0.70 and Δy = 1.35, so the secant slope is +1.93. Every chevron in the shaded band points the same way the secant does.

The number 1.931.93 is not the derivative at any particular point — it is the *average* over the whole interval. Compare it with the two endpoint derivatives, f(2.05)=3.20f'(-2.05) = 3.20 and f(1.35)=0.82f'(-1.35) = 0.82: the average sits between them, as the mean value theorem promises it must.

That is the honest reading of any secant slope. It reports the net change per unit of xx across the interval and says nothing about what happened inside. Shrink the interval and the average converges on a single instantaneous rate, which is the move traced in from secant slope to derivative.

Descending: a Negative Average Rate

The Descending scenario straddles the middle interval symmetrically, P1P_1 at x=0.55x = -0.55 and P2P_2 at x=0.55x = 0.55. Because ff is an odd function the two heights are exact opposites, f(0.55)=0.4945f(-0.55) = 0.4945 and f(0.55)=0.4945f(0.55) = -0.4945, so

ext{slope} = rac{-0.4945 - 0.4945}{1.10} = rac{-0.9891}{1.10} = -0.90

The chevrons run downhill through the whole band, matching the sign.
-2-112-110xyΔxΔym = -0.90P₁P₂
Descending, frozen at the end of the run

A symmetric interval about the origin: Δy = -0.99 over Δx = 1.10 gives -0.90. The band covers (-1, 1), where the derivative is negative at every single point.

On (1,1)(-1, 1) the derivative f(x)=x21f'(x) = x^2 - 1 is negative everywhere, so every secant drawn inside that interval comes out negative too. There is no way to pick two points in this band and get a rising average.

This scenario also gives the cleanest view of the symmetric case: over [a,a][-a, a] the average rate is exactly rac{a^2}{3} - 1. At a=0.55a = 0.55 that is 0.90-0.90, the value on screen; as aa shrinks the reading climbs toward 1-1, which is f(0)f'(0).

Closing In on the Local Maximum

    The Local max scenario starts wide, with P1P_1 at 1.45-1.45 and P2P_2 at 0.55-0.55 straddling the peak at x=1x = -1, then plays two extra tighten steps that pull the points inward symmetrically. The slope readout collapses as it goes:

  • [1.45,0.55][-1.45, -0.55] — slope 0.06750.0675
  • [1.25,0.75][-1.25, -0.75] — slope 0.02080.0208
  • [1.08,0.92][-1.08, -0.92] — slope 0.00210.0021

  • The frozen picture below is the last of the three, where the two points sit almost on top of each other and the secant has flattened to nearly horizontal.
-2-112-110xylocal max f′ = 0ΔxΔym = 0.00P₁P₂
Local max, frozen after both tighten steps

The final pair, [-1.08, -0.92]. The points have closed to within 0.16 of each other and the secant has flattened to m = 0.00 - the limit being f′(-1) = 0.

Each tightening cuts the slope by roughly a factor of ten, and the limit is f(1)=0f'(-1) = 0. That is the derivative being constructed in front of you: not defined at a point out of nowhere, but reached as the limit of averages over ever-shorter intervals.

The chevrons explain why the slope has to vanish. They point uphill to the left of 1-1 and downhill to the right, so a symmetric interval collects a rise and a matching fall that very nearly cancel. What is left over is second-order small, which is why the numbers fall so much faster than the interval width does.

Closing In on the Local Minimum

The Local min scenario is the same procedure around the valley at x=1x = 1: start at [0.55,1.45][0.55, 1.45], then tighten to [0.75,1.25][0.75, 1.25] and [0.92,1.08][0.92, 1.08].

Because ff is odd and the intervals are mirror images, the slopes are identical to the maximum case — 0.06750.0675, then 0.02080.0208, then 0.00210.0021 — heading for f(1)=0f'(1) = 0.
-2-112-110xylocal min f′ = 0ΔxΔym = 0.00P₁P₂
Local min, frozen after both tighten steps

The mirror image at [0.92, 1.08], with the same flattened secant. The chevrons reverse: down on the approach, up on the way out.

The chevrons are the part that differs. Here they point downhill on the approach and uphill on the way out, so the sign change runs negative → positive. That ordering is the whole difference between a valley and a peak; the vanishing slope on its own cannot tell them apart, as Fermat's theorem makes precise.

Both extrema also demonstrate the limitation of a single secant reading. A slope of 0.00210.0021 would look like "barely rising" if you did not know where the points were, when in fact the curve falls and then rises across the interval. Average rates hide everything that happens between their endpoints.

Reading the Computation Tab

    The Computation tab breaks the slope calculation into three highlighted sections that light up as the animation reaches them.

  • The two points — shows the coordinates (x1,f(x1))(x_1, f(x_1)) and (x2,f(x2))(x_2, f(x_2)) for the current positions of P1P_1 and P2P_2.
  • Step 1 — horizontal and vertical change — computes Δx=x2x1\Delta x = x_2 - x_1 and Δy=f(x2)f(x1)\Delta y = f(x_2) - f(x_1) with the actual numbers substituted in.
  • Step 2 — average rate of change — divides Δy\Delta y by Δx\Delta x to produce the secant slope m=Δy/Δxm = \Delta y / \Delta x.

  • Each formula box dims while its quantity has not yet been revealed in the animation, so the panel mirrors the geometry on the canvas. Drag the points freely and all three blocks recalculate continuously, giving a live numeric companion to the visual.

Reading the Meaning and Theory Tabs

    The Meaning tab opens automatically once an animation finishes. It shows a colored verdict card that names the configuration — ascending, descending, local maximum, or local minimum — and explains what the sign of the slope says about the function on that interval. A second card underneath gives the deeper reason: why the sign tells you about monotonicity, or why a zero slope at a peak is necessary but not sufficient on its own.

    The Theory tab is always available and holds four reference blocks:

  • Definition — the formal limit definition of the derivative.
  • Sign and monotonicity — the connection between the sign of ff' and whether the function is increasing or decreasing.
  • Fermat's theorem — why smooth local extrema force f(c)=0f'(c) = 0.
  • On this function — what each of these statements looks like for the specific cubic shown.

  • Use Meaning for interpretation of the current scenario; use Theory for the underlying rules that apply to any differentiable function.

Tips for Exploring the Curve

    A few patterns are worth trying once you have the controls in hand.

  • Sweep through the interval — keep P1P_1 at a fixed position and slide P2P_2 across the curve. Watch the slope readout flip sign as P2P_2 crosses the local max and local min.
  • Shrink the interval manually — place P1P_1 and P2P_2 very close to each other near x=1x = -1. The slope approaches zero, mirroring what the tighten animation does automatically.
  • Compare equal intervals — put both points on the left wing, then on the right wing. Both readings are positive, but the magnitudes differ because the curve steepens away from the origin.
  • Cross the inflection — straddle x=0x = 0 symmetrically. Over [a,a][-a, a] the average rate works out to rac{a^2}{3} - 1, so it is always negative and climbs toward 1-1 as the interval shrinks. The Descending scenario uses a=0.55a = 0.55 and reads 0.90-0.90.

  • The bottom-of-graph readouts and the formulas in the Computation tab stay synchronized, so any drag is immediately reflected in the arithmetic.
-2-112-110xyΔxΔym = -0.11P₁P₂
Free drag, frozen at the default pair

No scenario running: P1 at x = -1.40 and P2 at x = -0.40, the positions Reset returns to. The secant reads m = -0.11 - very slightly falling, because the interval straddles the peak unevenly.


What is the Average Rate of Change?

The average rate of change of a function ff over an interval [x1,x2][x_1, x_2] is the slope of the secant line joining the points (x1,f(x1))(x_1, f(x_1)) and (x2,f(x2))(x_2, f(x_2)). It measures, on average, how many units the output gains or loses for each unit gained in the input.

The formula is:

Average rate of change=f(x2)f(x1)x2x1=ΔyΔx\text{Average rate of change} = \frac{f(x_2) - f(x_1)}{x_2 - x_1} = \frac{\Delta y}{\Delta x}


Geometrically, this is rise over run — exactly the slope formula from algebra applied to two points selected on the curve. It is the discrete, interval-based counterpart of the derivative, which deals with an infinitesimal interval.

For deeper coverage of slopes, see the slope theory page, and for the move from intervals to instants, see the derivative as a limit page.

From Secant Slope to Derivative

Holding P1P_1 fixed at a point cc and sliding P2P_2 toward it makes the interval Δx\Delta x shrink. The secant line connecting the two points rotates as it shrinks, and in the limit it becomes the tangent line at cc. The slope of that tangent line is the value of the derivative f(c)f'(c).

The formal statement is the limit definition of the derivative:

f(c)=limΔx0f(c+Δx)f(c)Δxf'(c) = \lim_{\Delta x \to 0} \frac{f(c + \Delta x) - f(c)}{\Delta x}


So the derivative is the average rate of change over a vanishing interval — an instantaneous rate. The Local max and Local min scenarios visualize this collapse directly: the slope readout falls toward zero as the two points squeeze together around the extremum.

For the full treatment see the derivative theory page and the limit definition page.

Sign of the Derivative and Monotonicity

    On any interval where ff is differentiable, the sign of ff' controls whether ff is increasing or decreasing.

  • f(x)>0f'(x) > 0 for every xx in the interval, then ff is strictly increasing there.
  • f(x)<0f'(x) < 0 for every xx in the interval, then ff is strictly decreasing there.

  • For the cubic in the visualizer, f(x)=x21f'(x) = x^2 - 1. This is positive when x>1|x| > 1 and negative when x<1|x| < 1, which is exactly what the Ascending and Descending scenarios are showcasing: the left and right wings climb, and the middle section falls.

    This connection is the practical engine of curve sketching — the sign chart of ff' tells you the monotonicity intervals of ff. For the rigorous statement and proof, see the monotonicity theorem page.

Local Extrema and Fermat's Theorem

Fermat's theorem states that if ff has a local maximum or local minimum at an interior point cc and f(c)f'(c) exists, then f(c)=0f'(c) = 0. Points where the derivative is zero or undefined are called critical points.

The intuition matches what the Local max and Local min scenarios animate: just before a peak the function is rising, just after it the function is falling, and a continuous slope must pass through zero in between. The same argument with the signs reversed applies to a valley.

A zero derivative on its own does not guarantee an extremum — it only certifies a horizontal tangent. To confirm a maximum or minimum, check that ff' actually changes sign at cc (the first derivative test) or that f(c)f''(c) has the right sign (the second derivative test).

For deeper coverage, see the critical points page and the extrema classification page.