Skip to content
AI360Xpert
Beta

Single-Variable Calculus

Calculus for functions with one input: limits describe approach, derivatives measure slope, integrals total accumulation, and one theorem ties them back.

The curve y equals x squared from 0 to 2 with a tangent of slope 4 at x equals 2 and the shaded area 8 thirds beneath it: the tangent shows the derivative and the shading shows the integral of one curve
The curve y equals x squared from 0 to 2 with a tangent of slope 4 at x equals 2 and the shaded area 8 thirds beneath it: the tangent shows the derivative and the shading shows the integral of one curve

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 f(x)f(x) turns each input number xx into one output f(x)f(x). The curve y=x2y = x^2 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. lim⁡x→af(x)=L\lim_{x \to a} f(x) = L means f(x)f(x) gets arbitrarily close to LL as xx nears aa. Limits define the other two ideas and handle the 0/0 standoffs algebra cannot.

Derivatives measure slope. f′(x)f'(x) is the slope of the tangent at xx: rise over run in the limit of tiny runs. For f(x)=x2f(x) = x^2, the derivative is f′(x)=2xf'(x) = 2x, so at x=2x = 2 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. ∫abf(x) dx\int_a^b f(x)\,dx is the signed area under the curve from aa to bb. For f(x)=x2f(x) = x^2 from 0 to 2: antiderivative x3/3x^3/3, evaluate 8/3−0=8/3≈2.6678/3 - 0 = 8/3 \approx 2.667. That subtraction shortcut is the fundamental theorem: integration undoes differentiation.

Worked example

One curve, all three readings, at f(x)=x2f(x) = x^2:

  • Limit: lim⁡x→2x2=4\lim_{x \to 2} x^2 = 4. Approaching 2 from either side lands outputs near 4.
  • Derivative: f′(x)=2xf'(x) = 2x, so f′(2)=4f'(2) = 4. The tangent at (2,4)(2, 4) rises 4 per step.
  • Integral: ∫02x2 dx=8/3≈2.667\int_0^2 x^2\,dx = 8/3 \approx 2.667 square units beneath the curve.

Notice the rhyme: differentiating x3/3x^3/3 gives x2x^2, and integrating 2x2x gives x2x^2. 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 ddxxx\frac{d}{dx} x^x 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: ∣x∣|x| 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 x2x^2: limit at 2 is 4, slope at 2 is 4, area from 0 to 2 is 8/38/3.
  • 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.