Continuous functions are integrable proof
Let be continuous. Then is integrable.
How to use
- Visualize the proof idea: for every we construct staircase functions and such that
- Drag the blue points and to choose the interval .
- Use the slider to choose the tolerance.
- Use the slider to choose the number of subintervals in the uniform partition .
- The blue curve is the continuous function .
- The partition is uniform with mesh size
- The applet computes The vertical bracket at has height .
- The orange staircase is (intended upper bound), defined on each open interval by
- The purple staircase is (intended lower bound), defined on each open interval by
- The filled band between them is colored green/red depending on whether the proof’s size condition is satisfied.
- The proof requires choosing so that , where comes from uniform continuity (condition (7.2)).
- In the applet, this is checked via a sufficient bound (using an estimate of for the fixed function ). Concretely, it computes a number and checks whether
- When you change , , or , the slider automatically jumps to the minimum value required for the proof condition to hold (green state).
- You can manually drag the slider below the required minimum to see what happens when the proof condition fails:
- Everything turns red (band, staircases, labels).
- A warning message appears: “⚠️ Bounds fail: or ”.
- You can visually observe the blue curve escaping the red band — the purple staircase may appear above , or the orange staircase below .
- This demonstrates why the condition is necessary: without it, the construction does not produce valid bounds.
- To restore the green (valid) state, you can:
- Increase (finer partition → smaller ),
- Increase (larger tolerance → easier condition),
- Or shrink the interval (smaller range).
- Once the display turns green, the intended implication of (7.2) is in effect: which gives on each , matching the proof idea.
- Hold Shift + scroll to zoom
- Hold Shift + drag to move
- Points shaped like <> act as sliders
Description
Reference: Lecture Notes Calculus 1 (May 22, 2022) Theorem 7.5 page 129
This applet is quite experimental and visualizes the proof that a continuous function
is Riemann integrable by constructing two staircase
functions whose integrals differ by at most .
The function is fixed in the code as const f = (x: number) => 0.5 * Math.sin(x) * x + 2.5;.
A good way to use the applet is the same order as the proof.
First fix an interval by dragging the gliders gliderA and gliderB.
Then choose an error tolerance with epsSlider.
After selecting the , the slider will auto-adjust to the minimum required value.
The student can then decrease manually to observe the failure case (red state),
or increase further to see the construction with a finer partition.
The applet computes
via const eTilde = eps / (2 * range);. The dashed bracket at
has vertical length (objects epsBracket and epsBracketLabel),
and it is colored green/red together with the construction.
Next choose (the number of subintervals) with nSlider.
The applet creates the uniform partition with , implemented
by uniformPartition(a,b,n), where dx=(b-a)/n is the mesh size, as in the proof.
const uniformPartition = (a: number, b: number, n: number) => {
const dx = (b - a) / n;
const cuts = Array.from({ length: n + 1 }, (_, k) => a + k * dx);
cuts[cuts.length - 1] = b;
return { cuts, dx };
};