---
title: The Fundamental Theorem of Calculus
module: The Riemann Integral
moduleNumber: 6
lessonNumber: 4
order: 604
summary: >
  The fundamental theorem ties the integral to the derivative in two forms.
  The evaluation form computes a definite integral from any antiderivative; the
  differentiation form shows the area function has derivative equal to the
  integrand at points of continuity. Together they make differentiation and
  integration inverse operations, and yield integration by parts and change of
  variables.
topics: [The Riemann Integral]
draft: false
sources:
  - book: Lebl
    ref: "§5.3 Fundamental theorem of calculus (both forms, change of variables)"
  - book: Shkoller
    ref: "§1.11 The fundamental theorem of calculus (antiderivatives, integration by parts)"
---

Integration and [differentiation](/real-analysis/differentiation/the-derivative)
were defined by unrelated limits — one a supremum of areas, the other a limit of
slopes. The fundamental theorem of calculus proves they are inverse operations.
It comes in two forms: one evaluates a definite integral through an antiderivative,
the other differentiates an integral with a moving upper limit. Almost all of
integral calculus rests on the pair.[^lebl-53]

## First form: evaluation

If a function is the derivative of something, its integral is the net change of
that something.

> **Theorem (Evaluation form).** Let $F : [a,b] \to \mathbb{R}$ be continuous and
> differentiable on $(a,b)$, and let $f \in \mathcal{R}[a,b]$ satisfy
> $f(x) = F'(x)$ for $x \in (a,b)$. Then
> $$
> \int_a^b f = F(b) - F(a).
> $$

> **Proof.** Fix a partition $P = \{x_0, \dots, x_n\}$. On each subinterval the
> [mean value theorem](/real-analysis/differentiation/mean-value-theorem) gives a
> point $c_i \in (x_{i-1}, x_i)$ with
> $$
> F(x_i) - F(x_{i-1}) = F'(c_i)(x_i - x_{i-1}) = f(c_i)\,\Delta x_i.
> $$
> Summing telescopes the left side to $F(b) - F(a)$. Since
> $m_i \le f(c_i) \le M_i$, the same sum is trapped between the lower and upper
> sums:
> $$
> L(P, f) \;\le\; F(b) - F(a) \;\le\; U(P, f).
> $$
> Taking $\sup$ of $L$ and $\inf$ of $U$ over all partitions squeezes
> $F(b) - F(a)$ between the lower and upper integrals, which are equal because
> $f$ is integrable. $\square$

$$
% caption: Evaluation form via the mean value theorem. On each subinterval a point
% caption: $c_i$ makes the rectangle of height $f(c_i)$ have area equal to the
% caption: change in $F$ across that piece; the changes telescope to $F(b) - F(a)$.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc, very thick] (0,0.6) .. controls (1.4,2.1) and (3.0,0.9) .. (4.8,1.9);
\foreach \a/\c/\h in {0/0.7/1.35, 1.6/2.3/1.55, 3.2/3.9/1.35}{
  \fill[acc!12] (\a,0) rectangle ({\a+1.6},\h);
  \draw[black] (\a,0) rectangle ({\a+1.6},\h);
  \fill[acc] (\c,\h) circle (1.4pt);
}
\draw[->] (-0.15,0) -- (5.1,0);
\draw[->] (0,-0.15) -- (0,2.5);
\foreach \x/\lab in {0/x_0, 1.6/x_1, 3.2/x_2, 4.8/x_3}
  \draw (\x,0.07) -- (\x,-0.07) node[below, font=\footnotesize] {$\lab$};
\foreach \c/\lab in {0.7/c_1, 2.3/c_2, 3.9/c_3}
  \node[acc, font=\footnotesize, anchor=south] at (\c,0.04) {$\lab$};
\node[acc] at (4.4,2.15) {$y = f(x)$};
\end{tikzpicture}
$$

