Calculus

Calculus is how a model predicts the next small step. These lessons cover derivatives and the chain rule, gradients and Hessians, linearization, and the differential equations that describe a moving system.

14 lessons, in library order. Search within calculus.

  1. Foundations / 10 min read

    Derivatives and the chain rule: predict a small change

    Understand derivatives as local rates, compare secant and tangent slopes, and multiply the correct factors through nested functions. Test a smooth curve and a corner with an interactive experiment.

  2. Foundations / 13 min read

    Partial derivatives and gradients: predict a multivariable change

    Hold one input fixed to find a partial derivative, combine the partials into a gradient, and compare a directional derivative with the actual change from a finite step.

  3. Foundations / 13 min read

    Jacobian matrices: from joint rates to robot tip velocity

    Read a Jacobian by its rows and columns, calculate a two-link arm's tip velocity, and compare a local prediction with a finite move. Includes singularities and the multivariate chain rule.

  4. Foundations / 11 min read

    Hessians: measure curvature in every direction

    Differentiate a gradient to build the Hessian, calculate directional curvature, and classify stationary points. Explore coupled quadratics, saddles, and the limits of zero eigenvalues.

  5. Foundations / 13 min read

    Taylor expansion and linearization: predict locally and check the error

    Build constant, linear, and quadratic approximations around a chosen center. Compare their errors, calculate a Taylor remainder bound, and connect the same idea to gradients, Hessians, and Jacobians.

  6. Foundations / 12 min read

    Ordinary differential equations: turn a rate law into a time course

    Solve a cooling initial-value problem, compare its exact solution with Euler steps, and separate model behavior from numerical accuracy and stability.

  7. Foundations / 12 min read

    Numerical integration: compare drift, phase, and step cost

    Advance an oscillator with forward Euler, velocity-first symplectic Euler, and classical RK4. Compare each method with the analytic solution and separate energy drift, phase error, step cost, and stability.

  8. Foundations / 12 min read

    ODE stability: equilibria, attraction, and basins

    Classify equilibria of a nonlinear rate law, use a phase line to find basins of attraction, and compare exact trajectories without confusing model stability with numerical stability.

  9. Foundations / 12 min read

    Manifolds and tangent spaces: move along a constraint

    Use the unit circle to understand local coordinates and tangent vectors. Compare straight steps, exact rotation, and normalization, then examine why averaging headings and rotations needs care.

  10. Foundations / 13 min read

    Geodesics: shortest arcs and longer routes on a circle

    Compare a shortest circle arc, a longer constant-speed geodesic, and a straight chord. Work through angle wrapping, antipodal ties, coincident endpoints, and the metric that defines distance.

  11. Foundations / 12 min read

    Lie groups and Lie algebras: connect robot poses to local motions

    Use planar robot poses to understand SE(2), its tangent space se(2), and the Lie bracket. Compare motion order, shrink a commutator loop, and reproduce the calculations in Python.

  12. Foundations / 13 min read

    Exponential and logarithm maps: turn a body twist into a pose

    Exponentiate a constant planar body twist, calculate its coupled translation, and recover a chosen logarithm. Explore straight-motion limits, half-turn branch choices, and information lost in a full turn.

  13. Foundations / 13 min read

    Trajectory time scaling: choose when a robot follows its path

    Separate a robot’s geometric path from its timing. Compare cubic and quintic profiles, derive joint speed and acceleration through the chain rule, and choose a duration that meets explicit limits.

  14. Foundations / 12 min read

    Trapezoidal velocity profiles: accelerate, cruise, and stop

    Build a rest-to-rest motion for one linear joint. Derive triangular and trapezoidal velocity profiles, calculate braking distance, and inspect exact position, velocity and acceleration within explicit limits.