This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · posts/the-derivative-one-rung-at-a-time

Building the derivative from its definition

The slope of a secant, then a secant centered on the point, then two of those combined: three estimates of the derivative of , each with an error the algebra predicts exactly, and the tests check the algebra. The last rung tries the same three on , where nothing is exact and the orders show up as ratios: halve and the three errors fall by factors of 2, 4 and 16.

A ladder is one program built in steps called rungs. Each rung adds a definition and a test; the program at any rung is everything up to it, and every earlier rung's tests run again. The derivative is a good thing to build this way because each improvement is a few lines, and each has an error you can work out by hand before running anything.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 19–154