The slope at one point. The area up to it. Same hand on the same dial.
A curve, a point you can drag along it, and two readings of the same gesture. Above, the tangent line — the derivative — turns with the slope. Below, the signed area sweeps in from the left and builds the integral as a second curve. Move the point and watch them update together: the height of the bottom curve is the area on top; the slope of the bottom curve is the height on top. That is the fundamental theorem of calculus, in your wrist.
What you are looking at
§ 09 · Readingf′(x) = 0. The top curve has a hill, a valley, or an inflection at exactly those places.x₀ to x is the signed area between the curve and the axis — areas above count positive, below count negative. Drag past a zero of f and you'll see the area stop growing and start shrinking.How the simulation behaves
§ 09 · Method
The curve is sampled at a few hundred points across the visible window.
The tangent at the bead uses a central difference,
f′(x) ≈ (f(x+h) − f(x−h)) / (2h), with h tuned to
the window size. The integral F(x) is a running trapezoidal
sum from x₀ outward — the same method a working numericist
would reach for first.
Custom expressions are parsed by a small shunting-yard tokenizer that
accepts only digits, the variable x, the operators
+ − × ÷ ^, parentheses, the constants pi and
e, and a fixed list of functions — sin,
cos, tan, exp, log
(natural), sqrt, abs. Anything else is rejected;
no eval, no Function, no surprises.
Show the math
The derivative of a function at a point is the limit of the secant slope as the two evaluation points slide together:
f′(x) = limh→0 ( f(x+h) − f(x) ) / hThe definite integral of a function over an interval is the limit of a Riemann sum — the signed area between the curve and the axis:
∫x₀x f(t) dt = limn→∞ Σ f(tk) ΔtThe fundamental theorem of calculus says these two operations are inverses. If F(x) = ∫x₀x f(t) dt, then:
F′(x) = f(x)That is what the two panels show: the height of the top curve is the slope of the bottom one, everywhere, simultaneously, while you drag.