The Fundamental Theorem of Calculus

Published on 2026-11-04·v1.0

Learning Objectives

  • State both parts of the Fundamental Theorem of Calculus with every hypothesis, and say which part answers "what is the derivative of an integral" and which answers "how do I evaluate an integral".
  • Differentiate functions defined by integrals, including ones with variable limits, using the chain rule.
  • Evaluate definite integrals as F(b)−F(a)F(b)-F(a) and explain why the constant of integration drops out.
  • Separate displacement from total distance when a velocity changes sign.
  • Show with a concrete case that dropping a hypothesis makes each part fail.
  • Use accumulation functions for quantities with no elementary antiderivative, such as erf⁡\operatorname{erf}.

Context & Motivation

In the-definite-integral-and-riemann-sums an integral was a limit of sums, and the exact value of even ∫0bx2 dx\int_0^b x^2\,dx needed a summation formula and a limit. Meanwhile antiderivatives-and-initial-value-problems reversed differentiation without any mention of area. The Fundamental Theorem of Calculus (FTC) says these two projects are the same project: accumulating a rate and undoing a derivative are inverse operations. It turns a limit of nn terms into two function evaluations.

In computing the theorem shows up in two ways. Any cumulative quantity (total bytes sent from a rate, a cumulative distribution function from a density) has the rate as its derivative. And when no antiderivative can be written down, as for the bell curve, the theorem still tells you the derivative of the accumulated quantity, which is what numerical methods and gradient-based fitting need.

A note on naming: OpenStax calls the derivative statement Part 1 and the evaluation statement Part 2, as this lesson does. MIT 18.01SC and Active Calculus call the evaluation statement the first theorem and the derivative statement the second. Check which convention a source uses before quoting "the first theorem".

Core Theory

Accumulation functions

For ff integrable on [a,b][a,b], define F(x)=∫axf(t) dtF(x) = \int_a^x f(t)\,dt for x∈[a,b]x\in[a,b]. The integration variable is a dummy, so use a different letter (tt) from the upper limit (xx). F(x)F(x) is the net area accumulated from aa up to xx.

Part 1: the derivative of an accumulation

Theorem. If ff is continuous on [a,b][a,b] and F(x)=∫axf(t) dtF(x)=\int_a^x f(t)\,dt, then FF is continuous on [a,b][a,b], differentiable on (a,b)(a,b), and F′(x)=f(x)F'(x) = f(x) for every x∈(a,b)x\in(a,b) (one-sided at the endpoints).

The idea: F(x+h)−F(x)h=1h∫xx+hf(t) dt\frac{F(x+h)-F(x)}{h} = \frac1h\int_x^{x+h} f(t)\,dt is the average of ff on [x,x+h][x,x+h]. As h→0h\to0 that interval collapses onto xx, and continuity forces the average to approach f(x)f(x). Numerically, for f=cos⁡f=\cos at x=0.5x=0.5 the averages are 0.7241 (h=0.5h=0.5), 0.8522 (0.10.1), 0.87517 (0.010.01), 0.87734 (0.0010.001), heading to cos⁡0.5=0.87758\cos 0.5 = 0.87758.

With variable limits, and ff continuous, g,hg,h differentiable:

ddx∫h(x)g(x)f(t) dt=f(g(x)) g′(x)−f(h(x)) h′(x)\frac{d}{dx}\int_{h(x)}^{g(x)} f(t)\,dt = f(g(x))\,g'(x) - f(h(x))\,h'(x)

Part 2: evaluation

