Silicon Logic
SL · 09 · Calculus
§ 09 · Sandbox · Analysis Filed 2026.05

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.

drag the bead along the curve  ·  the tangent line follows  ·  the area under it fills in
f(x) tangent at x
x   f(x)   f′(x)  
F(x) = ∫x₀x f(t) dt
F(x)   F′(x)   x₀  0.00
Function
Custom · f(x) =
use x, +−×÷, ^, sin cos tan exp log sqrt abs, pi, e
Lower limit · x₀
0.00
Window · half-width
7.0
Bead position · x
1.20
Sweep
Display

What you are looking at

§ 09 · Reading
I
The derivative at a point is the slope of the tangent line there. Drag the bead until the tangent is flat — that is where f′(x) = 0. The top curve has a hill, a valley, or an inflection at exactly those places.
II
The integral from 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.
III
The bottom curve is F(x), the running area. Where it is steep, the top curve is high; where it levels off, the top curve crosses zero. The slope of the bottom curve is the height of the top curve.
That last sentence — once you can feel it — is the fundamental theorem. Differentiation and integration are not two separate operations; they are two ways to read the same gesture.

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) ) / h

The 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) Δt

The 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.