← Back to portfolio

Two Ends Playground

Discrete math counts things with gaps between them. Continuous math measures things with no gaps. Drag the sliders and watch one turn into the other. Made for Discrete vs Continuous Mathematics.

1 · A staircase that becomes a slide

The area under the curve y = x² from 0 to 1 is exactly 1/3. Estimate it with n rectangles: a discrete sum. Push n up and the jagged staircase turns into the smooth area: the integral.

The error shrinks like 1/(2n): double the rectangles, halve the error. That is a discrete sum walking toward a continuous integral.

2 · Coin flips that become a bell curve

Flip n fair coins and count heads. The bars are the exact chances (discrete, from counting). The orange curve is the normal bell curve (continuous). De Moivre saw in 1733 that they merge as n grows.

3 · A sum that hugs a logarithm

Add 1 + 1/2 + 1/3 + … + 1/n (discrete). Compare it with ln n + 0.5772… (continuous). The gap is almost exactly 1/(2n): the Euler–Maclaurin formula, the hinge between sums and integrals.

nsum of 1/kln n + γgap1/(2n)

Computed live in your browser. The famous constant γ = 0.5772156649… is the Euler–Mascheroni constant.