Theorem. If ff is continuous on [a,b][a,b] and FF is any antiderivative of ff on [a,b][a,b] (that is, F′=fF'=f there), then

∫abf(x) dx=F(b)−F(a)=[F(x)]ab\int_a^b f(x)\,dx = F(b) - F(a) = \big[F(x)\big]_a^b

Why: G(x)=∫axfG(x)=\int_a^x f is an antiderivative by Part 1. Two antiderivatives on an interval differ by a constant (a zero derivative on an interval means constant, see the-mean-value-theorem-and-monotonicity), so F=G+CF = G + C, and F(b)−F(a)=G(b)−G(a)=∫abfF(b)-F(a) = G(b)-G(a) = \int_a^b f. If you write F+CF+C the CC cancels in the subtraction, so definite integrals need no constant.

Continuity of ff is the simple sufficient condition. The theorem holds more generally when ff is integrable and FF is continuous on [a,b][a,b] with F′=fF'=f except at finitely many points. For example, F(x)=x2sin⁡(1/x)F(x)=x^2\sin(1/x) with F(0)=0F(0)=0 has F′(x)=2xsin⁡(1/x)−cos⁡(1/x)F'(x)=2x\sin(1/x)-\cos(1/x) for x≠0x\ne0 and F′(0)=0F'(0)=0, which is bounded but discontinuous at 00, and ∫01F′=F(1)−F(0)=sin⁡1≈0.8415\int_0^1F'=F(1)-F(0)=\sin1\approx0.8415.

Net change

Read Part 2 with FF as a quantity and f=F′f=F' as its rate: ∫abF′(x) dx=F(b)−F(a)\int_a^b F'(x)\,dx = F(b)-F(a), the net change. For velocity vv, ∫abv dt\int_a^b v\,dt is displacement and ∫ab∣v∣ dt\int_a^b \lvert v\rvert\,dt is distance travelled. They differ whenever vv changes sign.

Programs use the discrete twin of this idea all the time. With a prefix-sum array P[k]=∑i≤kaiP[k]=\sum_{i\le k} a_i, the sum of any range is P[b]−P[a−1]P[b]-P[a-1]: the sum of the rate, taken as a difference of two cumulative values, with no loop over the range. Part 2 is the same trade for continuous ff, and the difference ak=P[k]−P[k−1]a_k = P[k]-P[k-1] plays the role of F′=fF'=f.

When the hypotheses fail

  • Part 2 with an unbounded ff. On [−1,1][-1,1] take f(x)=1/x2f(x)=1/x^2 and F(x)=−1/xF(x)=-1/x. Then F′=fF'=f for x≠0x\ne0, but FF is not continuous at 00 and ff is unbounded there. The mechanical subtraction gives F(1)−F(−1)=−1−1=−2F(1)-F(-1) = -1-1 = -2, a negative number for a positive function. The function is unbounded at 00, so it has no Riemann integral. Midpoint sums with n=10,100,1000,10000n=10, 100, 1000, 10000 are 47.4, 491.5, 4932.8, 49346.0: they grow about like nn and never settle (sympy reports ∞\infty).
  • Part 1 without continuity. Let f(x)=1f(x)=1 for x≠0x\ne0 and f(0)=0f(0)=0. Changing one value does not change any integral, so ∫0xf=x\int_0^x f = x, whose derivative at 00 is 11, not f(0)=0f(0)=0. Likewise f(t)=sgn⁡tf(t)=\operatorname{sgn}t gives ∫0xf=∣x∣\int_0^x f=\lvert x\rvert, with no derivative at 00.

Integrals with no elementary antiderivative

e−t2e^{-t^2} is continuous, so ∫0xe−t2dt\int_0^x e^{-t^2}dt exists and Part 1 gives its derivative, but no combination of elementary functions has e−x2e^{-x^2} as its derivative. The accumulation is a new function, erf⁡(x)=2π∫0xe−t2dt\operatorname{erf}(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}dt, with erf⁡′(x)=2πe−x2\operatorname{erf}'(x) = \frac{2}{\sqrt\pi}e^{-x^2}. Values come from numerical integration.

Worked Examples

Example 1: variable limits

Let G(x)=∫xx2dt1+t4G(x)=\int_x^{x^2}\frac{dt}{1+t^4}. Both limits depend on xx:

G′(x)=2x1+x8−11+x4G'(x) = \frac{2x}{1+x^8} - \frac{1}{1+x^4}

At x=1.3x=1.3 the formula gives 0.024596887090.02459688709. A central difference of numerical integrals gives 0.024596887110.02459688711. For a single variable limit, ddx∫0x2e−t2dt=2x e−x4\frac{d}{dx}\int_0^{x^2}e^{-t^2}dt = 2x\,e^{-x^4}, the factor 2x2x coming from the chain rule.

Example 2: evaluating with an antiderivative

∫14(3x+2x)dx=[2x3/2+2ln⁡x]14=(16+2ln⁡4)−2=14+4ln⁡2≈16.7726\int_1^4\Big(3\sqrt{x}+\frac2x\Big)dx = \Big[2x^{3/2} + 2\ln x\Big]_1^4 = (16 + 2\ln4) - 2 = 14 + 4\ln 2 \approx 16.7726

Differentiating 2x3/2+2ln⁡x2x^{3/2}+2\ln x returns 3x+2/x3\sqrt x + 2/x, and quadrature gives 16.7725887216.77258872. The ln⁡\ln is legitimate because [1,4][1,4] lies in x>0x>0, where 1/x1/x is continuous.

Example 3: displacement versus distance

A particle has v(t)=t2−4t+3=(t−1)(t−3)v(t)=t^2-4t+3=(t-1)(t-3) on [0,4][0,4], with antiderivative t33−2t2+3t\frac{t^3}{3}-2t^2+3t. The sign changes at t=1t=1 and t=3t=3, so split there:

∫01v=43,∫13v=−43,∫34v=43\int_0^1 v = \tfrac43, \qquad \int_1^3 v = -\tfrac43, \qquad \int_3^4 v = \tfrac43

Displacement is 43−43+43=43\frac43-\frac43+\frac43 = \frac43; distance is 43+43+43=4\frac43+\frac43+\frac43 = 4. Integrating vv over the whole interval and calling it "distance" would report 43\frac43, off by a factor of 3.

Example 4: reading an accumulation function

Let F(x)=∫0x(t−1)(t−2) dt=x33−3x22+2xF(x)=\int_0^x (t-1)(t-2)\,dt = \frac{x^3}{3}-\frac{3x^2}{2}+2x. By Part 1, F′(x)=(x−1)(x−2)F'(x)=(x-1)(x-2), which is positive for x<1x<1, negative on (1,2)(1,2), and positive for x>2x>2. So FF rises, then falls, then rises: a local maximum at x=1x=1 with F(1)=56F(1)=\frac56 and a local minimum at x=2x=2 with F(2)=23F(2)=\frac23. Numerical integration gives 0.83330.8333 and 0.66670.6667, and F(3)=32F(3)=\frac32. The shape of FF was read from the sign of ff without computing FF.

Example 5: a function without a formula

By Part 1, erf⁡′(0.7)=2πe−0.49=0.69127486\operatorname{erf}'(0.7) = \frac{2}{\sqrt\pi}e^{-0.49} = 0.69127486, and a finite difference of the library erf⁡\operatorname{erf} agrees to 10−1110^{-11}. Midpoint sums of 2π∫01e−t2dt\frac{2}{\sqrt\pi}\int_0^1 e^{-t^2}dt with n=4,8,16,64,256n=4, 8, 16, 64, 256 give 0.84487, 0.84324, 0.84284, 0.842709, 0.842701, against erf⁡(1)=0.8427007929\operatorname{erf}(1)=0.8427007929. Values like those in the Z-table of the-normal-distribution come from this kind of numerical integration: P(∣Z∣<1)=erf⁡(1/2)=0.6827P(\lvert Z\rvert<1) = \operatorname{erf}(1/\sqrt2) = 0.6827, the roughly 68% of the 68-95-99.7 rule.

Common Misconceptions & Pitfalls

  • "Any FF with F′=fF'=f off a few points will do." FF must also be continuous on [a,b][a,b]. Take f=0f=0 and F=⌊x⌋F=\lfloor x\rfloor on [0,2][0,2]: F′=fF'=f except at the integers, yet F(2)−F(0)=2F(2)-F(0)=2 while ∫02f=0\int_0^2f=0. The jump in −1/x-1/x at 00 (Core Theory) is the same failure. A corner is harmless: F=∣x∣F=\lvert x\rvert with f=sgn⁡f=\operatorname{sgn} on [−1,2][-1,2] gives F(2)−F(−1)=1=∫−12sgn⁡F(2)-F(-1)=1=\int_{-1}^{2}\operatorname{sgn}.
  • "The derivative of ∫ag(x)f\int_a^{g(x)} f is f(g(x))f(g(x))." The inner derivative is missing: it is f(g(x)) g′(x)f(g(x))\,g'(x). And if both limits are constants, the derivative is 00, because the integral is a number.
  • "Definite integrals need +C+C." The constant cancels. Writing it does no harm, but it is not part of the answer.
  • "Integral of velocity is distance." It is displacement. Distance needs ∫∣v∣\int\lvert v\rvert, split at sign changes.
  • "Part 1 and Part 2 are the same fact." Part 1 produces antiderivatives for every continuous ff (including ones with no formula); Part 2 uses an antiderivative you already have to compute a number.
  • Reusing xx as both limit and variable, as in ∫0xf(x) dx\int_0^x f(x)\,dx. It runs, but invites mistakes in differentiation. Rename the inner variable.

Summary

For continuous ff on [a,b][a,b], Part 1 says the accumulation F(x)=∫axf(t) dtF(x)=\int_a^x f(t)\,dt is differentiable with F′=fF'=f, and with variable limits the chain rule adds g′(x)g'(x) factors. Part 2 says ∫abf=F(b)−F(a)\int_a^b f = F(b)-F(a) for any antiderivative FF, so definite integrals become two evaluations and the constant of integration cancels. Read as net change, the integral of a rate is the change in the quantity, which is why velocity gives displacement and ∫∣v∣\int\lvert v\rvert gives distance. Part 1 needs continuity of ff at the point in question (a single changed value breaks it there). Part 2 needs ff integrable and FF continuous on [a,b][a,b]: 1/x21/x^2 on [−1,1][-1,1] fails both, and F=⌊x⌋F=\lfloor x\rfloor with f=0f=0 shows that a jump in FF breaks the formula. When no elementary antiderivative exists, as with e−t2e^{-t^2}, the accumulation function is still well defined and has a known derivative, and its values come from numerical integration. The next lesson, integration-by-substitution-and-by-parts, builds the techniques for finding antiderivatives.

Documentation Links