Lemma
math, backwards
the hook · the trail from a speedometer

A speedometer reads. How far have you traveled?

You can’t see out the window. You only have the speedometer and a stopwatch. The speed is changing — sometimes 30, sometimes 60, sometimes 0. What’s the total distance? The intuition is to break the trip into short intervals where the speed is “almost constant,” multiply each interval’s speed by its duration, and add. That’s a Riemann sum, and the limit of those sums — as the intervals shrink — is the . Different name, same operation: change accumulated.

In the widget below, drag N (the rectangle count) and watch the orange sum approach the green exact integral. Pick the velocity function and you’ve recovered the projectile-motion story from the other direction: the integral of g·t over time is the distance you’ve fallen.

tool spec
what

abf(x)dx∫_a^b f(x) dx: the accumulated total of ff over [a,b][a, b]. Limit of Riemann sums: lim(N)Σf(xi)Δx\lim_(N → ∞) Σ f(x_i) · Δx. Geometrically, the signed area between the curve and the x-axis. The pair operation to the derivative — what differentiation undoes.

applies when

Any time you want a total from a rate. Distance from velocity, work from force, charge from current, expected value from a probability density, area from a height function. Numerically: every solver from scipy.integrate to PDE codes is a Riemann-style sum with a smarter rule.

breaks when

Discontinuities and unbounded intervals require improper integrals. Functions whose antiderivative has no closed form (e(x2)e^(−x²), sinx/x\sin x / x) must be evaluated numerically. Higher-dimensional analogs (line, surface, volume integrals, measure theory) keep the same intuition but require careful bookkeeping. And: the FTC requires the integrand to be continuous on the interval; sharper versions ease this, but the one-sentence theorem doesn’t apply to every function you can write down.

Widget — Riemann sum
Riemann sum (S_N)19.6000
exact integral19.6000
error0.0000
012∫₀² g·t dt = 2g
function
rule
The orange rectangles are the Riemann sum: each one is f(x_i) · Δx, and the total is 19.6000. The blue curve is the function; the green number is the exact integral. Drag N upward and watch the rectangles crowd together — the gap closes as ~1/N for the left/right rules and as ~1/N² for the midpoint rule. The integral isn't a *new* operation; it's a limit of these finite sums, and for the velocity curve v(t) = g·t it equals the distance traveled in time 2 s — exactly the statement projectile motion makes when it goes from acceleration to position.
the arc
1

Area first — accumulating a constant rate

The simplest case is a constant rate. If you drive at 60km/h60 km/h for 2h2 h, you cover 60×2=120km60 × 2 = 120 km. On a graph of speed-vs-time, that’s the area of a rectangle: width × height. The total distance is the area under the speed curve, even when the curve isn’t constant. The whole module is reframing this trivial case for non-constant rates.

For a rate that changes linearly — say v(t)=gtv(t) = g · t, what gravity gives an object dropped from rest — the area under the line over [0,T][0, T] is a triangle: (1/2)T(gT)=(gT2)/2(1/2) · T · (g · T) = (g · T²) / 2. That’s the falling distance. No new physics, no new calculus — just area.

2

Riemann sum — finite bookkeeping

For a curve that isn’t a triangle, you can’t read the area off geometry. Instead, approximate. Chop the interval [a,b][a, b] into NN strips of width Δx=(ba)/NΔx = (b − a)/N. Pick a sample point in each strip — left edge, right edge, or midpoint, your choice — and use that one value as the strip’s “constant” height. Add up the strip areas. The result is a :

SN=Σf(xi)ΔxS_N = Σ f(x_i) · Δx

The widget above shows this directly. Pick f(x)=x2f(x) = x² over [0,1][0, 1] and slide N upward. At N=1N = 1 the rectangle is laughably wrong; at N=8N = 8 it’s recognizable; at N=80N = 80 the gap from the true value 1/31/3 is invisible. Different rules (left/right/midpoint) approach the same limit at different speeds — left and right rules at O(1/N)O(1/N), midpoint at O(1/N2)O(1/N²). That’s why every numerical integrator picks midpoint or better.

