Chapter 4 · Integration: Riemann to Lebesgue

4.3 Functions of Bounded Variation

How far does a function travel up and down? Total variation, the classes of monotone and Lipschitz functions, the Jordan decomposition $f=g-h$, the continuous functions $x^a\sin x^{-b}$ that wiggle too much, rectifiable curves and a first look at the Riemann–Stieltjes integral $\int f\,d\alpha$.

Watch the value $f(x)$ as $x$ runs from $a$ to $b$ and imagine it as a point moving on a vertical line. The displacement is $f(b)-f(a)$; the distance travelled — what an odometer would show — adds up every rise and every fall. That distance is the total variation of $f$. For a monotone function it equals $|f(b)-f(a)|$; for $\cos x$ on $[0,2\pi]$ it is $4$ although the displacement is $0$; and for the continuous function $x\sin\frac1x$ it is infinite, because the oscillations near $0$ shrink too slowly for their heights to have a finite sum. Functions with finite total variation — functions of bounded variation — were introduced by Camille Jordan in 1881 while studying Fourier series: the Dirichlet–Jordan theorem says that the Fourier series of a $2\pi$-periodic function of bounded variation converges at every point $x$ to $\tfrac12\big(f(x^+)+f(x^-)\big)$. The same class appears when we ask which curves have a finite length (exactly those whose coordinates have bounded variation), and when we integrate one function against another, $\int f\,d\alpha$, as Stieltjes did in 1894 — today the language of expectations $\mathbb{E}[g(X)]=\int g\,dF$ in probability, where $F$ may have both a density and jumps.

The central result is Jordan's theorem: a function has bounded variation if and only if it is the difference of two increasing functions. Everything we know about monotone functions (§3.2) — one-sided limits everywhere, countably many jumps, Riemann integrability — therefore transfers at once. CSIR NET examines this section in two ways. Part B asks for the total variation of a concrete function (a polynomial, a trigonometric function, a step function, $x-\lfloor x\rfloor$) or for a Riemann–Stieltjes integral with a floor-function integrator. Part C asks "which of these functions are of bounded variation?" and "which properties does every BV function have?" — and the decisive counterexamples are always the family $x^a\sin(x^{-b})$, the composite $|x\sin\frac1x|$, and the gap between "continuous" or "differentiable" and "bounded variation". This section gives you all of them with proofs.

Total Variation

Throughout, $P=\{x_0,x_1,\dots,x_n\}$ with $a=x_0\lt x_1\lt\cdots\lt x_n=b$ is a partition of $[a,b]$ (Definition 4.1), and $\Delta f_k=f(x_k)-f(x_{k-1})$. No continuity or boundedness of $f$ is assumed in advance.

📘 Definition 4.11 — Total variation; functions of bounded variation

For $f:[a,b]\to\mathbb{R}$ and a partition $P$ of $[a,b]$, the variation of $f$ over $P$ is

$$V(f,P)=\sum_{k=1}^{n}\big|f(x_k)-f(x_{k-1})\big|.$$

The total variation of $f$ on $[a,b]$ is

$$V_a^b(f)=\sup_{P}V(f,P)\in[0,\infty],$$

the supremum over all partitions of $[a,b]$. If $V_a^b(f)\lt\infty$ we say $f$ is of bounded variation on $[a,b]$ and write $f\in\mathrm{BV}[a,b]$. We put $V_a^a(f)=0$. Geometrically, $V(f,P)$ is the total vertical movement along the polygon inscribed in the graph at the points of $P$.

📐 Theorem 4.20 — Basic properties of the variation

Let $f,g:[a,b]\to\mathbb{R}$ and $c\in\mathbb{R}$.

  1. Refinement: if $P\subseteq P^*$ then $V(f,P)\le V(f,P^*)$.
  2. Displacement is at most distance: if $a\le x\lt y\le b$ then $|f(y)-f(x)|\le V_x^y(f)\le V_a^b(f)$.
  3. $V_a^b(f)=0$ if and only if $f$ is constant on $[a,b]$.
  4. Linearity bounds: $V_a^b(f+g)\le V_a^b(f)+V_a^b(g)$ and $V_a^b(cf)=|c|\,V_a^b(f)$. Hence $\mathrm{BV}[a,b]$ is a vector space.

Proof. (1) By induction it suffices to add one point $y$ with $x_{k-1}\lt y\lt x_k$. Only the $k$-th term changes: $|f(x_k)-f(x_{k-1})|$ is replaced by $|f(y)-f(x_{k-1})|+|f(x_k)-f(y)|$, which is at least as large by the triangle inequality.

(2) $\{x,y\}$ is a partition of $[x,y]$, so $|f(y)-f(x)|\le V_x^y(f)$. If $Q$ is any partition of $[x,y]$, then $Q\cup\{a,b\}$ is a partition of $[a,b]$ whose variation contains all the terms of $V(f,Q)$ (and possibly two more), so $V(f,Q)\le V_a^b(f)$; take the supremum over $Q$.

(3) If $f$ is constant, every term is $0$. If $V_a^b(f)=0$, then by (2) $|f(x)-f(a)|\le V_a^b(f)=0$ for every $x$.

(4) Termwise, $|\Delta(f+g)_k|\le|\Delta f_k|+|\Delta g_k|$, so $V(f+g,P)\le V(f,P)+V(g,P)\le V_a^b(f)+V_a^b(g)$; take the supremum over $P$. And $V(cf,P)=|c|\,V(f,P)$ for every $P$. ∎

📐 Theorem 4.21 — Additivity over intervals
If $a\lt c\lt b$, then $V_a^b(f)=V_a^c(f)+V_c^b(f)$ (as an equation in $[0,\infty]$). In particular $f\in\mathrm{BV}[a,b]$ if and only if $f\in\mathrm{BV}[a,c]$ and $f\in\mathrm{BV}[c,b]$.

Proof. ($\le$) Let $P$ be a partition of $[a,b]$. The refinement $P\cup\{c\}$ splits into a partition $P_1$ of $[a,c]$ and a partition $P_2$ of $[c,b]$, and by Theorem 4.20(1), $$\begin{aligned}V(f,P)&\le V(f,P\cup\{c\})\\&=V(f,P_1)+V(f,P_2)\\&\le V_a^c(f)+V_c^b(f).\end{aligned}$$ Take the supremum over $P$. ($\ge$) If $P_1$, $P_2$ are partitions of $[a,c]$ and $[c,b]$, then $P_1\cup P_2$ is a partition of $[a,b]$ and $V(f,P_1)+V(f,P_2)=V(f,P_1\cup P_2)\le V_a^b(f)$. Taking the supremum over $P_1$ and then over $P_2$ gives $V_a^c(f)+V_c^b(f)\le V_a^b(f)$. ∎

📐 Theorem 4.22 — Monotone and Lipschitz functions have bounded variation
  1. If $f$ is monotone on $[a,b]$, then $V_a^b(f)=|f(b)-f(a)|$.
  2. If $f$ is Lipschitz on $[a,b]$, $|f(x)-f(y)|\le K|x-y|$, then $V_a^b(f)\le K(b-a)$.
  3. If $f$ is continuous on $[a,b]$, differentiable on $(a,b)$ and $|f'|\le K$ there, then $V_a^b(f)\le K(b-a)$.
  4. Piecewise monotone functions: if $a=c_0\lt c_1\lt\cdots\lt c_m=b$ and $f$ is monotone on each closed interval $[c_{i-1},c_i]$, then $$V_a^b(f)=\sum_{i=1}^m\big|f(c_i)-f(c_{i-1})\big|.$$

Proof. (1) If $f$ is increasing, every $\Delta f_k\ge0$, so $V(f,P)=\sum\Delta f_k=f(b)-f(a)$ for every partition — the sum telescopes. A decreasing $f$ is handled by $-f$. (2) $V(f,P)\le\sum K\Delta x_k=K(b-a)$. (3) By the mean value theorem $|f(x)-f(y)|=|f'(\xi)||x-y|\le K|x-y|$, so (2) applies. (4) Apply (1) on each $[c_{i-1},c_i]$ and add, using Theorem 4.21. ∎

So $\sqrt x$ on $[0,1]$ (monotone, not Lipschitz) and $|x|$ on $[-1,1]$ (Lipschitz, not differentiable) are both of bounded variation. When the derivative exists everywhere and is integrable we can say exactly what the variation is.

📐 Theorem 4.23 — The variation of a function with integrable derivative
Let $f$ be differentiable at every point of $[a,b]$ (one-sided at the end points) with $f'\in\mathcal{R}[a,b]$. Then $f\in\mathrm{BV}[a,b]$ and $$V_a^b(f)=\int_a^b|f'(x)|\,dx.$$

Proof. First, $|f'|$ is Riemann integrable: it is bounded, and it is continuous wherever $f'$ is, so its discontinuities form a subset of those of $f'$ — a null set; Lebesgue's criterion (§4.1) applies. Let $I=\int_a^b|f'|$ and $\varepsilon\gt0$. By Theorem 4.3 there is $\delta\gt0$ such that every Riemann sum of $|f'|$ over a tagged partition of mesh $\lt\delta$ lies within $\varepsilon$ of $I$.

