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

Calculus

The derivative

ladderAICalculuswritten with an agent#925c7a70d7

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.

Error of three derivative estimates of ex at x=1
forward: slope 1centered: slope 2extrapolated: slope 4
10⁻⁹10⁻⁶10⁻³10⁰0.020.050.10.2h|error|
  1. 1The slope of a secant+2 functions · +2 tests
  2. 2A secant centered on the point+1 function · +2 tests
  3. 3Combining two centered slopes to cancel the h^2 term+1 function · +1 test
  4. 4On a function where nothing is exact+3 tests
✓ 8 tests passon 4 rungs, each rerunning every earlier test · checked when the site was built#calculus#numerics#ladder

Look inside this program

  • Atlas

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

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