# Riemann sum — turn 'area under the curve' into a finite computation.
# Chop [a, b] into N strips, evaluate f once per strip, multiply by Δx,
# add. Three rule choices give different errors at the same N.
def riemann(f, a, b, n, rule="midpoint"):
    dx = (b - a) / n
    s = 0.0
    for i in range(n):
        if   rule == "left":     x = a + i * dx
        elif rule == "right":    x = a + (i + 1) * dx
        else:                    x = a + (i + 0.5) * dx
        s += f(x) * dx
    return s

# ∫_0^1 x² dx — the exact answer is 1/3 ≈ 0.333.
[(rule, riemann(lambda x: x*x, 0, 1, n=20, rule=rule))
 for rule in ("left", "right", "midpoint")]
# → [('left',     0.30875),    a bit under 1/3
#    ('right',    0.35875),    a bit over 1/3
#    ('midpoint', 0.333125)]   essentially exact at N=20
# Midpoint converges as ~1/N², the others as ~1/N. That's why every
# practical numerical integrator picks midpoint or higher (Simpson, Gauss).
3

Definite integral — limit of Riemann sums

The is what survives in the limit:

abf(x)dx=lim(N)Σi=1Nf(xi)Δx∫_a^b f(x) dx = \lim_(N → ∞) Σ_{i=1}^N f(x_i) · Δx

A single number — the accumulated total. The notation predates Riemann; the symbol is a stretched “S” for “sum,” the dxdx is the descendant of ΔxΔx after the limit shrinks it. Reading "abf(x)dx∫_a^b f(x) dx" as “sum of f(x)f(x) times tiny dxdx‘s, from aa to bb” is exactly correct intuition; it’s also the pre-Riemann intuition Newton and Leibniz used.

The widget’s “exact integral” readout is this number, computed in closed form (because we picked easy functions). For most real functions, the limit is taken numerically — and Riemann sums of one form or another are how computers actually compute integrals.

4

Antiderivative — reverse of the derivative

Integration meets differentiation. From the derivatives module, differentiating F(x)=x3F(x) = x³ gives F(x)=3x2F'(x) = 3x². Reading right-to-left: 3x23x² has an antiderivative, namely x3. An of ff is any function FF with F(x)=f(x)F'(x) = f(x).

Antiderivatives aren’t unique — x3 and x3+5x³ + 5 both differentiate to 3x23x². Any constant CC can be added without changing the derivative, which is why textbooks write F(x)+CF(x) + C. The set of all antiderivatives of one ff is a one-parameter family, all parallel translates of each other.

For polynomials, the rule is mechanical: the derivative of xnx^n is nx(n1)n · x^(n−1), so the antiderivative of xnx^n is x(n+1)/(n+1)x^(n+1) / (n+1). Reverse the formula’s bookkeeping. For sinx\sin x the antiderivative is cosx−\cos x; for exe^x it’s exe^x (back where you started). A finite list of these and the chain rule cover most of what one runs into in practice.

# Antiderivative — the function whose derivative is f.
# For polynomials, the rule is mechanical: x^n → x^(n+1)/(n+1).
# But the antiderivative isn't unique — F(x) and F(x) + 5 both differentiate
# to the same f. The +C is a fixed point of the operation.
def antideriv_poly(coeffs):
    """Coefficients of polynomial Σ c_i x^i → coeffs of antiderivative
       Σ c_i x^(i+1)/(i+1).  The constant C is dropped (you supply it)."""
    return [0.0] + [c / (i + 1) for i, c in enumerate(coeffs)]

# f(x) = 3x² + 2x + 1  →  F(x) = x³ + x² + x  (+ C)
antideriv_poly([1, 2, 3])
# → [0.0, 1.0, 1.0, 1.0]   coefficients of x⁰, x¹, x², x³
5

Fundamental theorem — area equals reverse-derivative