Now let $P$ be any partition and let $P^*\supseteq P$ be a refinement with $\|P^*\|\lt\delta$. On each subinterval of $P^*$ the function $f$ is continuous and differentiable, so the mean value theorem gives $\xi_k\in(x_{k-1},x_k)$ with $f(x_k)-f(x_{k-1})=f'(\xi_k)\Delta x_k$. Hence $$V(f,P^*)=\sum_k|f'(\xi_k)|\,\Delta x_k=S(|f'|,P^*,\xi),$$ a Riemann sum of $|f'|$ of mesh $\lt\delta$, so $|V(f,P^*)-I|\lt\varepsilon$. By Theorem 4.20(1), $V(f,P)\le V(f,P^*)\lt I+\varepsilon$; thus $V_a^b(f)\le I+\varepsilon$. Also $V_a^b(f)\ge V(f,P^*)\gt I-\varepsilon$. Since $\varepsilon$ is arbitrary, $V_a^b(f)=I$. ∎

The hypothesis $f'\in\mathcal{R}[a,b]$ cannot be weakened to "$f$ is differentiable": $x^2\sin(1/x^2)$ is differentiable on $[0,1]$ and not of bounded variation (Theorem 4.25 below). For $C^1$ functions, or functions that are $C^1$ on finitely many pieces, the theorem and Theorem 4.21 give $V_a^b(f)=\int_a^b|f'|$ directly.

🧭 Problem-solving strategy — computing a total variation
  1. Split $[a,b]$ at the turning points of $f$ (where $f'$ changes sign) and at its discontinuities. Variation is additive (Theorem 4.21).
  2. Continuous monotone pieces contribute $|f(c_i)-f(c_{i-1})|$ (Theorem 4.22(4)). Equivalently, for piecewise $C^1$ functions, $V=\int|f'|$.
  3. Discontinuities. If $f$ is monotone on $(c,d)$, then $V_c^d(f)=|f(c^+)-f(c)|$ $+\,|f(d^-)-f(c^+)|$ $+\,|f(d)-f(d^-)|$. So an interior discontinuity at $c$ costs $|f(c)-f(c^-)|+|f(c^+)-f(c)|$ — the value $f(c)$ matters, and a spike is counted twice. At the end points only one side exists: $|f(a^+)-f(a)|$ and $|f(b)-f(b^-)|$.
  4. To prove $V=\infty$, exhibit partitions through the peaks and troughs along which $V(f,P)\to\infty$ (Theorem 4.25).
  5. Sanity check: $V_a^b(f)\ge|f(b)-f(a)|$, with equality if and only if $f$ is monotone (Exercise IV.9).
✏️ Example 1 — Computing total variations
(a) Find $V_{-2}^{3}(f)$ for $f(x)=x^3-3x$. (b) Let $g:[0,2]\to\mathbb{R}$, $g(x)=x$ for $0\le x\lt1$, $g(1)=3$, $g(x)=x-2$ for $1\lt x\le2$. Find $V_0^2(g)$ directly from the definition.
(a) Turning points $f'(x)=3(x^2-1)$ vanishes at $\pm1$: $f$ increases on $[-2,-1]$, decreases on $[-1,1]$, increases on $[1,3]$. The values are $f(-2)=-2$, $f(-1)=2$, $f(1)=-2$, $f(3)=18$.
(a) Add By Theorem 4.22(4), $V_{-2}^3(f)=|2-(-2)|+|-2-2|+|18-(-2)|=4+4+20=28$. (Check: $\int_{-2}^3|3x^2-3|\,dx=4+4+20$, Theorem 4.23. The displacement is only $f(3)-f(-2)=20$.)
(b) On $[0,1]$ Every partition can be refined to contain $1$ (Theorem 4.20(1)). For a partition $0=x_0\lt\cdots\lt x_m=1$ of $[0,1]$ the sum is $\sum_{k\lt m}(x_k-x_{k-1})+|3-x_{m-1}|=x_{m-1}+3-x_{m-1}=3$. So $V_0^1(g)=3$: a rise of $1$ and a jump of $2$ up to the value $3$.
(b) On $[1,2]$ For $1=y_0\lt y_1\lt\cdots\lt y_r=2$: the first term is $|(y_1-2)-3|=5-y_1$ and the rest telescope to $0-(y_1-2)=2-y_1$. The total $7-2y_1$ is less than $5$ but approaches $5$ as $y_1\to1^+$. So $V_1^2(g)=5$ (supremum, not maximum): a fall of $4$ from $3$ to $g(1^+)=-1$ and a rise of $1$.
Answer $V_0^2(g)=3+5=8$, in agreement with step 3 of the strategy: $1+(2+4)+1$. If $g(1)$ were changed to $1$, the spike would disappear and $V_0^2$ would drop to $1+2+1=4$.
📐 Theorem 4.24 — BV functions are bounded; the algebra of BV functions

Let $f,g\in\mathrm{BV}[a,b]$.

  1. $|f(x)|\le|f(a)|+V_a^b(f)$ for all $x\in[a,b]$; in particular $f$ is bounded.
  2. $fg\in\mathrm{BV}[a,b]$ and $V_a^b(fg)\le\|g\|_\infty V_a^b(f)+\|f\|_\infty V_a^b(g)$.
  3. If $|f(x)|\ge c\gt0$ on $[a,b]$, then $1/f\in\mathrm{BV}[a,b]$ and $V_a^b(1/f)\le V_a^b(f)/c^2$.
  4. If $\varphi$ is Lipschitz with constant $K$ on an interval containing $f([a,b])$, then $\varphi\circ f\in\mathrm{BV}[a,b]$ and $V_a^b(\varphi\circ f)\le K\,V_a^b(f)$. In particular $|f|$, $f^+=\max(f,0)$ and $f^2$ are of bounded variation.

Proof. (1) By Theorem 4.20(2), $|f(x)-f(a)|\le V_a^b(f)$. (2) Write $$\begin{aligned}&f(x_k)g(x_k)-f(x_{k-1})g(x_{k-1})\\&\quad=f(x_k)\,\Delta g_k+g(x_{k-1})\,\Delta f_k,\end{aligned}$$ so $|\Delta(fg)_k|\le\|f\|_\infty|\Delta g_k|+\|g\|_\infty|\Delta f_k|$ (both sup norms are finite by (1)); sum and take the supremum. (3) $\left|\frac1{f(x_k)}-\frac1{f(x_{k-1})}\right|=\frac{|\Delta f_k|}{|f(x_k)f(x_{k-1})|}\le\frac{|\Delta f_k|}{c^2}$. (4) $|\varphi(f(x_k))-\varphi(f(x_{k-1}))|\le K|\Delta f_k|$. For the special cases, $t\mapsto|t|$ and $t\mapsto t^+$ are $1$-Lipschitz, and $t\mapsto t^2$ is $2M$-Lipschitz on $[-M,M]$, where $M=\|f\|_\infty$. ∎

Interactive 1 — Inscribed Polygons and the Variation Sums $V(f,P_n)$

Left: the graph of $f$ with the polygon through the points of the uniform partition $P_n$. $V(f,P_n)$ adds up the vertical rises and falls of that polygon. Right: $V(f,P_n)$ plotted against $\log_2 n$, with the true total variation as a dashed green line when it is finite. Press Play to refine. Watch three behaviours: the sums settle (the first two functions and $x^2\sin\frac1x$), they jump between two levels (the spike — is $x=1$ a partition point?), or they never stop growing ($x\sin\frac1x$ slowly, $\sqrt x\sin\frac1x$ faster).

n—
V(f, Pₙ)—
total variation—
polygon length—

Remark (continuous functions). For a continuous $f$, the uniform sums do converge to the total variation: $V(f,P)\to V_a^b(f)$ as $\|P\|\to0$, also when $V_a^b(f)=\infty$. Indeed, given a partition $P_0$ with $m$ interior points and $V(f,P_0)\gt V_a^b(f)-\varepsilon$ (or $\gt M$, in the infinite case), choose $\delta$ by uniform continuity with $|f(x)-f(y)|\lt\varepsilon/m$ for $|x-y|\lt\delta$. Adding one point $y\in(x_{k-1},x_k)$ to a partition increases its variation by $|f(y)-f(x_{k-1})|+|f(x_k)-f(y)|$ $-\,|f(x_k)-f(x_{k-1})|$, which is at most $2|f(y)-f(x_{k-1})|$ and so is $\lt2\varepsilon/m$ when $\|P\|\lt\delta$. Hence $V(f,P)\ge V(f,P\cup P_0)-2\varepsilon\ge V(f,P_0)-2\varepsilon$. The spike in Interactive 1 shows that continuity is needed: for odd $n$ the uniform sums equal $4-\frac4n$ and never approach $V_0^2(g)=8$.

Continuous Functions of Unbounded Variation

Bounded variation is a strong condition: it rules out oscillation whose amplitudes are not summable, however small and however smooth the oscillation is. The standard family of examples settles almost every CSIR question on the subject.

📐 Theorem 4.25 — The family $x^a\sin(x^{-b})$
Let $a\gt0$, $b\gt0$ and $f(x)=x^a\sin(x^{-b})$ for $0\lt x\le1$, $f(0)=0$ (the same holds with $\cos$ in place of $\sin$). Then $f$ is continuous on $[0,1]$, and $$f\in\mathrm{BV}[0,1]\iff a\gt b.$$ When $a\gt b$, $V_0^1(f)\le1+\dfrac{a}{a-b}$.

Proof. Continuity. $|f(x)|\le x^a\to0$ as $x\to0^+$, and $f$ is continuous on $(0,1]$ as a composite of continuous functions.

Not BV when $a\le b$. Let $t_k=\big((k+\tfrac12)\pi\big)^{-1/b}$ for $k\ge0$. These points decrease to $0$, lie in $(0,1)$ (as $\tfrac\pi2\gt1$), and $\sin(t_k^{-b})=\sin\big((k+\tfrac12)\pi\big)=(-1)^k$, so $f(t_k)=(-1)^kt_k^a$: consecutive values have opposite signs. For the partition $0\lt t_n\lt t_{n-1}\lt\cdots\lt t_0\lt1$, $$\begin{aligned}V_0^1(f)&\ge\sum_{k=0}^{n-1}|f(t_k)-f(t_{k+1})|\\&=\sum_{k=0}^{n-1}\big(t_k^a+t_{k+1}^a\big)\\&\ge\sum_{k=0}^{n-1}\Big(\big(k+\tfrac12\big)\pi\Big)^{-a/b}.\end{aligned}$$ Since $a/b\le1$ and $(k+\frac12)\pi\ge1$, each term is at least $\frac{1}{(k+\frac12)\pi}$, and the harmonic-type series $\sum\frac1{(k+\frac12)\pi}$ diverges. So $V_0^1(f)=\infty$.

BV when $a\gt b$. On $(0,1]$, $f$ is $C^1$ with $$f'(x)=a x^{a-1}\sin(x^{-b})-b\,x^{a-b-1}\cos(x^{-b}),$$ so $|f'(x)|\le h(x):=a x^{a-1}+b\,x^{a-b-1}$. Both exponents exceed $-1$ (as $a\gt0$ and $a-b\gt0$), so the improper integral $\int_0^1h=1+\frac{b}{a-b}=\frac{a}{a-b}$ converges (§4.2). Let $0=x_0\lt x_1\lt\cdots\lt x_n=1$. The first term is $|f(x_1)-f(0)|\le x_1^a\le1$. For $k\ge2$, $f$ is $C^1$ on $[x_{k-1},x_k]$, so $|f(x_k)-f(x_{k-1})|=\left|\int_{x_{k-1}}^{x_k}f'\right|\le\int_{x_{k-1}}^{x_k}h$. Adding, $V(f,P)\le1+\int_{x_1}^1h\le1+\frac a{a-b}$. ∎

The two headline cases: $x\sin\frac1x$ ($a=b=1$) is continuous — even uniformly continuous — on $[0,1]$ but not of bounded variation; $x^2\sin\frac1x$ ($a=2$, $b=1$) is of bounded variation with $V_0^1\le3$. In fact $x^2\sin\frac1x$ is differentiable everywhere with $|f'(x)|=|2x\sin\frac1x-\cos\frac1x|\le3$ and $f'(0)=0$, so Theorem 4.22(3) gives the same bound; yet $f'$ is not continuous at $0$, so $f$ is BV and differentiable without being $C^1$. By contrast $x^2\sin(1/x^2)$ ($a=b=2$) is differentiable everywhere but not of bounded variation — its derivative $2x\sin(x^{-2})-\frac2x\cos(x^{-2})$ is unbounded near $0$.

✏️ Example 2 — Oscillating functions: bounded variation or not?
Decide whether each function is of bounded variation on $[0,1]$ (each is $0$ at $x=0$): (a) $f_1(x)=x^{3/2}\cos\frac1x$; (b) $f_2(x)=\sqrt x\,\sin\frac1{\sqrt x}$; (c) the alternating staircase $s(x)=\frac{(-1)^n}{n}$ for $\frac1{n+1}\lt x\le\frac1n$; (d) the staircase $u(x)=\frac{(-1)^n}{n^2}$ for $\frac1{n+1}\lt x\le\frac1n$. For (d) find $V_0^1(u)$.
(a) BV Theorem 4.25 with $a=\frac32\gt b=1$ (cosine version); $V_0^1(f_1)\le1+\frac{3/2}{1/2}=4$.
(b) Not BV Here $a=b=\frac12$, so $a\le b$. Concretely, at $x_k=\big((k+\frac12)\pi\big)^{-2}$ the values are $\pm\frac1{(k+\frac12)\pi}$ with alternating signs, and the sum of consecutive differences is a divergent harmonic-type series.
(c) Not BV $s$ is constant on each $(\frac1{n+1},\frac1n]$ and jumps at $x=\frac1n$ ($n\ge2$) from $\frac{(-1)^n}{n}$ to $\frac{(-1)^{n-1}}{n-1}$, a jump of $\frac1n+\frac1{n-1}$. A partition with one point in each of the first $N$ steps gives $V\ge\sum_{n=2}^{N}\left(\frac1n+\frac1{n-1}\right)\to\infty$. Note that $s$ is continuous at $0$ (on the $n$-th step $|s(x)|=\frac1n\le\frac2{n+1}\lt2x$) and has only countably many discontinuities, all jumps.
(d) BV The same partitions give the jumps $\frac1{n^2}+\frac1{(n-1)^2}$, whose sum over $n\ge2$ is $\left(\frac{\pi^2}6-1\right)+\frac{\pi^2}6=\frac{\pi^2}3-1$. Upper bound: for a partition $0=x_0\lt x_1\lt\cdots$, the first term $|u(x_1)-u(0)|=|u(x_1)|$ is at most the sum of the jumps below $x_1$ (the values $u(x)$ telescope down to $0$), and on $[x_1,1]$ the step function $u$ has variation at most the sum of its jumps there. Hence $V_0^1(u)=\frac{\pi^2}3-1\approx2.2899$.
Lesson Bounded variation is decided by summability of the oscillation amplitudes, not by continuity or by the size of the values: $\sum\frac1n=\infty$, $\sum\frac1{n^2}\lt\infty$.
✏️ Example 3 — Prove or disprove
(a) Every differentiable function on $[0,1]$ is of bounded variation. (b) If $f,g\in\mathrm{BV}[0,1]$ and $f([0,1])\subseteq[0,1]$, then $g\circ f\in\mathrm{BV}[0,1]$. (c) If $f^2\in\mathrm{BV}[0,1]$, then $f\in\mathrm{BV}[0,1]$. (d) If $f$ is bounded on $[0,1]$ and $f\in\mathrm{BV}[\varepsilon,1]$ for every $\varepsilon\in(0,1)$, then $f\in\mathrm{BV}[0,1]$. (e) A uniform limit of functions of bounded variation is of bounded variation.
(a) False $x^2\sin(x^{-2})$ (with value $0$ at $0$) is differentiable on $[0,1]$ — at $0$ the difference quotient $x\sin(x^{-2})\to0$ — but it is not BV by Theorem 4.25 with $a=b=2$. What is true: differentiable with bounded derivative $\Rightarrow$ BV.
(b) False Let $f(x)=x^2\sin^2\frac1x$ ($f(0)=0$) and $g(t)=\sqrt t$. Then $f$ maps $[0,1]$ into $[0,1]$ and $f'(x)=2x\sin^2\frac1x-\sin\frac2x$ for $x\ne0$, $f'(0)=0$, so $|f'|\le3$ and $f\in\mathrm{BV}$; $g$ is increasing, so $g\in\mathrm{BV}[0,1]$. But $g\circ f=x\left|\sin\frac1x\right|$, whose values at $\frac1{k\pi}$ and $\frac1{(k+\frac12)\pi}$ are $0$ and $\frac1{(k+\frac12)\pi}$, so its variation is at least $\sum_k\frac2{(k+\frac12)\pi}=\infty$. The composite is BV when the outer function is Lipschitz (Theorem 4.24(4)); $\sqrt t$ is not Lipschitz near $0$.
(c) False $f=1$ on the rationals and $-1$ on the irrationals: $f^2\equiv1$ is constant, while alternating $2N$ rational and irrational points gives $V(f,P)\ge2(2N-1)$, so $V_0^1(f)=\infty$. The same example shows that $|f|\in\mathrm{BV}$ does not imply $f\in\mathrm{BV}$.
(d) False $\sin\frac1x$ (value $0$ at $0$) is bounded and $C^1$ on each $[\varepsilon,1]$, hence BV there; but it takes the values $\pm1$ at $t_k=\frac1{(k+\frac12)\pi}$, so $V_0^1=\infty$. (It is true if $V_\varepsilon^1(f)\le M$ for all $\varepsilon$: then $V(f,P)\le|f(x_1)-f(0)|+M\le2\|f\|_\infty+M$ for every partition — for instance when $f$ is also monotone near $0$.)
(e) False Let $f_n(x)=x\sin\frac1x$ for $x\ge\frac1{n\pi}$ and $f_n(x)=0$ for $x\lt\frac1{n\pi}$. Each $f_n$ is continuous ($\sin(n\pi)=0$) and $C^1$ on two pieces, so BV; and $|f_n(x)-x\sin\frac1x|\le\frac1{n\pi}$ for all $x$, so $f_n\to x\sin\frac1x$ uniformly, a function that is not BV. What survives in the limit is a uniform bound: if $V(f_n)\le M$ for all $n$ and $f_n\to f$ pointwise, then $V(f)\le M$ (Exercise IV.7).

The Variation Function and the Jordan Decomposition

For $f\in\mathrm{BV}[a,b]$ the variation over $[a,x]$ is a function of $x$; it records the distance travelled so far, just as an odometer does. Splitting that distance into the part travelled upwards and the part travelled downwards gives the Jordan decomposition.

📘 Definition 4.12 — Variation function; positive and negative variation

Let $f\in\mathrm{BV}[a,b]$. The variation function of $f$ is $v(x)=V_a^x(f)$ for $a\le x\le b$ (so $v(a)=0$ and $v(b)=V_a^b(f)$). The positive and negative variation functions are

$$v^+(x)=\tfrac12\big(v(x)+f(x)-f(a)\big),$$ $$v^-(x)=\tfrac12\big(v(x)-f(x)+f(a)\big).$$

Thus $v=v^++v^-$ and $f=f(a)+v^+-v^-$. For a partition $Q$ of $[a,x]$, $\sum_k(\Delta f_k)^+=\frac12\big(V(f,Q)+f(x)-f(a)\big)$, so $v^+(x)$ is the supremum of the total rise of $f$ over partitions of $[a,x]$, and $v^-(x)$ the supremum of its total fall.

📐 Theorem 4.26 — Jordan decomposition theorem
A function $f:[a,b]\to\mathbb{R}$ is of bounded variation if and only if $f=g-h$ for two increasing functions $g,h$ on $[a,b]$. For $f\in\mathrm{BV}[a,b]$ the functions $v$, $v^+$, $v^-$ are increasing, so $$f=\big(f(a)+v^+\big)-v^-$$ is such a decomposition, and it is the most economical one: for every decomposition $f=g-h$ into increasing functions and all $x\lt y$, $g(y)-g(x)\ge v^+(y)-v^+(x)$ and $h(y)-h(x)\ge v^-(y)-v^-(x)$.

Proof. ($\Leftarrow$) If $f=g-h$ with $g,h$ increasing, then by Theorems 4.20(4) and 4.22(1), $V_a^b(f)\le V_a^b(g)+V_a^b(h)$ $=\big(g(b)-g(a)\big)+\big(h(b)-h(a)\big)\lt\infty$.

($\Rightarrow$) Let $f\in\mathrm{BV}[a,b]$ and $a\le x\lt y\le b$. By additivity (Theorem 4.21), $v(y)-v(x)=V_x^y(f)\ge0$, so $v$ is increasing. By Theorem 4.20(2), $V_x^y(f)\ge|f(y)-f(x)|$, so $$\begin{aligned}&\big(v(y)\pm f(y)\big)-\big(v(x)\pm f(x)\big)\\&\quad=V_x^y(f)\pm\big(f(y)-f(x)\big)\ge0.\end{aligned}$$ Hence $v+f$ and $v-f$ are increasing, and so are $v^\pm=\frac12(v\pm f\mp f(a))$. The identity $f=f(a)+v^+-v^-$ is algebra.

(Minimality) Let $f=g-h$ with $g,h$ increasing, and $Q$ a partition of $[x,y]$. Since $\Delta g_k\ge0$ and $\Delta h_k\ge0$, $(\Delta f_k)^+=(\Delta g_k-\Delta h_k)^+\le\Delta g_k$, so $\sum_k(\Delta f_k)^+\le g(y)-g(x)$. The supremum of the left side over $Q$ is $\frac12\big(V_x^y(f)+f(y)-f(x)\big)=v^+(y)-v^+(x)$. The statement for $h$ follows in the same way from $(\Delta f_k)^-\le\Delta h_k$. ∎

The decomposition is not unique — adding the same increasing function to $g$ and $h$ gives another one; for instance $g+x$ and $h+x$ are strictly increasing. Because monotone functions are so well understood, the theorem has immediate consequences.

📐 Theorem 4.27 — Regularity of functions of bounded variation

Let $f\in\mathrm{BV}[a,b]$.

  1. The one-sided limits $f(c^+)$ and $f(c^-)$ exist at every point (one-sided at $a$, $b$). Every discontinuity of $f$ is removable or a jump; $f$ has no discontinuities of the second kind.
  2. The set of discontinuities of $f$ is countable, and the sum of the jumps is controlled: summing over the discontinuities $c\in(a,b)$, $$\begin{aligned}&\sum_{c}\big(|f(c)-f(c^-)|\\&\quad+|f(c^+)-f(c)|\big)\le V_a^b(f).\end{aligned}$$
  3. $f$ is Riemann integrable on $[a,b]$.
  4. (Lebesgue's differentiation theorem — statement.) $f$ is differentiable at almost every point of $[a,b]$, i.e. outside a set of measure zero, and $f'$ is Lebesgue integrable (§4.5).

Proof. Write $f=g-h$ with $g,h$ increasing (Theorem 4.26). (1) Increasing functions have one-sided limits everywhere (§3.2, Theorem 3.18), hence so does their difference. (2) $f$ is continuous wherever both $g$ and $h$ are, and each of $g,h$ has only countably many discontinuities (§3.2, Theorem 3.19); a union of two countable sets is countable. For the jump estimate, take finitely many discontinuities $c_1\lt\cdots\lt c_r$ in $(a,b)$ and points $u_i\lt c_i\lt w_i$ close to $c_i$, all these points in increasing order; the partition $\{a,u_1,c_1,w_1,\dots,u_r,c_r,w_r,b\}$ has variation at least $\sum_i\big(|f(c_i)-f(u_i)|+|f(w_i)-f(c_i)|\big)$; let $u_i\to c_i^-$, $w_i\to c_i^+$, and then let $r$ grow. (3) Monotone functions are Riemann integrable (Theorem 4.4), and so are differences of integrable functions (Theorem 4.6). Alternatively: $f$ is bounded and its discontinuities form a countable, hence null, set; apply Lebesgue's criterion. (4) For monotone functions this is a deep theorem of Lebesgue (1904) that we only quote; it then holds for $g-h$ because a union of two null sets is null. ∎

Part (4) shows at once that a continuous nowhere-differentiable function, such as Weierstrass's function, is of unbounded variation on every interval. Next we see how the variation function inherits the continuity of $f$ — the key to "a continuous BV function is the difference of two continuous increasing functions".

📐 Theorem 4.28 — Jumps of the variation function
Let $f\in\mathrm{BV}[a,b]$ and $v(x)=V_a^x(f)$. For $a\le c\lt b$ and $a\lt d\le b$, $$v(c^+)-v(c)=|f(c^+)-f(c)|,$$ $$v(d)-v(d^-)=|f(d)-f(d^-)|.$$ Consequently $v$ is continuous (from the right, from the left) at a point exactly when $f$ is, and if $f$ is continuous on $[a,b]$, then $v$, $v^+$, $v^-$ are continuous and $f=\big(f(a)+v^+\big)-v^-$ is a difference of two continuous increasing functions.

Proof. We prove the right-hand statement; the left-hand one is symmetric. The limits exist by Theorem 4.27(1) ($v$ is increasing). For $c\lt x\le b$, $v(x)-v(c)=V_c^x(f)\ge|f(x)-f(c)|$; letting $x\to c^+$ gives $v(c^+)-v(c)\ge|f(c^+)-f(c)|$.

For the reverse inequality let $\varepsilon\gt0$ and choose $\delta\gt0$ with $|f(x)-f(c^+)|\lt\varepsilon$ for $c\lt x\lt c+\delta$. Choose a partition $c=x_0\lt x_1\lt\cdots\lt x_n=b$ of $[c,b]$ with $V(f,P)\gt V_c^b(f)-\varepsilon$; adding a point if necessary (Theorem 4.20(1)), we may assume $x_1\lt c+\delta$. Then $$\begin{aligned}V_c^b(f)-\varepsilon&\lt|f(x_1)-f(c)|+\sum_{k\ge2}|\Delta f_k|\\&\le|f(c^+)-f(c)|+\varepsilon+V_{x_1}^b(f).\end{aligned}$$ By additivity, $V_c^{x_1}(f)=V_c^b(f)-V_{x_1}^b(f)$ $\lt|f(c^+)-f(c)|+2\varepsilon$. Since $v$ is increasing, $v(c^+)-v(c)\le v(x_1)-v(c)$ $=V_c^{x_1}(f)\lt|f(c^+)-f(c)|+2\varepsilon$. As $\varepsilon$ is arbitrary, equality holds. If $f$ is continuous, every jump of $v$ is $0$, and $v^\pm=\frac12(v\pm f\mp f(a))$ are continuous too. ∎

✏️ Example 4 — Two Jordan decompositions
(a) Find $v$, $v^+$, $v^-$ for $f(x)=\cos x$ on $[0,2\pi]$ and write $f$ as a difference of two continuous, strictly increasing functions. (b) Find $v$, $v^+$, $v^-$ for the spike $g$ of Example 1(b) and check Theorem 4.28 at $x=1$.
(a) Variation $\cos$ decreases on $[0,\pi]$ and increases on $[\pi,2\pi]$. So $v(x)=1-\cos x$ on $[0,\pi]$, and $v(x)=2+(\cos x-\cos\pi)=3+\cos x$ on $[\pi,2\pi]$; $v(2\pi)=4$.
(a) Rise and fall With $f(0)=1$: on $[0,\pi]$, $v^+=\frac12(1-\cos x+\cos x-1)=0$ and $v^-=1-\cos x$; on $[\pi,2\pi]$, $v^+=\frac12(3+\cos x+\cos x-1)=1+\cos x$ and $v^-=2$. So $v^+$ grows only while $\cos$ rises, and $v^-$ only while it falls.
(a) Check On $[0,\pi]$: $1+0-(1-\cos x)=\cos x$; on $[\pi,2\pi]$: $1+(1+\cos x)-2=\cos x$. Strictly increasing continuous choice: $\cos x=\big(1+v^+(x)+x\big)-\big(v^-(x)+x\big)$.
(b) Variation From Example 1(b): $v(x)=x$ on $[0,1)$, $v(1)=V_0^1(g)=3$, and for $1\lt x\le2$, $v(x)=3+V_1^x(g)=3+4+(x-1)=x+6$ (fall of $4$, then rise of $x-1$); $v(2)=8$.
(b) Rise and fall With $g(0)=0$: $v^+=\frac12(v+g)$ equals $x$ on $[0,1)$, $3$ at $1$, $x+2$ on $(1,2]$; $v^-=\frac12(v-g)$ equals $0$ on $[0,1]$ and $4$ on $(1,2]$. Check: $(x+2)-4=x-2=g(x)$ on $(1,2]$.
(b) Theorem 4.28 $v(1)-v(1^-)=3-1=2=|g(1)-g(1^-)|$, and $v(1^+)-v(1)=7-3=4=|g(1^+)-g(1)|$. The upward jump of $g$ is recorded by $v^+$, the downward one by $v^-$.
Interactive 2 — The Odometer $v$ and the Jordan Decomposition

A tracer runs from $a$ to $b$. Behind it the page draws the variation function $v$ (purple, the odometer), the positive variation $v^+$ (green, total climb so far) and the negative variation $v^-$ (red, total descent so far), all computed on a fine grid. While $f$ rises, $v^+$ climbs at the same rate and $v^-$ is flat; while $f$ falls, the roles swap. For the spike, watch $v^+$ jump by $2$ at $x=1$ and $v^-$ jump by $4$ just after it. The last readout checks the Jordan identity at the tracer.

x—
f(x)—
v(x)—
v⁺(x)—
v⁻(x)—
f(a) + v⁺ − v⁻—

Rectifiable Curves

The length of a curve is defined, as Archimedes measured the circle, by inscribed polygons. Bounded variation is exactly what makes the lengths of those polygons bounded.

📘 Definition 4.13 — Length of a curve; rectifiable curves
A curve in $\mathbb{R}^n$ is a continuous map $\gamma:[a,b]\to\mathbb{R}^n$. Its length is $$L(\gamma)=\sup_P\sum_{k=1}^{m}\big|\gamma(t_k)-\gamma(t_{k-1})\big|\in[0,\infty],$$ the supremum over partitions $P=\{t_0,\dots,t_m\}$ of $[a,b]$, where $|\cdot|$ is the Euclidean norm. The curve is rectifiable if $L(\gamma)\lt\infty$. The graph of $f:[a,b]\to\mathbb{R}$ is the curve $t\mapsto(t,f(t))$ (here we allow $f$ to be discontinuous: the definition of the sum makes sense for any map). As for variation, refining a partition can only increase the polygonal length, and $L$ is additive over subintervals.
📐 Theorem 4.29 — Rectifiable means coordinates of bounded variation

A curve $\gamma=(\gamma_1,\dots,\gamma_n):[a,b]\to\mathbb{R}^n$ is rectifiable if and only if every coordinate $\gamma_i\in\mathrm{BV}[a,b]$, and then

$$\max_iV_a^b(\gamma_i)\le L(\gamma)\le\sum_{i=1}^nV_a^b(\gamma_i).$$

In particular the graph of $f:[a,b]\to\mathbb{R}$ has finite length if and only if $f\in\mathrm{BV}[a,b]$, and $\sqrt{(b-a)^2+V_a^b(f)^2}\le L\le(b-a)+V_a^b(f)$.

Proof. For $u\in\mathbb{R}^n$, $|u_i|\le|u|$ and $|u|\le|u_1|+\cdots+|u_n|$. Applying this to $u=\gamma(t_k)-\gamma(t_{k-1})$ and summing over $k$ gives $V(\gamma_i,P)\le\sum_k|\gamma(t_k)-\gamma(t_{k-1})|\le\sum_iV(\gamma_i,P)$ for every partition; take suprema. For the graph, $\gamma_1(t)=t$ has variation $b-a$, which gives the upper bound. For the sharper lower bound apply the triangle inequality in $\mathbb{R}^2$ to the vectors $(\Delta x_k,|\Delta f_k|)$: $$\begin{aligned}\sum_k\sqrt{\Delta x_k^2+\Delta f_k^2}&\ge\Big|\Big(\sum_k\Delta x_k,\ \sum_k|\Delta f_k|\Big)\Big|\\&=\sqrt{(b-a)^2+V(f,P)^2},\end{aligned}$$ and take the supremum over $P$. ∎

📐 Theorem 4.30 — Arc length of a $C^1$ curve
If $\gamma:[a,b]\to\mathbb{R}^n$ is continuously differentiable, then $\gamma$ is rectifiable and $$L(\gamma)=\int_a^b|\gamma'(t)|\,dt.$$ For the graph of $f\in C^1[a,b]$ this is $L=\int_a^b\sqrt{1+f'(x)^2}\,dx$.

Proof. We use $\left|\int_s^t\varphi\right|\le\int_s^t|\varphi|$ for a continuous $\varphi:[s,t]\to\mathbb{R}^n$ (integrated coordinatewise): if $u=\int_s^t\varphi\ne0$, then by Cauchy–Schwarz $|u|^2=u\cdot\int\varphi=\int u\cdot\varphi\le|u|\int|\varphi|$.

($\le$) By the fundamental theorem of calculus in each coordinate, $\gamma(t_k)-\gamma(t_{k-1})=\int_{t_{k-1}}^{t_k}\gamma'$, so $|\gamma(t_k)-\gamma(t_{k-1})|\le\int_{t_{k-1}}^{t_k}|\gamma'|$; summing, every polygonal length is at most $\int_a^b|\gamma'|$.

($\ge$) Let $\varepsilon\gt0$. $\gamma'$ is uniformly continuous on $[a,b]$, so there is $\delta\gt0$ with $|\gamma'(s)-\gamma'(t)|\lt\varepsilon$ whenever $|s-t|\lt\delta$. Let $\|P\|\lt\delta$. Then $$\begin{aligned}&\gamma(t_k)-\gamma(t_{k-1})\\&\quad=\gamma'(t_k)\,\Delta t_k+\int_{t_{k-1}}^{t_k}\big(\gamma'(s)-\gamma'(t_k)\big)\,ds,\end{aligned}$$ and the last integral has norm at most $\varepsilon\Delta t_k$. Hence $|\gamma(t_k)-\gamma(t_{k-1})|\ge|\gamma'(t_k)|\Delta t_k-\varepsilon\Delta t_k$, and summing, $L(\gamma)\ge S(|\gamma'|,P,t)-\varepsilon(b-a)$, where $S$ is a Riemann sum of the continuous function $|\gamma'|$. Letting $\|P\|\to0$ (Theorem 4.3) gives $L(\gamma)\ge\int_a^b|\gamma'|-\varepsilon(b-a)$ for every $\varepsilon$. ∎

✏️ Example 5 — Lengths, finite and infinite
(a) Find the length of one arch of the cycloid $\gamma(t)=(t-\sin t,\,1-\cos t)$, $0\le t\le2\pi$. (b) Show that the graph of $x\sin\frac1x$ on $[0,1]$ has infinite length, while the graph of $x^2\sin\frac1x$ has finite length, and bound it. (c) Find the length of $\gamma(t)=(\cos t,\sin t)$, $0\le t\le4\pi$, and compare with its image.
(a) Speed $\gamma'(t)=(1-\cos t,\ \sin t)$, so $|\gamma'(t)|^2=2-2\cos t=4\sin^2\frac t2$ and $|\gamma'(t)|=2\sin\frac t2$ on $[0,2\pi]$ (where $\sin\frac t2\ge0$).
(a) Length $L=\int_0^{2\pi}2\sin\frac t2\,dt=\big[-4\cos\frac t2\big]_0^{2\pi}=4+4=8$ — four times the diameter of the rolling circle (Wren, 1658).
(b) By Theorem 4.29 the graph is rectifiable iff the function is BV. $x\sin\frac1x$ is not BV (Theorem 4.25, $a=b=1$): its graph is a bounded continuous curve of infinite length. $x^2\sin\frac1x$ is BV with $V_0^1\le3$, so its graph has length $L\le1+3=4$ and $L\ge\sqrt{1+V^2}\gt1$. (Numerically $V_0^1\approx1.0416$ and $L\approx1.469$.) Theorem 4.30 does not apply directly — the derivative is not continuous at $0$ — but Theorem 4.29 does not need derivatives.
(c) $|\gamma'(t)|=1$, so $L=4\pi$, twice the circumference: the curve runs round the unit circle twice. Length belongs to the parametrised curve, not to its image; it equals the "length of the image" when $\gamma$ is injective.

The Riemann–Stieltjes Integral

In a Riemann sum $\sum f(\xi_k)\Delta x_k$ each subinterval is weighted by its length. Stieltjes replaced the length $\Delta x_k$ by the increment $\Delta\alpha_k=\alpha(x_k)-\alpha(x_{k-1})$ of a second function $\alpha$, the integrator. If $\alpha$ is the distribution of mass along a rod, $\int x\,d\alpha$ is a moment; if $\alpha$ is a cumulative distribution function, $\int g\,d\alpha$ is an expectation — and $\alpha$ is allowed to jump, which puts point masses on the same footing as densities. We give a brief account; continuity of the integrand keeps everything simple.

📘 Definition 4.14 — The Riemann–Stieltjes integral

Let $\alpha$ be increasing on $[a,b]$ and $f$ bounded. For a partition $P$ put $\Delta\alpha_k=\alpha(x_k)-\alpha(x_{k-1})\ge0$, $M_k=\sup_{I_k}f$, $m_k=\inf_{I_k}f$, and

$$U(f,\alpha,P)=\sum_kM_k\,\Delta\alpha_k,$$ $$L(f,\alpha,P)=\sum_km_k\,\Delta\alpha_k.$$

If $\inf_PU(f,\alpha,P)=\sup_PL(f,\alpha,P)$, we write $f\in\mathcal{R}(\alpha)$ and call the common value the Riemann–Stieltjes integral $\int_a^bf\,d\alpha$. The sums $S(f,\alpha,P,\xi)=\sum_kf(\xi_k)\Delta\alpha_k$ (tags $\xi_k\in I_k$) are Riemann–Stieltjes sums; always $L\le S\le U$. The refinement lemma and Riemann's criterion (Theorems 4.1, 4.2) hold with the same proofs, $\Delta x_k$ replaced by $\Delta\alpha_k$; $\alpha(x)=x$ gives back §4.1.

If $\alpha\in\mathrm{BV}[a,b]$ and $f\in C[a,b]$, write $\alpha=\alpha_1-\alpha_2$ with $\alpha_1,\alpha_2$ increasing (Theorem 4.26) and define $\int_a^bf\,d\alpha=\int_a^bf\,d\alpha_1-\int_a^bf\,d\alpha_2$.

📐 Theorem 4.31 — Existence for continuous integrands
Let $f\in C[a,b]$ and $\alpha\in\mathrm{BV}[a,b]$. Then $\int_a^bf\,d\alpha$ exists, does not depend on the decomposition $\alpha=\alpha_1-\alpha_2$, and is the limit of the Riemann–Stieltjes sums: $$\lim_{\|P\|\to0}\sum_kf(\xi_k)\,\Delta\alpha_k=\int_a^bf\,d\alpha,$$ whatever the tags. It is linear in $f$ and in $\alpha$, additive over intervals ($\int_a^b=\int_a^c+\int_c^b$), and $$\left|\int_a^bf\,d\alpha\right|\le\|f\|_\infty\,V_a^b(\alpha).$$

Proof. First let $\alpha$ be increasing. Given $\eta\gt0$, uniform continuity of $f$ gives $\delta\gt0$ with $|f(x)-f(y)|\lt\eta$ for $|x-y|\lt\delta$. If $\|P\|\lt\delta$, then on each $I_k$ the extreme value theorem gives $M_k-m_k\lt\eta$, so $$\begin{aligned}U(f,\alpha,P)-L(f,\alpha,P)&\le\eta\sum_k\Delta\alpha_k\\&=\eta\big(\alpha(b)-\alpha(a)\big).\end{aligned}$$ By Riemann's criterion $f\in\mathcal{R}(\alpha)$; and both $\int f\,d\alpha$ and every Riemann–Stieltjes sum over $P$ lie in $[L(f,\alpha,P),U(f,\alpha,P)]$, so they differ by at most $\eta(\alpha(b)-\alpha(a))$. This proves the limit formula for increasing $\alpha$.

Riemann–Stieltjes sums are additive in $\alpha$ and in $f$; letting $\|P\|\to0$ gives linearity, e.g. $\int f\,d(\alpha_1+\beta_2)=\int f\,d\alpha_1+\int f\,d\beta_2$ for increasing integrators. If $\alpha_1-\alpha_2=\beta_1-\beta_2$ with all four increasing, then $\alpha_1+\beta_2=\beta_1+\alpha_2$, and integrating both sides shows $\int f\,d\alpha_1-\int f\,d\alpha_2=\int f\,d\beta_1-\int f\,d\beta_2$: the definition is independent of the decomposition. For $\alpha\in\mathrm{BV}$ the sums $S(f,\alpha,P,\xi)=S(f,\alpha_1,P,\xi)-S(f,\alpha_2,P,\xi)$ converge to $\int f\,d\alpha$. Additivity over intervals follows by using partitions that contain $c$. Finally $|S(f,\alpha,P,\xi)|\le\|f\|_\infty\sum_k|\Delta\alpha_k|\le\|f\|_\infty V_a^b(\alpha)$; let $\|P\|\to0$. ∎

📐 Theorem 4.32 — Evaluating Riemann–Stieltjes integrals

Let $f\in C[a,b]$.

  1. Smooth integrator: if $\alpha\in C^1[a,b]$, then $\displaystyle\int_a^bf\,d\alpha=\int_a^bf(x)\,\alpha'(x)\,dx$.
  2. Step integrator: if $a=c_0\lt c_1\lt\cdots\lt c_m=b$ and $\alpha$ is constant on each open interval $(c_{i-1},c_i)$, then $$\int_a^bf\,d\alpha=\sum_{i=0}^{m}f(c_i)\big(\alpha(c_i^+)-\alpha(c_i^-)\big),$$ with the conventions $\alpha(a^-)=\alpha(a)$ and $\alpha(b^+)=\alpha(b)$. In particular $\int_a^bf\,d\alpha=f(c)$ for the unit step $\alpha=\mathbf 1_{[c,b]}$, $a\lt c\lt b$.

By linearity, an integrator "smooth part + step part" contributes $\int f\alpha'\,dx$ plus a sum of point values weighted by the jumps.

Proof. (1) $\alpha$ is BV by Theorem 4.22(3), so by Theorem 4.31 the sums $\sum f(\xi_k)\Delta\alpha_k$ tend to $\int f\,d\alpha$ as $\|P\|\to0$. By the mean value theorem $\Delta\alpha_k=\alpha'(t_k)\Delta x_k$ for some $t_k\in(x_{k-1},x_k)$, so $$\begin{aligned}&\Big|\sum_kf(\xi_k)\Delta\alpha_k-\sum_kf(\xi_k)\alpha'(\xi_k)\Delta x_k\Big|\\&\quad\le\|f\|_\infty\sum_k|\alpha'(t_k)-\alpha'(\xi_k)|\,\Delta x_k\\&\quad\le\|f\|_\infty\,\omega(\|P\|)\,(b-a),\end{aligned}$$ where $\omega(\delta)=\sup\{|\alpha'(s)-\alpha'(t)|:|s-t|\le\delta\}\to0$ by uniform continuity of $\alpha'$. The second sum is a Riemann sum of the continuous $f\alpha'$, which tends to $\int_a^bf\alpha'$.

(2) $\alpha$ is BV (a step function with finitely many steps). Let $h\gt0$ be smaller than half of every gap $c_i-c_{i-1}$, and consider partitions containing the points $a+h$, $c_i\pm h$ ($0\lt i\lt m$) and $b-h$, but not the $c_i$ with $0\lt i\lt m$, with any further points added outside the intervals $(c_i-h,c_i+h)$ to make the mesh small. Every subinterval lying inside some $(c_{i-1},c_i)$ has $\Delta\alpha=0$. The remaining ones are $[a,a+h]$ with $\Delta\alpha=\alpha(a^+)-\alpha(a)$, $[c_i-h,c_i+h]$ with $\Delta\alpha=\alpha(c_i^+)-\alpha(c_i^-)$, and $[b-h,b]$ with $\Delta\alpha=\alpha(b)-\alpha(b^-)$. So each Riemann–Stieltjes sum equals $\sum_if(\xi_i)\big(\alpha(c_i^+)-\alpha(c_i^-)\big)$ with tags $\xi_i$ within $h$ of $c_i$; letting $h\to0$ and using continuity of $f$ gives the formula. ∎

📐 Theorem 4.33 — Integration by parts
Let $f\in C[a,b]$ and $\alpha\in\mathrm{BV}[a,b]$. Then the Riemann–Stieltjes sums $\sum_k\alpha(\xi_k)\big(f(x_k)-f(x_{k-1})\big)$ converge as $\|P\|\to0$; their limit, denoted $\int_a^b\alpha\,df$, satisfies $$\int_a^bf\,d\alpha+\int_a^b\alpha\,df=f(b)\alpha(b)-f(a)\alpha(a).$$

Proof. Abel's summation by parts. For a tagged partition, put $\xi_0=a$, $\xi_{n+1}=b$. Rearranging the sum, $$\begin{aligned}&\sum_{k=1}^n\alpha(\xi_k)\big(f(x_k)-f(x_{k-1})\big)\\&\quad=f(b)\alpha(b)-f(a)\alpha(a)\\&\qquad-\sum_{j=0}^{n}f(y_j)\big(\alpha(\xi_{j+1})-\alpha(\xi_j)\big),\end{aligned}$$ where $y_0=a$, $y_j=x_j$ for $1\le j\le n-1$, $y_n=b$ (expand both sides to check). Since $\xi_j\le x_j\le\xi_{j+1}$, the last sum is a Riemann–Stieltjes sum for $\int_a^bf\,d\alpha$ over the partition $a=\xi_0\le\xi_1\le\cdots\le\xi_{n+1}=b$ with tags $y_j$ (intervals of length zero contribute nothing and may be deleted), and its mesh is at most $2\|P\|$. By Theorem 4.31 it tends to $\int_a^bf\,d\alpha$ as $\|P\|\to0$. ∎

✏️ Example 6 — Riemann–Stieltjes integrals with floor functions
Evaluate (a) $\displaystyle\int_0^3x^2\,d\lfloor x\rfloor$; (b) $\displaystyle\int_0^{\pi/2}x\,d(\sin x)$; (c) $\displaystyle\int_0^3\lfloor x\rfloor\,d(x^2)$, using integration by parts, and check (c) directly.
(a) Jumps $\alpha=\lfloor x\rfloor$ is constant on $(0,1),(1,2),(2,3)$. Its jumps: at $0$, $\alpha(0^+)-\alpha(0)=0$; at $1$ and $2$, $1$ each; at the end point $3$, $\alpha(3)-\alpha(3^-)=3-2=1$.
(a) Value Theorem 4.32(2): $\int_0^3x^2\,d\lfloor x\rfloor=1^2+2^2+3^2=14$. Forgetting the end point (a common slip) gives $5$.
(b) Theorem 4.32(1) with $\alpha=\sin$: $\int_0^{\pi/2}x\cos x\,dx=\big[x\sin x+\cos x\big]_0^{\pi/2}=\frac\pi2-1$.
(c) By parts Theorem 4.33 with $f(x)=x^2$, $\alpha=\lfloor x\rfloor$: $\int_0^3\lfloor x\rfloor\,d(x^2)=f(3)\alpha(3)-f(0)\alpha(0)-\int_0^3x^2\,d\lfloor x\rfloor=27-0-14=13$.
(c) Check Directly, $\lfloor x\rfloor\cdot2x$ is integrated piece by piece: $\int_1^22x\,dx+\int_2^34x\,dx=3+10=13$. ✓

Probability. If a random variable $X$ takes values in $(a,b]$ and has distribution function $F(x)=\Pr(X\le x)$ (increasing, right-continuous, $F(a)=0$, $F(b)=1$), then for continuous $g$, $\mathbb{E}[g(X)]=\int_a^bg\,dF$. Theorem 4.32 splits it into $\int gF'\,dx$ over the continuous part and $\sum g(c_i)\Pr(X=c_i)$ over the atoms — the same formula for discrete, continuous and mixed distributions (Exercise IV.4; the sister course for Unit 4 uses this constantly).

⚠️ Counterexamples and pitfalls
  1. Continuous, even uniformly continuous, does not imply BV. $x\sin\frac1x$ on $[0,1]$; more generally $x^a\sin(x^{-b})$ with $0\lt a\le b$.
  2. Differentiable does not imply BV. $x^2\sin(x^{-2})$ is differentiable on $[0,1]$ with unbounded derivative and infinite variation. Differentiable with bounded derivative does imply BV — e.g. $x^2\sin\frac1x$, which is BV but not $C^1$.
  3. BV does not imply continuous, nor Lipschitz. $\lfloor x\rfloor$, the spike of Example 1(b), and $\sum_n2^{-n}\mathbf 1_{[r_n,1]}$ (jumps at every rational) are BV; $\sqrt x$ on $[0,1]$ is BV and not Lipschitz.
  4. Bounded does not imply BV. $\sin\frac1x$ and the Dirichlet function are bounded with infinite variation. BV does imply bounded (Theorem 4.24).
  5. Composites. $\sqrt t$ and $x^2\sin^2\frac1x$ are BV on $[0,1]$, but $\sqrt{x^2\sin^2\frac1x}=|x\sin\frac1x|$ is not. Lipschitz $\circ$ BV is BV.
  6. $|f|$ or $f^2$ BV does not give $f$ BV. $f=\pm1$ on rationals/irrationals: $|f|=f^2\equiv1$.
  7. Uniform limits. Truncations of $x\sin\frac1x$ are BV and converge uniformly to a non-BV function; only a uniform bound on the variations passes to the limit.
  8. The value at a discontinuity counts. Changing $f$ at one point can change $V$: a spike of height $h$ above the one-sided limits adds $2h$. Also, at the end points only one-sided jumps count: $V_0^3(x-\lfloor x\rfloor)=6$, not $5$.
  9. Uniform partitions can mislead for discontinuous $f$. For the spike, $V(g,P_n)=4-\frac4n$ for odd $n$; $V_a^b$ is a supremum over all partitions. For continuous $f$ the sums do converge as the mesh tends to $0$.
  10. The Jordan decomposition is not unique, and it need not be into strictly increasing or continuous functions — but for continuous $f$ it can be chosen continuous (Theorem 4.28), and $g+x$, $h+x$ makes it strict.
  11. Length belongs to the parametrisation. $(\cos t,\sin t)$ on $[0,4\pi]$ has length $4\pi$; a bounded continuous curve (the graph of $x\sin\frac1x$) can have infinite length.
  12. Common discontinuities kill Riemann–Stieltjes integrals. For $\alpha=\mathbf 1_{(1/2,1]}$ on $[0,1]$, $\int_0^1\alpha\,d\alpha$ does not exist: $U=1$ and $L=0$ for every partition (Exercise IV.5).

Exercises

I
Computing total variations.
  • 1 Find $V_{-3}^{3}(f)$ for $f(x)=x^3-12x$.
  • 2 Find $V_0^{2\pi}(f)$ for $f(x)=\sin x+\cos x$.
  • 3 Find $V_0^3(f)$ for $f(x)=x\lfloor x\rfloor$.
  • 4 Let $f(x)=x^2$ on $[0,2]$ except $f(1)=5$. Find $V_0^2(f)$.
  • 5 Find $V_0^{2\pi}(f)$ for $f(x)=e^{-x}\sin x$.
  • 6 Find $V_0^n(f)$ for $f(x)=(-1)^{\lfloor x\rfloor}$, $n\in\mathbb{N}$.
  • 7 Find $V_{-1}^1(f)$ for $f(x)=x^{2/3}$. Is $f$ Lipschitz on $[-1,1]$?
  • 8 Find $V_0^1(f)$ for $f(x)=\cos(2\pi nx)$, $n\in\mathbb{N}$.
Check: variation sums over the dyadic partitions $P_N$, $N=2^k$, for five parts of card I
N = 2ᵏ—
V(f, P_N)—
claimed V—
1 $f'=3(x^2-4)$: turning points $\pm2$. Values $f(-3)=9$, $f(-2)=16$, $f(2)=-16$, $f(3)=-9$. $V=7+32+7=46$.
2 $f=\sqrt2\sin(x+\frac\pi4)$ has a maximum $\sqrt2$ at $\frac\pi4$ and a minimum $-\sqrt2$ at $\frac{5\pi}4$; $f(0)=f(2\pi)=1$. $V=(\sqrt2-1)+2\sqrt2+(\sqrt2+1)=4\sqrt2\approx5.657$.
3 $f=0$ on $[0,1)$, $x$ on $[1,2)$, $2x$ on $[2,3)$, $f(3)=9$. Every piece is increasing and every jump is upward ($0\to1$, $2\to4$, $6\to9$), so $f$ is increasing on $[0,3]$ and $V=f(3)-f(0)=9$ (Theorem 4.22(1)).
4 $x^2$ rises from $0$ to $1$, then the spike costs $(5-1)+(5-1)=8$, then $x^2$ rises from $1$ to $4$: $V=1+8+3=12$.
5 $f'=e^{-x}(\cos x-\sin x)=0$ at $\frac\pi4,\frac{5\pi}4$. $f(\frac\pi4)=\frac{e^{-\pi/4}}{\sqrt2}$, $f(\frac{5\pi}4)=-\frac{e^{-5\pi/4}}{\sqrt2}$, $f(0)=f(2\pi)=0$. $V=2f(\frac\pi4)+2|f(\frac{5\pi}4)|=\sqrt2\big(e^{-\pi/4}+e^{-5\pi/4}\big)\approx0.6727$.
6 $f$ is constant on each $[k,k+1)$ and jumps by $2$ at $x=1,\dots,n-1$; at the end point, $|f(n)-f(n^-)|=|(-1)^n-(-1)^{n-1}|=2$. So $V=2(n-1)+2=2n$.
7 $f$ decreases from $1$ to $0$ on $[-1,0]$ and increases to $1$ on $[0,1]$: $V=2$. Not Lipschitz: $f(x)/x=x^{-1/3}\to\infty$ as $x\to0^+$. (BV does not need a bounded derivative.)
8 On each of the $n$ periods $[\frac kn,\frac{k+1}n]$ the function goes $1\to-1\to1$, variation $4$. $V=4n$ (or $\int_0^1 2\pi n|\sin2\pi nx|\,dx=4n$).
II
Bounded variation or not? Prove your answers.
  • 1 $f(x)=x\cos\frac{\pi}{2x}$ on $(0,1]$, $f(0)=0$. (Use the points $\frac1{2k}$.)
  • 2 $f(x)=x^{3/2}\sin\frac1x$ on $(0,1]$, $f(0)=0$.
  • 3 $f(x)=x^2\sin\frac1{x^2}$ on $(0,1]$, $f(0)=0$. Is $f$ differentiable on $[0,1]$?
  • 4 The Dirichlet function $\mathbf 1_{\mathbb{Q}}$ on $[0,1]$.
  • 5 $f=\sum_{n\ge1}2^{-n}\mathbf 1_{[r_n,1]}$ on $[0,1]$, where $(r_n)$ enumerates $\mathbb{Q}\cap(0,1]$. Find $V_0^1(f)$ and the set of discontinuities.
  • 6 Prove that $f,g\in\mathrm{BV}[a,b]$ implies $\max(f,g)\in\mathrm{BV}[a,b]$.
  • 7 Prove that if $f\in\mathrm{BV}[a,b]$ and $f\ge c\gt0$, then $\sqrt f$ and $\log f$ are BV. Show by an example that $\sqrt f$ can fail to be BV when only $f\ge0$.
  • 8 Prove that a polynomial $p$ of degree $n\ge1$ satisfies $V_a^b(p)\le n\big(\max_{[a,b]}p-\min_{[a,b]}p\big)$.
  • 9 Give a bounded function on $[0,1]$ that is BV on $[\varepsilon,1]$ for every $\varepsilon\gt0$ but not on $[0,1]$.
1 Not BV. $f(\frac1{2k})=\frac{\cos(k\pi)}{2k}=\frac{(-1)^k}{2k}$. With the points $\frac1{2N}\lt\cdots\lt\frac12$: $V\ge\sum_{k=1}^{N-1}\left(\frac1{2k}+\frac1{2k+2}\right)\to\infty$, since consecutive values have opposite signs. (Compare Theorem 4.25 with $a=b=1$.)
2 BV: Theorem 4.25 with $a=\frac32\gt b=1$; $V\le1+3=4$.
3 Not BV ($a=b=2$). Yes, differentiable: $f'(0)=\lim x\sin(x^{-2})=0$, and $f'(x)=2x\sin(x^{-2})-\frac2x\cos(x^{-2})$ for $x\ne0$ — unbounded, which is why Theorems 4.22(3) and 4.23 do not apply.
4 Not BV: choose $2N$ points alternately rational and irrational; each step contributes $1$, so $V\ge2N-1$ for every $N$.
5 $f$ is increasing (a sum of increasing functions; the series converges uniformly by the M-test). $f(0)=0$, $f(1)=\sum2^{-n}=1$, so $V=1$. At $r_n$ the jump is $f(r_n)-f(r_n^-)=2^{-n}$; at irrationals the tail $\sum_{n\gt N}2^{-n}$ controls the oscillation, so $f$ is continuous there. Discontinuities: exactly $\mathbb{Q}\cap(0,1]$ — dense, countable, as Theorem 4.27 allows.
6 $\max(f,g)=\frac12\big(f+g+|f-g|\big)$, and $f+g$, $f-g$, $|f-g|$ are BV (Theorems 4.20(4), 4.24(4)).
7 On $[c,\infty)$, $\sqrt t$ is Lipschitz with constant $\frac1{2\sqrt c}$ and $\log t$ with constant $\frac1c$ (mean value theorem); apply Theorem 4.24(4). Example with $c=0$: $f=x^2\sin^2\frac1x\ge0$ is BV but $\sqrt f=|x\sin\frac1x|$ is not (Example 3(b)).
8 $p'$ has at most $n-1$ real zeros, so $[a,b]$ splits into at most $n$ closed intervals on which $p$ is monotone. On each, $|\Delta p|\le\max p-\min p$; add (Theorem 4.22(4)).
9 $\sin\frac1x$ ($0$ at $0$): $C^1$ on $[\varepsilon,1]$, but $V_0^1=\infty$ (Example 3(d)).
III
Variation functions, Jordan decompositions and lengths.
  • 1 For $f(x)=x^2-2x$ on $[0,3]$, find $v$, $v^+$, $v^-$ and $V_0^3(f)$.
  • 2 Let $f=0$ on $[0,1)$, $f(1)=2$, $f=1$ on $(1,2]$. Find $v$, $v^+$, $v^-$ and verify Theorem 4.28 at $x=1$.
  • 3 Let $f\in\mathrm{BV}[a,b]$. Prove that $f$ is Lipschitz with constant $K$ if and only if its variation function $v$ is.
  • 4 Find the length of $\gamma(t)=(t^2,t^3)$, $0\le t\le1$.
  • 5 Find the length of the astroid $\gamma(t)=(\cos^3t,\sin^3t)$, $0\le t\le2\pi$.
  • 6 Show that the spiral $\gamma(t)=\big(t\cos\frac1t,\,t\sin\frac1t\big)$, $\gamma(0)=(0,0)$, $0\le t\le1$, is a continuous curve of infinite length.
  • 7 Let $f:[0,1]\to[0,1]$ be increasing with $f(0)=0$, $f(1)=1$. Show that its graph has length between $\sqrt2$ and $2$, and that neither bound can be improved.
  • 8 Write $\sin x$ on $[0,2\pi]$ as $g-h$ with $g,h$ continuous and strictly increasing, starting from $v^\pm$.
1 $f$ falls from $0$ to $-1$ on $[0,1]$ and rises to $3$ on $[1,3]$. $v=2x-x^2$ on $[0,1]$ and $v=1+(x^2-2x+1)=x^2-2x+2$ on $[1,3]$; $V=v(3)=5$. $v^+=0$ on $[0,1]$, $(x-1)^2$ on $[1,3]$; $v^-=2x-x^2$ on $[0,1]$, $1$ on $[1,3]$. Check: $(x-1)^2-1=x^2-2x$.
2 $v=0$ on $[0,1)$, $v(1)=2$, $v=3$ on $(1,2]$. $v^+=\frac12(v+f)$: $0$, then $2$ at $x=1$, and $2$ on $(1,2]$; $v^-=\frac12(v-f)$: $0$ on $[0,1]$, $1$ on $(1,2]$. Jumps: $v(1)-v(1^-)=2=|f(1)-f(1^-)|$ and $v(1^+)-v(1)=1=|f(1^+)-f(1)|$.
3 If $v$ is $K$-Lipschitz: $|f(y)-f(x)|\le V_x^y(f)=v(y)-v(x)\le K(y-x)$. If $f$ is $K$-Lipschitz: $v(y)-v(x)=V_x^y(f)\le K(y-x)$ by Theorem 4.22(2) on $[x,y]$.
4 $|\gamma'|=\sqrt{4t^2+9t^4}=t\sqrt{4+9t^2}$. $L=\big[\frac1{27}(4+9t^2)^{3/2}\big]_0^1=\frac{13\sqrt{13}-8}{27}\approx1.4397$.
5 $\gamma'=(-3\cos^2t\sin t,\ 3\sin^2t\cos t)$, $|\gamma'|=3|\sin t\cos t|=\frac32|\sin2t|$. $L=\frac32\int_0^{2\pi}|\sin2t|\,dt=\frac32\cdot4=6$.
6 Continuity at $0$: $|\gamma(t)|=t$. On $[\varepsilon,1]$ the curve is $C^1$ with $|\gamma'(t)|^2=1+\frac1{t^2}$, so its length there is $\int_\varepsilon^1\sqrt{1+t^{-2}}\,dt\ge\int_\varepsilon^1\frac{dt}t=\log\frac1\varepsilon$. Length over $[0,1]$ is at least the length over $[\varepsilon,1]$, so it is infinite. (Or: one coordinate is $t\cos\frac1t$, not BV.)
7 $V_0^1(f)=1$, so Theorem 4.29 gives $\sqrt{1+1}\le L\le1+1$. $f(x)=x$ attains $\sqrt2$. For $f(x)=x^n$, Theorem 4.30 gives lengths $1.414$, $1.479$, $1.641$, $1.842$, $1.952$ for $n=1,2,5,20,100$, approaching $2$ (the graph hugs the bottom and right sides of the square).
8 $v=\sin x$ on $[0,\frac\pi2]$, $2-\sin x$ on $[\frac\pi2,\frac{3\pi}2]$, $4+\sin x$ on $[\frac{3\pi}2,2\pi]$. Hence $v^+=\sin x,\ 1,\ 2+\sin x$ and $v^-=0,\ 1-\sin x,\ 2$ on the three pieces, and $\sin x=v^+-v^-$ ($f(0)=0$). Take $g=v^++x$, $h=v^-+x$.
IV
Riemann–Stieltjes integrals and proofs.
  • 1 Evaluate $\int_0^3x\,d\lfloor x\rfloor$ and $\int_0^\pi\sin x\,d(\cos x)$.
  • 2 Evaluate $\int_{-1}^1e^x\,d(\operatorname{sgn}x)$ and $\int_{-1}^1e^x\,d|x|$.
  • 3 Evaluate $\int_0^2x\,d\big(x^2+\lfloor x\rfloor\big)$.
  • 4 A random variable $X$ has $F(x)=0$ for $x\lt0$, $F(x)=\frac x2$ for $0\le x\lt1$, $F(x)=1$ for $x\ge1$. Find $\mathbb{E}[X]=\int_0^1x\,dF$ and $\operatorname{Var}X$.
  • 5 Let $\alpha=\mathbf 1_{(1/2,1]}$ on $[0,1]$. Show that $\alpha\notin\mathcal{R}(\alpha)$.
  • 6 Let $f\in C[a,b]$ and $\alpha$ increasing. Prove $\int f\,d\alpha\ge0$ if $f\ge0$, and that $\int_a^bf\,d\alpha=f(c)\big(\alpha(b)-\alpha(a)\big)$ for some $c\in[a,b]$.
  • 7 Lower semicontinuity. Prove that if $f_n\to f$ pointwise on $[a,b]$, then $V_a^b(f)\le\liminf_nV_a^b(f_n)$. Deduce that a pointwise limit of functions with $V_a^b(f_n)\le M$ is BV.
  • 8 Prove that $\|f\|_{\mathrm{BV}}=|f(a)|+V_a^b(f)$ is a norm on $\mathrm{BV}[a,b]$ with $\|f\|_\infty\le\|f\|_{\mathrm{BV}}$, and that $\mathrm{BV}[a,b]$ is complete in this norm.
  • 9 Prove that $V_a^b(f)=|f(b)-f(a)|$ if and only if $f$ is monotone on $[a,b]$.
1 Jumps of $\lfloor x\rfloor$ at $1,2,3$ (the last at the end point): $1+2+3=6$. Second: $\int_0^\pi\sin x\cdot(-\sin x)\,dx=-\frac\pi2$.
2 $\operatorname{sgn}$ is constant on $(-1,0)$ and $(0,1)$ and jumps by $\operatorname{sgn}(0^+)-\operatorname{sgn}(0^-)=2$ at $0$ (its value at $0$ is irrelevant): the integral is $e^0\cdot2=2$. For $|x|$, split at $0$ (additivity) and use Theorem 4.32(1) on each half: $-\int_{-1}^0e^x\,dx+\int_0^1e^x\,dx=-(1-e^{-1})+(e-1)=e+e^{-1}-2\approx1.0862$.
3 Linearity: $\int_0^2x\cdot2x\,dx=\frac{16}3$, plus the jumps of $\lfloor x\rfloor$ at $1$ and at the end point $2$: $1+2=3$. Total $\frac{25}3$.
4 On $[0,1]$, $F=\frac x2+J$ where $J=0$ on $[0,1)$ and $J(1)=\frac12$ (an atom $\Pr(X=1)=\frac12$). $\mathbb{E}[X]=\int_0^1\frac x2\,dx+1\cdot\frac12=\frac34$; $\mathbb{E}[X^2]=\frac16+\frac12=\frac23$; $\operatorname{Var}X=\frac23-\frac9{16}=\frac5{48}$.
5 Every partition has exactly one subinterval with $\Delta\alpha\ne0$: if $\frac12\in P$, it is $[\frac12,x_{j+1}]$ (where $\alpha(\frac12)=0$, $\alpha(x_{j+1})=1$); otherwise it is the subinterval containing $\frac12$ in its interior. On it $\Delta\alpha=1$, $\sup\alpha=1$, $\inf\alpha=0$. So $U=1$, $L=0$ always.
6 If $f\ge0$ then $m_k\ge0$, so $L(f,\alpha,P)\ge0$ and $\int f\,d\alpha\ge0$. With $m=\min f$, $M=\max f$: $m(\alpha(b)-\alpha(a))\le\int f\,d\alpha\le M(\alpha(b)-\alpha(a))$ (positivity applied to $f-m$, $M-f$). If $\alpha(b)=\alpha(a)$ any $c$ works; otherwise the quotient lies in $[m,M]$ and the intermediate value theorem gives $c$.
7 For a fixed partition $P$, $V(f,P)=\lim_nV(f_n,P)\le\liminf_nV_a^b(f_n)$ (finitely many terms). Take the supremum over $P$. If $V(f_n)\le M$ for all $n$, then $V(f)\le M$.
8 If $\|f\|_{\mathrm{BV}}=0$ then $V=0$, so $f$ is constant (Theorem 4.20(3)), equal to $f(a)=0$. Homogeneity and the triangle inequality follow from Theorem 4.20(4). $\|f\|_\infty\le\|f\|_{\mathrm{BV}}$ is Theorem 4.24(1). Completeness: a Cauchy sequence $(f_n)$ in $\mathrm{BV}$ is uniformly Cauchy, so $f_n\to f$ uniformly. Given $\varepsilon$, pick $N$ with $\|f_n-f_m\|_{\mathrm{BV}}\lt\varepsilon$ for $m,n\ge N$; for fixed $n\ge N$, $f_n-f_m\to f_n-f$ pointwise as $m\to\infty$, so by IV.7, $V(f_n-f)\le\varepsilon$ and $|f_n(a)-f(a)|\le\varepsilon$. Thus $f=f_n-(f_n-f)\in\mathrm{BV}$ and $\|f_n-f\|_{\mathrm{BV}}\le2\varepsilon$.
9 Monotone $\Rightarrow$ equality: Theorem 4.22(1). Conversely, let $V_a^b(f)=f(b)-f(a)$ (the case $f(a)-f(b)$ is symmetric). Then $v^-(b)=\frac12\big(V_a^b(f)-f(b)+f(a)\big)=0$; as $v^-$ is increasing and $v^-(a)=0$, $v^-\equiv0$, so $f=f(a)+v^+$ is increasing.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B The total variation of $f(x)=x-\lfloor x\rfloor$ on $[0,3]$ is (A) $3$; (B) $5$; (C) $6$; (D) $\infty$.

Idea Split at the integers; count rises and drops, including the value at the right end point.
Computation On each $[k,k+1)$, $f$ rises from $0$ towards $1$: variation $1$. At $x=1,2$: $f$ drops from $f(k^-)=1$ to $f(k)=0$: $1$ each. At $x=3$: $f(3)=0$ while $f(3^-)=1$: another $1$. Total $3\cdot1+3\cdot1=6$.
Answer (C). (B) forgets the end point; (A) is only the total rise; (D) confuses infinitely many points of a partition with infinitely many jumps — there are only three.

E2. CSIR Part B GATE MA For $p\gt0$ let $f_p(x)=x^p\sin\frac1x$ for $0\lt x\le1$ and $f_p(0)=0$. Then $f_p$ is of bounded variation on $[0,1]$ if and only if (A) $p\gt0$; (B) $p\ge1$; (C) $p\gt1$; (D) $p\gt2$.

Idea Theorem 4.25 with $a=p$, $b=1$: BV iff $a\gt b$.
Borderline At $p=1$ the peak heights $\frac1{(k+\frac12)\pi}$ form a divergent series, so (B) is wrong. (D) is too strict: for $1\lt p\lt2$ the derivative $px^{p-1}\sin\frac1x-x^{p-2}\cos\frac1x$ is unbounded near $0$, yet Theorem 4.25 still gives bounded variation (e.g. $p=\frac32$). $f_p$ is continuous for every $p\gt0$, but continuity is not enough, so (A) is wrong.
Answer (C).

E3. CSIR Part B The value of $\displaystyle\int_0^2x^2\,d\lfloor x^2\rfloor$ is (A) $4$; (B) $6$; (C) $8/3$; (D) $10$.

Idea $\alpha(x)=\lfloor x^2\rfloor$ is a step function on $[0,2]$: it jumps by $1$ where $x^2$ crosses an integer, i.e. at $x=1,\sqrt2,\sqrt3$, and at the end point $2$ ($\alpha(2)-\alpha(2^-)=4-3=1$).
Theorem 4.32(2) $\int_0^2x^2\,d\alpha=1+2+3+4=10$.
Answer (D). (B) misses the end point; (C) is $\int_0^2x^2\,dx$, treating $d\lfloor x^2\rfloor$ as $dx$; (A) counts only the end point.

E4. CSIR Part C Which of the following functions on $[0,1]$ are of bounded variation? (One or more options may be correct.) (A) $f(x)=x^2\sin\frac1x$, $f(0)=0$; (B) $f(x)=x$ for rational $x$ and $f(x)=0$ for irrational $x$; (C) $f(\frac1n)=\frac1n$ for $n\in\mathbb{N}$ and $f(x)=0$ at all other points; (D) $f(x)=\sqrt x$.

(A) BV $|f'|\le3$ on $[0,1]$ (or Theorem 4.25 with $a=2\gt b=1$).
(B) Not BV In $[\frac12,1]$ choose $2N$ points alternately rational and irrational: each step changes $f$ by at least $\frac12$, so $V\ge\frac{2N-1}2\to\infty$.
(C) Not BV Using the points $\frac1n$ and points between them where $f=0$, each spike $\frac1n$ ($2\le n\le N$) is climbed and descended: $V\ge\sum_{n=2}^N\frac2n\to\infty$. A trap: $f$ is Riemann integrable (discontinuous only on the countable set $\{\frac1n\}$) — integrable does not mean BV. With heights $\frac1{n^2}$ it would be BV.
(D) BV Increasing, so $V=1$, although $\sqrt x$ is not Lipschitz.
Answer (A) and (D).

E5. CSIR Part C Let $f\in\mathrm{BV}[0,1]$ and $v(x)=V_0^x(f)$. Which of the following are necessarily true? (A) $f$ is Riemann integrable on $[0,1]$. (B) $f$ has at most countably many points of discontinuity. (C) If $f$ is continuous on $[0,1]$, then $v$ is continuous on $[0,1]$. (D) $V_0^1(f^2)\le V_0^1(f)$.

(A) True $f$ is a difference of increasing functions, each Riemann integrable (Theorem 4.27(3)).
(B) True Theorem 4.27(2).
(C) True Theorem 4.28: the jumps of $v$ equal those of $f$.
(D) False $f(x)=2x$: $V(f)=2$ but $f^2=4x^2$ has $V=4$. The correct bound is $V(f^2)\le2\|f\|_\infty V(f)$ (Theorem 4.24).
Answer (A), (B) and (C).

E6. CSIR Part C GATE MA Which of the following statements are true? (A) The graph of $f(x)=x\sin\frac1x$ ($f(0)=0$) over $[0,1]$ has finite length. (B) If $\alpha\in\mathrm{BV}[a,b]$ and $f\in C[a,b]$, then $\left|\int_a^bf\,d\alpha\right|\le\max_{[a,b]}|f|\cdot V_a^b(\alpha)$. (C) $\int_0^2x\,d\lfloor x\rfloor=1$. (D) If $f:[0,1]\to\mathbb{R}$ satisfies $V_0^1(f)=|f(1)-f(0)|$, then $f$ is monotone.

(A) False A graph is rectifiable iff the function is BV (Theorem 4.29), and $x\sin\frac1x$ is not BV.
(B) True Theorem 4.31: $|\sum f(\xi_k)\Delta\alpha_k|\le\|f\|_\infty\sum|\Delta\alpha_k|\le\|f\|_\infty V(\alpha)$, then let the mesh tend to $0$.
(C) False $\lfloor x\rfloor$ jumps at $1$ and at the end point $2$: the integral is $1+2=3$.
(D) True Exercise IV.9: equality forces $v^-\equiv0$ (or $v^+\equiv0$).
Answer (B) and (D).
🧑‍🏫 For the teacher

Suggested plan — 2 lectures × 60 min, plus an optional 30 min on Stieltjes integrals.

  1. Total variation. Start with the odometer picture and $\cos x$ on $[0,2\pi]$ (displacement $0$, distance $4$). Definition 4.11, Theorems 4.20–4.22 on the board (each proof is two lines); Example 1, insisting on part (b) — the value at the jump counts. Project Interactive 1 with the spike and ask the class why the sums jump between two levels. Theorem 4.23 and the strategy box. Then Theorem 4.25 with the full proof — it is the most examined fact of the section — and Example 3(b), the composite.
  2. Jordan and length. Definition 4.12, Theorem 4.26 with proof; Interactive 2 for $\cos x$ and for the spike, pausing at $x=1$. Theorem 4.27 as a list of free gifts from §3.2, Theorem 4.28 (state; prove the right-hand case). Theorem 4.29 and Example 5(b): a bounded continuous curve of infinite length.
  3. (Optional) Stieltjes. Definition 4.14 and Theorem 4.32 by examples: Example 6 and E3. Mention expectations of mixed distributions (Exercise IV.4).

Discussion questions. (1) $x\sin\frac1x$ and $x^2\sin\frac1x$ both oscillate infinitely often near $0$. What exactly makes one variation finite and the other infinite? (2) Every BV function is Riemann integrable; is every Riemann integrable function BV? (Thomae's function; the spikes of E4(C).) (3) Why can the Jordan decomposition not detect where $f$ is differentiable, although Lebesgue's theorem says a BV function is differentiable almost everywhere?

Misconceptions to watch for. "Continuous on a closed interval ⇒ BV"; "differentiable ⇒ BV"; computing $V$ as $|f(b)-f(a)|$ for non-monotone $f$; ignoring the value at a jump or at the right end point; believing a composition of BV functions is BV; assuming uniform partitions always approximate $V$; treating $d\lfloor x\rfloor$ as $dx$.

Suggested homework. I(1, 3, 4, 6), II(1, 3, 5, 7), III(1, 2, 4, 6), IV(1, 3, 5, 9); Exam corner E1, E4, E5.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. Why does the measured "distance travelled" by a noisy signal — a GPS track, a share price, a heart-rate trace — keep growing as you sample it more often, and how do engineers turn this into a tool for removing noise?

Why it matters. A smooth signal has finite total variation, and its variation sums settle as the sampling gets finer. Brownian motion, the standard model for noise and for asset prices, has infinite variation on every interval, while its quadratic variation $\sum(\Delta W)^2$ settles at the elapsed time — the fact behind Itô calculus and the "realised variance" used by risk managers. In image processing, the total-variation denoising method of Rudin, Osher and Fatemi (1992) removes noise by penalising $V(f)$ while keeping sharp edges (jumps cost only their height); variants of it run inside modern CT and MRI reconstruction software.

What to do.

  1. Simulate a random walk $W$ on $[0,1]$ with $n=2^{16}$ independent normal increments of variance $1/n$ (fix the seed). For $k=4,6,\dots,16$ compute $V(W,P_{2^k})$ using every $2^{16-k}$-th point, and plot it against $2^k$ on log–log axes. Estimate the slope.
  2. Compare with the prediction $\mathbb{E}\,V(W,P_N)=N\cdot\mathbb{E}|\Delta W|=\sqrt{2N/\pi}$, and compute the quadratic variation $\sum(\Delta W)^2$ at each resolution.
  3. Repeat step 1 for $\sin2\pi t$ (where $V=4$) and for $\sin2\pi t$ plus noise of standard deviation $0.01$. At what resolution does the noise start to dominate the variation?
  4. Denoise the noisy sine with a 1-D total-variation method (for example denoise_tv_chambolle from scikit-image's restoration module, or a few hundred steps of gradient descent on $\sum(u_i-y_i)^2+\lambda\sum|u_{i+1}-u_i|$ with $|t|$ smoothed to $\sqrt{t^2+10^{-6}}$). Report $V$ before and after, and the error against the true sine, for three values of $\lambda$.

Tools: Python with NumPy and Matplotlib (scikit-image optional), or any language with a normal random number generator.

Hand in: Two log–log plots, a table of $V$ and quadratic variation by resolution, and a paragraph explaining the slopes with the theory of this section (BV versus not BV).

Going further. Read about the Dirichlet–Jordan theorem on Fourier series of BV functions and about the "coastline paradox" (Richardson, Mandelbrot): why the measured length of a coast depends on the ruler.

Instructor note: the predicted values are $\sqrt{2N/\pi}\approx25.5$ for $N=2^{10}$ and $\approx204.3$ for $N=2^{16}$; a simulation typically gives values within a few per cent (e.g. $24.7$ and $203.3$), with log–log slope close to $\frac12$. The quadratic variation has expectation exactly $1$ at every resolution and fluctuations of size about $\sqrt{2/N}$ (about $0.04$ at $N=2^{10}$), so it settles at $1$ as $N$ grows. For the clean sine the sums settle at $4$ almost immediately; with noise of size $0.01$ the expected noise contribution is about $0.011N$, which overtakes $4$ near $N\approx350$.

🧪 Self-check quiz

0/5 correct

Q1. Which of these functions is not of bounded variation on $[0,1]$ (each is $0$ at $x=0$)?

Q2. $V_0^{2\pi}(\sin x)$ equals

Q3. The Jordan decomposition theorem says that $f:[a,b]\to\mathbb{R}$ is of bounded variation if and only if

Q4. $\displaystyle\int_0^2x^2\,d\lfloor x\rfloor$ equals

Q5. Which property does every $f\in\mathrm{BV}[a,b]$ have?