> **Worked example (Evaluation through an antiderivative).** Recognizing an
> integrand as a derivative gives the integral in closed form:
> $$
> \int_0^1 x^2 \, \d x = \frac{1^3}{3} - \frac{0^3}{3} = \frac13,
> \qquad
> \int_a^b x^p \, \d x = \frac{b^{p+1}}{p+1} - \frac{a^{p+1}}{p+1} \quad (p \ge 0),
> $$
> each read off from an antiderivative, far faster than the
> [Riemann-sum computation](/real-analysis/riemann-integration/darboux-integral)
> of the same integrals.[^shk-ftc] The same recognition handles the standard
> library:
> $$
> \int_0^{\pi/2} \sin x\, \d x = -\cos\tfrac{\pi}{2} + \cos 0 = 1,
> \qquad
> \int_1^{e} \frac{1}{x}\, \d x = \ln e - \ln 1 = 1,
> $$
> the second because $\ln$ is an antiderivative of $1/x$, the fact that
> [defines the logarithm](/real-analysis/riemann-integration/log-exp-improper).

A finite set of points where $F$ fails to be differentiable is harmless, provided
$F$ stays continuous and an integrable $f$ agrees with $F'$ elsewhere.[^lebl-53]

## Second form: differentiation of the area function

Running the integral as a function of its upper limit produces an antiderivative
of the integrand.

> **Theorem (Differentiation form).** Let $f \in \mathcal{R}[a,b]$ and define the
> **area function**
> $$
> F(x) \coloneqq \int_a^x f.
> $$
> Then $F$ is continuous on $[a,b]$; and if $f$ is continuous at
> $c \in [a,b]$, then $F$ is differentiable at $c$ with $F'(c) = f(c)$.

> **Proof.** _Continuity._ With $|f| \le M$, additivity gives
> $|F(x) - F(y)| = \big|\int_y^x f\big| \le M|x - y|$, so $F$ is Lipschitz, hence
> continuous.[^lebl-53]
>
> _Differentiability at a point of continuity._ Given $\varepsilon > 0$, pick
> $\delta$ with $|f(t) - f(c)| < \varepsilon$ for $|t - c| < \delta$. For such $x$,
> $$
> \frac{F(x) - F(c)}{x - c} = \frac{1}{x - c}\int_c^x f,
> $$
> and the integrand differs from $f(c)$ by less than $\varepsilon$ throughout, so
> the average does too:
> $\big|\tfrac{F(x)-F(c)}{x-c} - f(c)\big| \le \varepsilon$. Hence
> $F'(c) = f(c)$.[^shk-ftc]

Geometrically, $F'(c)$ is the height of the thin strip of area added as $x$
passes $c$.

$$
% caption: The area function $F(x) = \int_a^x f$ grows by a thin strip when $x$
% caption: advances by $h$. That strip has area about $f(x)\,h$, so the difference
% caption: quotient tends to $f(x)$ and $F'(x) = f(x)$.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\fill[acc!12] (0,0) -- (0,0.9) .. controls (1.2,1.6) and (2.2,1.3) .. (3.2,1.7) -- (3.2,0) -- cycle;
\fill[acc!30] (3.2,0) rectangle (3.7,1.75);
\draw[acc, very thick] (0,0.9) .. controls (1.2,1.6) and (2.2,1.3) .. (3.2,1.7) .. controls (3.45,1.78) and (3.6,1.8) .. (3.7,1.82);
\draw[->] (-0.15,0) -- (4.6,0);
\draw[->] (0,-0.15) -- (0,2.4);
\foreach \x/\lab in {0/a, 3.2/x}
  \draw (\x,0.07) -- (\x,-0.07) node[below, font=\footnotesize] {$\lab$};
\draw[<->, black] (3.2,-0.35) -- (3.7,-0.35);
\node[black, font=\footnotesize, anchor=north] at (3.45,-0.35) {$h$};
\node[acc, font=\footnotesize] at (1.5,0.55) {$F(x)$};
\node[acc, font=\footnotesize, anchor=west] at (3.75,1.3) {$f(x)\,h$};
\end{tikzpicture}
$$

When $f$ is continuous on all of $[a,b]$, $F$ is differentiable everywhere with
$F' = f$: every continuous function has an antiderivative, namely its own area
function. The two forms then compose into the pair of identities
$$
\int_a^b F' = F(b) - F(a),
\qquad
\frac{\d}{\d x}\int_a^x f = f(x).
$$

$$
% caption: The two forms as inverse operations: differentiating the area function
% caption: returns the integrand, and integrating a derivative returns the net
% caption: change of the function.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\small,
  bx/.style={draw, minimum width=26mm, minimum height=11mm, align=center}]