The two stories — area under the curve and reverse of derivative — turn out to be the same story. The is the bridge:

abf(x)dx=F(b)F(a)∫_a^b f(x) dx = F(b) − F(a)

for any antiderivative FF of ff. The infinite limit of Riemann sums collapses to two function evaluations and a subtraction. Most definite integrals you ever evaluate by hand or in a calculator are computed this way; the Riemann limit is what the integral is, but the FTC is how you do it.

Try the projectile-motion case. The velocity is v(t)=gtv(t) = g · t; an antiderivative is (gt2)/2(g · t²) / 2. By the FTC, the distance fallen between 00 and TT is (gT2)/20=(gT2)/2(g · T²)/2 − 0 = (g · T²) / 2 — the same triangle area we read off geometry in arc 1, now derived from the antiderivative. Two routes, one number.

The other half of the theorem — the part that says (d/dx)axf(t)dt=f(x)(d/dx) ∫_a^x f(t) dt = f(x) — is what makes the connection tight in both directions. Differentiation undoes integration; integration accumulates derivatives. They are not separate operations sharing a textbook chapter; they are inverses in the same way that addition and subtraction are inverses.

# Fundamental Theorem of Calculus, Part 2:
#   ∫_a^b f(x) dx = F(b) − F(a)
# for any antiderivative F of f. The infinite limit of Riemann sums
# becomes two function evaluations and a subtraction.
def evaluate_poly(coeffs, x):
    return sum(c * x**i for i, c in enumerate(coeffs))

def integral_via_ftc(coeffs, a, b):
    F = antideriv_poly(coeffs)
    return evaluate_poly(F, b) - evaluate_poly(F, a)

# ∫_0^2 (3t² + 2t + 1) dt — by FTC.
integral_via_ftc([1, 2, 3], 0, 2)
# → 14.0      F(2) − F(0) = (8 + 4 + 2) − 0 = 14
#
# Sanity check via Riemann at N=10000 with the lambda form:
def f(t): return 3*t*t + 2*t + 1
riemann(f, 0, 2, n=10000, rule="midpoint")
# → 13.99999...   matches FTC to four decimals
#
# The Riemann sum 'is what the integral is.' FTC says you almost never
# have to take the limit — pick an antiderivative and subtract.
6

Where this shows up — same accumulator, two pillars

Integration adds change across time. In physics that change becomes distance; in finance it becomes present value. The Riemann-sum picture is the same in both pillars; only the rate being summed differs.

physics : velocity is accumulated into distance; force·velocity into energy.
finance : a continuous payment rate is accumulated — discounted — into present value.

Projectile motion — fall distance is 0tv(s)ds=12gt2\int_0^t v(s)\,ds = \tfrac{1}{2} g t^2. The velocity v(s)=gsv(s) = g \cdot s is the rate; integrating gives the area under it; that area is the distance. Two derivatives turn position into acceleration; two integrations run the ladder back the other way.

Terminal velocity — velocity is no longer linear; it bends toward an asymptote. Distance fallen is still 0tv(s)ds\int_0^t v(s)\,ds — area under the curve, only the curve has shape now. Same accumulator, harder shape.

Damped oscillator — average power input under sinusoidal forcing is Fx˙\langle F \cdot \dot{x} \rangle, an integral over a cycle. The peak — resonance — is exactly where this integral is largest; off-resonance, alternating contributions cancel under the integral sign.

Present value — a continuous cash-flow rate c(t)c(t) has present value PV=0Tc(t)ertdtPV = \int_0^T c(t) e^{-rt}\,dt. The discount factor erte^{-rt} shrinks each future moment before the integral adds them. Money over time is structurally identical to velocity over time: a rate, accumulated.

Same machine, different nouns: distance in physics, present value in finance — both are the area under a rate curve, with the rate set by the application.

Differentiation asks how fast a quantity is changing. Integration asks how much change has accumulated. Riemann sums are what the integral is. Antiderivatives are how you compute it. The fundamental theorem says those two pictures are the same picture — the inverse of the derivative.

