4.2.18 · D2Calculus II — Integration

Visual walkthrough — Average value of a function

2,065 words9 min readBack to topic

This page unpacks the parent topic slowly and visually.


The one thing we already trust

That is the whole seed. Everything below is the struggle to apply this to a function, which has infinitely many values and therefore no "" to divide by. We will manufacture an , then let it run to infinity.


Step 1 — Meet the enemy: infinitely many heights

WHAT. We have a curve living above an interval from (left edge) to (right edge). We want a single number: the "typical height" of that curve.

WHY. You cannot type into the average formula, because the formula needs a finite list . A curve gives you a height at every point — that is an uncountable ocean of numbers, not a list. So the first honest thing to admit is: we don't yet know how to average this.

PICTURE. Look at how many vertical measuring sticks you could draw. Between any two you can always squeeze another. There is no "last" one to divide by.

Figure — Average value of a function

Step 2 — Invent an : sample the curve at evenly spaced points

WHAT. Chop into equal slots. Each slot has width Here (read "delta-x") means ==one small step in ==; the is the Greek letter D, standing for "difference" or "gap." Inside each slot pick a sample point and read off the heights .

Term by term in :

  • — the total width of the interval (right edge minus left edge, always positive since ).
  • how many slots we chose. Bigger = finer sampling.
  • — the resulting width of one slot.

WHY. Now we have exactly numbers, a genuine finite list. The average machine from the top of the page will accept these.

PICTURE. Watch the continuous curve get replaced by a comb of vertical sticks of heights .

Figure — Average value of a function

This sampling idea is exactly the setup behind Riemann Sums — keep it in mind.


Step 3 — Average the samples (the honest, ordinary average)

WHAT. Feed the heights into the trusted formula:

The new symbol (a big Greek S, "sigma") is shorthand for "add up": let the counter march from to and total everything you land on. So literally is — nothing new, just compact.

Term by term:

  • — the pile: all sampled heights added together.
  • — the share-out: split the pile equally among slots.
  • — the resulting average height of our -sample approximation.

WHY. This is a value we completely believe — it is just "add up, divide by how many." The whole trick from here is algebra, not new maths.

PICTURE. The comb of sticks collapses into one flat level : the height where the tall sticks' overhang exactly refills the short sticks' shortfall.

Figure — Average value of a function

Step 4 — The key algebra: smuggle inside

WHAT. Rearrange to solve for : Now substitute that into the average of Step 3:

Watch the slide inside the sum in the last equality — this is legal because is the same constant for every term, so it can hop across the .

Term by term in the final form:

  • — divide by the total width (this survives to the end).
  • height width = the area of one thin rectangle over slot .
  • — the total area of all rectangles.

WHY. We didn't change the number — we renamed it. But now the sum reads as "add up little rectangle areas," which is the exact fingerprint of an integral about to be born.

PICTURE. Each stick from Step 2 fattens into a rectangle of area ; the sum is the shaded staircase area, and we still divide by the width .

Figure — Average value of a function

Step 5 — Let : the staircase becomes the curve

WHAT. Push the number of samples to infinity. As , the slot width , and the staircase of rectangles closes in perfectly on the smooth region under the curve. The sum turns into the definite integral:

Symbol swap, term by term:

  • the fat shrinks to the infinitesimal ("an infinitely thin slot width"),
  • the sigma morphs into the stretched-S integral sign ("continuous sum"),
  • and move onto the integral as its lower/upper limits.

This is the Definite Integral as Area: the exact area under between and .

WHY. Sampling was a lie we told to get a finite . The limit undoes the lie: infinitely many samples = the true continuous average, with no approximation left over.

PICTURE. The jagged staircase smooths into the exact curved region.

Figure — Average value of a function

Putting the limit into Step 4's expression:

  • — the total area (the fully-grown pile).
  • share it across the width.
  • — the flat height that holds that same area.

To evaluate that integral in practice you use the Fundamental Theorem of Calculus.


Step 6 — The geometric payoff: the equal-area rectangle

WHAT. The number is the height of a rectangle sitting on base whose area equals the area under the curve.

WHY. Rearranging gave — the rectangle formula. So is defined to make the areas match.

PICTURE. The parts of the curve poking above the flat line have exactly the same area as the gaps below it. Water sloshing in a tub settling to one level.

Figure — Average value of a function

Step 7 — Edge & degenerate cases (never leave a gap)

WHAT / WHY / PICTURE, one panel each:

(a) A negative dip. If goes below the -axis, those slots contribute negative area (, so ). The average can be negative or zero. Nothing breaks — the formula already signs each rectangle correctly.

(b) A constant function . Every sample is , so the average of is just . Check: . ✓ The equal-area rectangle is the graph.

(c) A straight line . By symmetry the overhang above the midpoint height exactly refills the shortfall, so — the midpoint value. This is the only family where "average the two endpoints" is legal.

(d) Zero-width interval . Then and we would divide by zero — undefined. Sensibly so: averaging "over no interval at all" asks for the typical value of an empty range, which has no meaning.

Figure — Average value of a function

Step 8 — Why a value with must exist

WHAT. If is continuous on , there is at least one point where the curve actually touches the flat average line: . (This is the Mean Value Theorem for Integrals.)

WHY. A continuous on a closed interval has a lowest value and a highest value . Averaging can never escape that band, so . Since is continuous, the Intermediate Value Theorem says it hits every height between and — including . So somewhere the curve crosses its own average line.

PICTURE. The average line is trapped between the min and max; a continuous curve sweeping from up to must slice through it.

Figure — Average value of a function

This is the integral-world cousin of the Mean Value Theorem (Derivatives); both promise a special interior point.


Worked check on the walkthrough


The one-picture summary

Figure — Average value of a function

Left panel: a comb of samples we can honestly average. Middle: fatten to rectangles (total area ÷ width). Right: smooths into the equal-area rectangle — height . One story, three frames.

Recall Feynman retelling — explain the whole derivation to a friend

"I want the typical height of a wiggly curve. I can't average infinitely many heights, so I cheat: I pick evenly-spaced heights and average those the ordinary way — add them, divide by . Then I notice equals , so I rewrite the average as (total of little height-times-width rectangles) divided by the total width. Those rectangles are exactly a Riemann sum, and if I take to infinity the rectangles fill in perfectly and become the area under the curve — an integral. So the average is area under the curve, divided by the width of the interval: . Geometrically it's the height of the rectangle with the same area as the curve — the bumps above the line fill the dips below. And because a continuous curve can't skip values, it must actually touch that average height somewhere."

Recall Which single algebra move made the integral appear?

Replacing with (Step 4) ::: it slid a inside the sum, turning the ordinary average into — a Riemann sum ready to become .

Recall Why is the case

excluded? Because forces division by zero ::: averaging "over no interval" has no meaning.


Connections