\definecolor{acc}{HTML}{4A6FA5}
\node[bx, draw=acc] (f) at (0,0) {integrand $f$};
\node[bx] (F) at (5.2,0) {area function $F$};
\draw[->, acc, thick] (f) to[bend left=22] node[above, font=\footnotesize] {integrate} (F);
\draw[->, black, thick] (F) to[bend left=22] node[below, font=\footnotesize] {take derivative} (f);
\end{tikzpicture}
$$

## Differentiating an integral with a variable limit

Composing the differentiation form with the chain rule differentiates an integral
whose limit is itself a function.

> **Proposition (Leibniz rule).** If $f$ is continuous and $g$ is
> differentiable, then
> $$
> \frac{\d}{\d x}\int_a^{g(x)} f(s)\, \d s = f\big(g(x)\big)\, g'(x).
> $$
> With both limits moving, $\dfrac{\d}{\d x}\int_{h(x)}^{g(x)} f =
> f(g(x))\,g'(x) - f(h(x))\,h'(x)$.

> **Proof.** Write $\Phi(y) = \int_a^y f$, so $\Phi' = f$ by the differentiation
> form; the left side is $(\Phi \circ g)'(x) = \Phi'(g(x))\,g'(x)$.

> **Worked example (Variable limits).** Both integrands below lack an elementary
> antiderivative, yet the derivative of the integral is explicit:
> $$
> \frac{\d}{\d x}\int_0^x e^{s^2}\,\d s = e^{x^2},
> \qquad
> \frac{\d}{\d x}\int_0^{x^2} \sin(s^2)\,\d s = 2x\,\sin(x^4).
> $$
> The first has $g(x) = x$; the second has $g(x) = x^2$, contributing the factor
> $g'(x) = 2x$.

## Continuity is necessary, and the converse fails

Both forms hinge on continuity, and two examples mark the limits.

- **Where $f$ jumps, $F$ need not be differentiable.** Let $f(x) = -1$ for $x < 0$
  and $f(x) = 1$ for $x \ge 0$. Then $F(x) = \int_0^x f = |x|$, which has no
  derivative at $0$ — exactly where $f$ jumps.[^lebl-53]
- **The converse of the differentiation form is false.** Let $g(x) = 0$ for
  $x \ne 0$ and $g(0) = 1$. Then $G(x) = \int_0^x g = 0$ for all $x$, so
  $G'(0) = 0$ exists even though $g$ is discontinuous at $0$. Differentiability of
  the area function does not require continuity of the integrand.[^lebl-53]

Many antiderivatives have no elementary formula. The logarithm is _defined_ as
$\ln x = \int_1^x \tfrac{1}{s}\,\d s$, and the error function
$\operatorname{erf}(x) = \tfrac{2}{\sqrt{\pi}}\int_0^x e^{-s^2}\,\d s$ has no
closed form; the differentiation form still guarantees each is an antiderivative,
and numerical approximation of the integral is how their values are found.[^lebl-53]

## Integration by parts

The product rule, run through the evaluation form, becomes a rule for integrals.

> **Theorem (Integration by parts).** If $f, g$ are continuous on $[a,b]$ and
> differentiable on $(a,b)$ with $f', g' \in \mathcal{R}[a,b]$, then
> $$
> \int_a^b f g' + \int_a^b f' g = f(b)g(b) - f(a)g(a).
> $$

> **Proof.** Apply the evaluation form to $w = fg$: its derivative
> $w' = f'g + fg'$ is integrable, and $\int_a^b w' = w(b) - w(a)$.[^shk-ftc]

The geometry is a rectangle
in the $(f, g)$ plane: as $t$ runs from $a$ to $b$ the point $(f(t), g(t))$ traces
a curve, and the two integrals are the areas on the two sides of that curve, adding
to the change in the corner rectangle's area.

