Numerical methods

How the simulations on this site actually work.

Almost every interactive on this site is running a numerical algorithm. The slope-field interactive in Foundations 5.1 integrates ODE trajectories with RK4. The wave/heat side-by-side panel in Foundations 6.1 discretises the wave equation with the leapfrog scheme and the heat equation with forward Euler, both subject to stability constraints. The Laplace solver in Foundations 6.6 iterates Jacobi relaxation until the residual decays. The characteristic-equation carousel in Foundations 5.2 solves a polynomial; the eigenvector finder in 4.4 runs power iteration.

This chapter explains the algorithms. Each lesson covers one technique that appears repeatedly across the bookshelf, develops it from first principles, and ends with the kind of stability and convergence analysis that makes the difference between a simulation that works and one that diverges or grinds for hours.

The chapter is built as six self-contained lessons:

The aim of the chapter is that you can re-implement any interactive on the site yourself. By the end, “where the numbers come from” should no longer be a black box.