Single-Variable Calculus
Calculus for functions with one input: limits describe approach, derivatives measure slope, integrals total accumulation, and one theorem ties them back.
Why Does This Exist?
Optimization, the engine of ML, is single-variable calculus writ large. A gradient is a bundle of single-variable slopes, a line search minimizes along one direction, and learning curves plot one loss against one step count. Readers who can read a slope and an area on one curve already own the mental motions that multivariable machinery repeats thousands of times per update.
Derivatives and partial derivatives teaches slopes in depth, and integration and area teaches accumulation. This page is the map: the three ideas, their order, and the thread connecting them.
The one idea you need first
A function turns each input number into one output . The curve sends 2 to 4 and 3 to 9. Everything here asks three questions about such curves: what value is approached, how steep is it here, and how much area sits beneath it.
Think of It Like This
A road trip with one dashboard
Drive a straight highway and watch three dials. The speed limit sign ahead is the limit: the value your speed approaches whether or not you ever match it. The speedometer is the derivative: your rate right now, the slope of your odometer. The odometer is the integral: total distance accumulated from all those speeds.
One road, three readings, and they interlock: the speedometer is the slope of the odometer's climb, and the odometer totals the speedometer. Limits, derivatives, and integrals relate exactly the same way on any single-variable curve.
How It Actually Works
Limits describe approach. means gets arbitrarily close to as nears . Limits define the other two ideas and handle the 0/0 standoffs algebra cannot.
Derivatives measure slope. is the slope of the tangent at : rise over run in the limit of tiny runs. For , the derivative is , so at the curve climbs 4 units per unit step. Positive means rising, zero marks flat candidates for peaks and valleys, negative means falling.
Integrals total accumulation. is the signed area under the curve from to . For from 0 to 2: antiderivative , evaluate . That subtraction shortcut is the fundamental theorem: integration undoes differentiation.
Worked example
One curve, all three readings, at :
- Limit: . Approaching 2 from either side lands outputs near 4.
- Derivative: , so . The tangent at rises 4 per step.
- Integral: square units beneath the curve.
Notice the rhyme: differentiating gives , and integrating gives . Each operation reverses the other up to a constant, which is the whole plot of the subject.
Watch Out For
Treating this overview as the full subject
The symptom is confidence without computation: nodding at "derivative as slope" but freezing when or a 0/0 limit appears. Each idea here has its own page with worked numbers for exactly that reason. Use this map to navigate, then study limits and continuity, the derivative rules, and the integral pages where the real practice lives.
Assuming differentiable means smooth everywhere, and vice versa
Continuity does not imply differentiability: is continuous at 0 but has a corner with no single slope, which is why ReLU needs a subgradient convention there. And differentiability implies continuity, so a jump means no derivative exists at that point. The symptom is NaN gradients blamed on the optimizer when the activation's kink is the true source. Check corners and jumps first.
The Quick Version
- Limits describe approach, derivatives measure slope, integrals total area.
- For : limit at 2 is 4, slope at 2 is 4, area from 0 to 2 is .
- Differentiation and integration undo each other up to a constant.
- Zero derivative marks flat candidates, not confirmed peaks or valleys.
- Corners break differentiability without breaking continuity, as ReLU shows.
- Gradients and line searches replay these single-variable motions at scale.