📊 Section 1 — Interactive Simulation
Choose a function and an interval $[a,b]$. Pick a quadrature rule, watch Riemann bars approximate the area, and see the accumulation function $A(x) = \int_a^x f(t)\,dt$ trace out as the upper limit moves.
Animation
Function Preset
Quadrature Rule
Parameters
Display Options
Tips
• Press ▶ Play to animate $n$ growing — watch error shrink.
• Simpson is exact for cubics — try $f=x^3$ to see this.
• In Accumulation mode, drag $x$ to slide the upper limit; the cyan dot is $A'(x)$, which equals $f(x)$ by FTC Part 1.
🧩 Section 2 — The Idea, Step by Step
One continuous walk-through, from a kitchen faucet to the formal theorem — building up gently so the simulation above makes complete sense.
Turn on a tap and water pours into a tub. At every instant the faucet has a flow rate: how fast water is arriving right now (litres per minute). The tub has a total: how much water has collected so far. These two numbers are tied together by plain common sense. If you know the flow rate at every moment, you can figure out the total — just keep adding up the little bits that arrive. And going the other way: watch how fast the water level climbs, and that is the flow rate at this instant. The Fundamental Theorem of Calculus is exactly this two-way street, made precise.
Call the flow rate $f(t)$ and the running total $A(x)$ — the amount collected from the start time $a$ up to time $x$. When the rate is constant, the total is just rate times time, which is the area of a rectangle. If the faucet runs at $2$ L/min for $3$ minutes, you get $2 \times 3 = 6$ litres — and that is exactly the area under the flat rate-graph. When the rate changes, you slice time into thin strips, treat the rate as roughly constant on each strip, and add the little rectangles. That sum of strips is a Riemann sum, and as the strips get thinner it closes in on the true area $A(x)=\int_a^x f(t)\,dt$.
Part 1 says the running total is an antiderivative of the rate: $A'(x)=f(x)$. The slope of the "how much I've collected" curve, at any moment, equals the flow rate at that moment — the second half of the faucet intuition, in symbols. Part 2 turns that into a shortcut: if $F$ is any function whose derivative is $f$ (so $F'=f$), then $\int_a^b f(x)\,dx = F(b)-F(a)$. No infinite sum needed — find an antiderivative, subtract two values, done. In the sim above, the a and b sliders set the interval, n sets how many strips, the x slider slides the upper limit in Accumulation mode, and the rule dropdown chooses how each strip's height is picked.
① With $f(x)=x^2$ and the Midpoint rule, double $n$ from $10$ to $20$ and watch $|\text{error}|$ drop to about a quarter — that is the $O(h^2)$ convergence. ② Switch to Accumulation A(x) mode and drag the $x$ slider: the cyan dot reads $A'(x)$ and stays glued to the value of $f(x)$ — Part 1 happening live. ③ Choose $f(x)=x^3$ with Simpson's Rule and watch the error collapse to essentially zero, because Simpson is exact on cubics.
📐 Section 3 — Two Theorems & Proof
FTC has two parts: the first builds an antiderivative from integration, the second uses any antiderivative to evaluate definite integrals.
Let $f$ be continuous on $[a,b]$. Define $A:[a,b]\to\R$ by $$A(x) = \int_a^x f(t)\,dt.$$ Then $A$ is differentiable on $(a,b)$ and $A'(x)=f(x)$.
Let $f$ be continuous on $[a,b]$ and let $F$ be any antiderivative of $f$ on $[a,b]$ (so $F'=f$). Then $$\int_a^b f(x)\,dx = F(b) - F(a).$$
Together: differentiation and integration are inverse operations on continuous functions.
Symbol Table
| Symbol | Meaning | Type |
|---|---|---|
| $f$ | Integrand | Continuous on $[a,b]$ |
| $[a,b]$ | Interval of integration | Closed bounded interval |
| $A(x)$ | Accumulation function $\int_a^x f$ | $[a,b]\to\R$, differentiable |
| $F$ | Any antiderivative: $F'=f$ | Determined up to a constant |
| $P=\{x_0,\ldots,x_n\}$ | Partition of $[a,b]$ | $a=x_0 |
| $h=(b-a)/n$ | Uniform step size | Real, $h\to 0$ as $n\to\infty$ |
| $x_i^*$ | Sample point in $[x_{i-1},x_i]$ | Real (left, right, or midpoint) |
| $S_n$ | Riemann sum $\sum_{i=1}^n f(x_i^*)\,h$ | Real, $\to \int_a^b f$ as $n\to\infty$ |
Proof of FTC Part 1
Simulation ↔ Symbol Mapping
slider a, b | interval endpoints $a$ and $b$ |
slider n | number of subintervals; $h=(b-a)/n$ |
slider x (upper limit) | variable upper limit in $A(x)=\int_a^x f$, used in Accumulation mode |
dropdown rule | how the bar height is chosen: left/right/mid-point or trapezoid/Simpson |
readout numerical ∫ | $S_n$, the value of the chosen quadrature rule |
readout exact ∫ | $F(b)-F(a)$ from the closed-form antiderivative of the preset |
readout order | empirical order $p$ from $\log_2(\text{err}_n / \text{err}_{2n})$ — should equal the rule's theoretical order |
readout A′(x) | numerical derivative of $A$ at $x$, should match $f(x)$ by FTC Part 1 |
Worked Example — $\displaystyle\int_0^2 x^2\,dx$
By FTC Part 2: An antiderivative of $f(x)=x^2$ is $F(x)=x^3/3$.
$\displaystyle\int_0^2 x^2\,dx = F(2) - F(0) = \tfrac{8}{3} - 0 = \tfrac{8}{3} \approx 2.6667.$
By Riemann sum (midpoint, $n=4$): $h = 2/4 = 0.5$. Midpoints: $x_i^* \in \{0.25, 0.75, 1.25, 1.75\}$.
$S_4 = h\sum f(x_i^*) = 0.5\,(0.0625 + 0.5625 + 1.5625 + 3.0625) = 0.5\cdot 5.25 = 2.625.$
Error $= |2.625 - 8/3| \approx 0.0417$. With $n=8$: $S_8 \approx 2.6563$, error $\approx 0.0104$ — exactly $1/4$ of the previous error, confirming midpoint's $O(h^2)$ convergence. $\boxed{\int_0^2 x^2\,dx = 8/3.}$
❓ Section 4 — Frequently Asked Questions
Because it unifies the two operations that calculus is built around — differentiation and integration — by showing they are inverse operations. Before FTC, finding $\int_a^b f$ required computing limits of Riemann sums by hand, which is impossible for most functions. FTC says: just find any antiderivative $F$, evaluate $F(b)-F(a)$, done. It also says that integration is a smoothing operation: $A(x)=\int_a^x f$ is always one degree smoother than $f$ (continuity gives differentiability of $A$).
Key takeaway: FTC reduces "compute area under a curve" to "find an antiderivative" — that's why it's the fundamental theorem.It partitions $[a,b]$ into $n$ equal subintervals of width $h=(b-a)/n$. For each subinterval, it draws a rectangle (or trapezoid, for the trapezoidal rule) whose area approximates the area under the curve over that subinterval. The chosen quadrature rule determines the height: left endpoint, right endpoint, midpoint, average of endpoints (trapezoid), or weighted average $\frac{1}{6}(f_L + 4f_M + f_R)$ (Simpson). Total bar area = numerical integral. As $n$ grows, bars shrink and their total approaches the exact integral.
Key takeaway: the bars are the Riemann sum; their total area converges to $\int_a^b f$ as $n\to\infty$.Everywhere "rate × time = total" appears. Distance from velocity: $\text{distance} = \int_{t_0}^{t_1} v(t)\,dt$. Charge from current: $Q = \int i(t)\,dt$. Total cost from marginal cost: $C(q) = \int_0^q \text{MC}(s)\,ds + C(0)$. In probability, the CDF is the integral of the PDF: $F_X(x) = \int_{-\infty}^x f_X(t)\,dt$, and FTC gives $f_X = F_X'$. In machine learning, integrating prediction confidence over inputs gives expected reward; in physics, work is the integral of force over displacement. Every "running total" application is FTC.
Key takeaway: anywhere you accumulate a rate over time/space, you're using FTC.FTC Part 1 needs $f$ continuous at $x$ for $A'(x)=f(x)$ to hold there. If $f$ has a jump discontinuity at $c$, then $A$ is still continuous at $c$ but $A'(c)$ either doesn't exist or doesn't equal $f(c)$. FTC Part 2 has a stronger requirement: needing $f$ Riemann-integrable AND $F$ continuous on $[a,b]$, $F'=f$ except possibly at finitely many points. The Lebesgue version goes further: FTC Part 2 holds for absolutely continuous $F$, with $f=F'$ existing a.e., even when $F'$ is unbounded. So the right setting depends on how "rough" your functions are.
Key takeaway: FTC's continuity hypothesis is essential for the clean form — drop it and you need finer machinery (absolute continuity, Lebesgue).Each rule has a known error bound. Left/right Riemann: $E = O(h)$, error halves when $n$ doubles. Trapezoid: $E = -\tfrac{(b-a)h^2}{12}f''(\xi)$, error quarters when $n$ doubles. Midpoint: same $O(h^2)$ but half the constant. Simpson: $E = -\tfrac{(b-a)h^4}{180}f^{(4)}(\xi)$, error reduces by $16\times$ when $n$ doubles. Simpson fits a parabola to each pair of intervals — and parabolas integrate cubics exactly, so Simpson is exact on cubics. To get $10^{-6}$ accuracy on a smooth function: trapezoid needs $n\approx 1000$, Simpson needs $n\approx 30$.
Key takeaway: Simpson's $O(h^4)$ is "free smoothness" — fit a parabola, get cubics for free.The generalized Stokes' theorem: $\int_M d\omega = \int_{\partial M} \omega$, where $M$ is an oriented manifold with boundary $\partial M$ and $\omega$ is a differential form. The 1D FTC is the case $M=[a,b]$, $\partial M = \{a, b\}$, $\omega = F$, $d\omega = F'\,dx = f\,dx$: $\int_a^b f\,dx = F(b)-F(a)$. Other cases: Green's theorem (2D plane), classical Stokes (curl theorem), Gauss/divergence theorem (3D). All four say "the integral of a derivative over a region equals an integral on the boundary" — the same idea, in different dimensions.
Key takeaway: FTC = Stokes in 1D. Green's, Stokes', and divergence theorems are all the same theorem in different dimensions.No — only that the positive and negative areas cancel. Example: $\int_{-1}^{1} x\,dx = 0$, but $f(x)=x$ is not identically zero. Even more: $\int_0^{2\pi}\sin x\,dx = 0$. However, if $f$ is continuous and non-negative on $[a,b]$ and $\int_a^b f = 0$, then $f \equiv 0$ on $[a,b]$ (proof: if $f(x_0)>0$, continuity gives a neighbourhood where $f>f(x_0)/2$, contradicting zero integral). The continuity + sign hypotheses are essential.
Key takeaway: zero integral ≠ zero function — only with continuity + non-negativity.