exercises · 손으로 풀기
1constant rate by handno calculator

A car drives at a constant 60km/h60 km/h for 2 hours. Compute the total distance two ways: (a) by reading the area of the rectangle on a speed-vs-time graph, (b) by computing the antiderivative of the constant function v(t)=60v(t) = 60 and applying the FTC.

2Riemann sum by handno calculator

Compute the midpoint Riemann sum for f(x)=x2f(x) = x² over [0,1][0, 1] with N=4N = 4 rectangles. (Midpoints are 0.125,0.375,0.625,0.8750.125, 0.375, 0.625, 0.875; Δx=0.25Δx = 0.25.) Compare to the exact value 1/30.33331/3 ≈ 0.3333.

3antiderivative by reversing the chain

Compute 02(3t2+2t+1)dt∫_0^2 (3t² + 2t + 1) dt via the FTC. Also compute it via the widget at N=100N = 100 midpoint and confirm the two agree.

4fall distance from velocity

A ball is dropped from rest. Gravity gives constant acceleration g=9.8m/s2g = 9.8 m/s², so the velocity after time tt is v(t)=gtv(t) = g·t. How far has it fallen by t=3st = 3 s?

glossary · used on this page · 4
definite integral·정적분
The accumulated total of a function over an interval. Notation: `∫_a^b f(x) dx`. Geometrically, the _signed area_ between the graph of `f` and the x-axis from `a` to `b` (positive above, negative below). Operationally, the limit of a Riemann sum as the rectangle width shrinks to zero. Physically: the total displacement when `f(t)` is velocity, the total work when `f(x)` is force, the total charge when `f(t)` is current. The bounds matter: a definite integral is _one number_, not a function. Differentiation undoes it (via the fundamental theorem) by varying one bound and treating the result as a function of that bound.
Riemann sum·리만 합
A finite approximation to a definite integral. Chop the interval `[a, b]` into `N` strips, evaluate `f` once per strip (at the left edge, the right edge, or the midpoint — different conventions, different errors), multiply each value by the strip's width `Δx`, and add. Symbolically: `S_N = Σ f(x_i) · Δx`. As `N → ∞` and `Δx → 0`, every reasonable convention converges to the same number — the definite integral. The Riemann sum is what the integral _is_, before the limit is taken; everything calculus does to integrals (by parts, substitution, change of variables) ultimately lands back as a finite sum on a computer.
antiderivative·원시함수
A function whose derivative is the given function. If `F'(x) = f(x)`, then `F` is _an_ antiderivative of `f` — there are infinitely many, all differing by a constant: `F(x) + C` is also an antiderivative for any constant `C`. The antiderivative is what differentiation _undoes_; the fundamental theorem of calculus says it's also what the definite integral _computes_: `∫_a^b f(x) dx = F(b) − F(a)`. The constant `C` cancels because the integral subtracts two values of `F`. Often called _indefinite integral_ in textbooks (notation `∫ f(x) dx`), but "antiderivative" names the _function itself_ more precisely; "indefinite integral" emphasizes the operation.
fundamental theorem of calculus·미적분학의 기본정리
The bridge between integration and differentiation. Two halves, one statement. _Part 1_: define `F(x) = ∫_a^x f(t) dt` (the running integral, treating one bound as a variable). Then `F'(x) = f(x)` — differentiation undoes integration. Whatever you accumulate, its rate of accumulation at `x` is just `f(x)`. _Part 2_: if `F` is _any_ antiderivative of `f`, then `∫_a^b f(x) dx = F(b) − F(a)`. The integral is computed by subtracting two values of an antiderivative — no infinite sum required, just two function evaluations. This is why most definite integrals you ever compute are evaluated through antiderivatives, not Riemann limits. The theorem turns the _area-under-the-curve_ picture and the _reverse-of-derivative_ picture into the _same_ picture. Which one is "the integral" is a choice of viewpoint; both are correct.