$$
% caption: Integration by parts as an area split. As $t$ runs over $[a,b]$ the
% caption: point $(f, g)$ traces a curve; the area under it (giving $\int g\,df$)
% caption: plus the area left of it (giving $\int f\,dg$) equal the change in the
% caption: corner rectangle $f(b)g(b) - f(a)g(a)$.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{sec}{HTML}{7A6A9A}
% curve from (1,0.6) to (3.4,2.6)
\fill[acc!14] (1,0) -- (1,0.6) .. controls (2.0,1.0) and (2.6,1.9) .. (3.4,2.6) -- (3.4,0) -- cycle;
\fill[sec!18] (0,0.6) -- (1,0.6) .. controls (2.0,1.0) and (2.6,1.9) .. (3.4,2.6) -- (0,2.6) -- cycle;
\draw[acc, very thick] (1,0.6) .. controls (2.0,1.0) and (2.6,1.9) .. (3.4,2.6);
\draw[black] (3.4,0) -- (3.4,2.6) -- (0,2.6);
\draw[black, dashed] (1,0) -- (1,0.6) -- (0,0.6);
\draw[->] (-0.15,0) -- (4.0,0) node[right, font=\footnotesize] {$f$};
\draw[->] (0,-0.15) -- (0,3.0) node[above, font=\footnotesize] {$g$};
\node[acc, font=\footnotesize] at (2.3,0.55) {$\int g\,df$};
\node[sec, font=\footnotesize] at (1.0,1.9) {$\int f\,dg$};
\end{tikzpicture}
$$

> **Worked example (Parts on $x e^x$).** With $f(x) = x$ and $g'(x) = e^x$,
> $$
> \int_0^1 x\,e^x\,\d x = \big[x e^x\big]_0^1 - \int_0^1 e^x\,\d x = e - (e - 1) = 1,
> $$
> replacing the awkward integrand $x e^x$ with the elementary $e^x$.

## Change of variables

Substitution is the chain rule read backwards through the integral.

> **Theorem (Change of variables).** Let $g : [a,b] \to \mathbb{R}$ be
> continuously differentiable, $f : [c,d] \to \mathbb{R}$ continuous, and
> $g([a,b]) \subseteq [c,d]$. Then
> $$
> \int_a^b f\big(g(x)\big)\, g'(x)\, \d x = \int_{g(a)}^{g(b)} f(u)\, \d u.
> $$

> **Proof.** Set $F(y) = \int_{g(a)}^y f$. The differentiation form gives
> $F' = f$, and the chain rule gives $(F \circ g)'(x) = f(g(x))\,g'(x)$; applying
> the evaluation form to $F \circ g$ yields the identity.[^lebl-53]

> **Worked example (Two substitutions).** With $u = g(x) = x^2$,
> $$
> \int_0^{\sqrt{\pi}} x \cos(x^2)\, \d x = \frac12 \int_0^{\pi} \cos u\, \d u
> = \frac{\sin \pi - \sin 0}{2} = 0.
> $$
> A second example folds the substitution and evaluation steps together. With
> $u = g(x) = 1 + x^2$, $g'(x) = 2x$,
> $$
> \int_0^1 \frac{2x}{1 + x^2}\, \d x = \int_1^2 \frac{1}{u}\, \d u = \ln 2 - \ln 1 = \ln 2.
> $$

The hypotheses carry weight: $\int_{-1}^{1} \tfrac{\ln|x|}{x}\,\d x$ cannot be
attacked by $u = \ln|x|$, because the integrand is unbounded and not even defined
at $0$, so the substitution manipulates symbols that carry no meaning.[^lebl-53]

| Form | Statement | Reads |
| --- | --- | --- |
| Evaluation | $\int_a^b F' = F(b) - F(a)$ | integral of a derivative is net change |
| Differentiation | $\frac{\d}{\d x}\int_a^x f = f(x)$ | derivative of area is the integrand |
| By parts | $\int f g' = fg\big\rvert_a^b - \int f' g$ | product rule, integrated |
| Substitution | $\int f(g)g' = \int_{g(a)}^{g(b)} f$ | chain rule, integrated |

[^lebl-53]: **Lebl**, _Basic Analysis I_, §5.3 — the evaluation form (Thm. 5.3.1), the differentiation form with Lipschitz continuity of the area function (Thm. 5.3.3), the $|x|$ and constant-zero counterexamples, change of variables (Thm. 5.3.5), and the $\ln$/$\operatorname{erf}$ remarks.
[^shk-ftc]: **Shkoller**, _MAT125B Lecture Notes_, §1.11 — the fundamental theorem of calculus (Thm. 1.34), the non-differentiable area-function example, the antiderivative computation of $\int_0^1 x^2$, and integration by parts (Thm. 1.39).
