Calculus I for Programmers
Calculus I with the order of explanation reversed: you write the code first and the theorem arrives to explain why it worked. Taught in Python or C++, your choice, switchable mid course.
Contents
Calculus I in full, with the order of explanation reversed: the code comes first and the theorem explains why it works. Limits through floating point, the derivative as finite differences, the rules derived by building a symbolic differentiator, the transcendental functions, implicit differentiation and related rates, L'Hopital, curve sketching, integration as a loop you already know how to write, and hand drilling throughout, because a paper exam still asks for it.
Limits, via floating point
You already know how to measure the steepness of a straight line. This section takes that measurement, applies it to a curve over an interval you keep shrinking, and watches what the answers do. They crowd around a number without ever reaching it, and then, past a certain point, they fall apart entirely because of how a computer stores a decimal. The limit is the idea that explains both halves of that: what the numbers were heading for, and why no program can ever finish the journey.
- 10 min
The difference quotient, computed
Two points on a curve, rise over run between them, and a number worth chasing.
- 9 min
Watching h shrink
Put the difference quotient in a loop, divide the step by ten each pass, and read down the column.
- 11 min
Where it falls apart: catastrophic cancellation
Run the column further and the answers get worse, then silly, then exactly zero. The machine, not the mathematics.
- 10 min
What the limit actually claims
The loop points at an answer. Here is the statement that answer is, and why it is never 'plug in zero'.
- 10 min
Continuity: where the loop refuses to settle
Three ways a function can fail to have a limit at a point, and the one condition that makes substitution legal.
- Easy
Average speed on the ramp
Coding problem · Difference quotient, Average rate of change
- Easy
Did the fee register?
Coding problem · Floating point, Rounding
- Medium
How tightly to set the dial
Coding problem · Limits, Epsilon and delta
- Medium
The car park till
Coding problem · Continuity, Step functions
- Easy
Limits, by hand
Coding problem · Limits, One-sided limits, Continuity
- Medium
Difference quotients, by hand
Coding problem · Difference quotient, Limits, Algebra
Section quiz
The derivative as finite differences
Opens once you finish Limits, via floating point, including its quiz.
Derivative rules, via a symbolic differentiator
Opens once you finish The derivative as finite differences, including its quiz.
The chain rule, and a look at autodiff
Opens once you finish Derivative rules, via a symbolic differentiator, including its quiz.
Derivatives of the other functions
Opens once you finish The chain rule, and a look at autodiff, including its quiz.
Implicit differentiation and related rates
Opens once you finish Derivatives of the other functions, including its quiz.
Optimisation as an algorithm
Opens once you finish Implicit differentiation and related rates, including its quiz.
The shape of a graph, and the theorems behind it
Opens once you finish Optimisation as an algorithm, including its quiz.
Limits at infinity, and L'Hopital's rule
Opens once you finish The shape of a graph, and the theorems behind it, including its quiz.
Linear approximation
Opens once you finish Limits at infinity, and L'Hopital's rule, including its quiz.
Riemann sums, as a for loop
Opens once you finish Linear approximation, including its quiz.
The Fundamental Theorem
Opens once you finish Riemann sums, as a for loop, including its quiz.
Antiderivatives and substitution
Opens once you finish The Fundamental Theorem, including its quiz.
Applications
Opens once you finish Antiderivatives and substitution, including its quiz.
Calculus I
Opens once every section is finished and every quiz is passed.