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.
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$.
Let $f,g:[a,b]\to\mathbb{R}$ and $c\in\mathbb{R}$.
- Refinement: if $P\subseteq P^*$ then $V(f,P)\le V(f,P^*)$.
- 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)$.
- $V_a^b(f)=0$ if and only if $f$ is constant on $[a,b]$.
- 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$. ∎
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)$. ∎
- If $f$ is monotone on $[a,b]$, then $V_a^b(f)=|f(b)-f(a)|$.
- If $f$ is Lipschitz on $[a,b]$, $|f(x)-f(y)|\le K|x-y|$, then $V_a^b(f)\le K(b-a)$.
- 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)$.
- 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.
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.
- Split $[a,b]$ at the turning points of $f$ (where $f'$ changes sign) and at its discontinuities. Variation is additive (Theorem 4.21).
- Continuous monotone pieces contribute $|f(c_i)-f(c_{i-1})|$ (Theorem 4.22(4)). Equivalently, for piecewise $C^1$ functions, $V=\int|f'|$.
- 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^-)|$.
- To prove $V=\infty$, exhibit partitions through the peaks and troughs along which $V(f,P)\to\infty$ (Theorem 4.25).
- Sanity check: $V_a^b(f)\ge|f(b)-f(a)|$, with equality if and only if $f$ is monotone (Exercise IV.9).
Let $f,g\in\mathrm{BV}[a,b]$.
- $|f(x)|\le|f(a)|+V_a^b(f)$ for all $x\in[a,b]$; in particular $f$ is bounded.
- $fg\in\mathrm{BV}[a,b]$ and $V_a^b(fg)\le\|g\|_\infty V_a^b(f)+\|f\|_\infty V_a^b(g)$.
- 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$.
- 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$. ∎
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.
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$.
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.
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.
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.
Let $f\in\mathrm{BV}[a,b]$.
- 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.
- 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}$$
- $f$ is Riemann integrable on $[a,b]$.
- (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".
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. ∎
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.
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$. ∎
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$. ∎
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.
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$.
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$. ∎
Let $f\in C[a,b]$.
- Smooth integrator: if $\alpha\in C^1[a,b]$, then $\displaystyle\int_a^bf\,d\alpha=\int_a^bf(x)\,\alpha'(x)\,dx$.
- 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. ∎
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$. ∎
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).
- 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$.
- 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$.
- 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.
- Bounded does not imply BV. $\sin\frac1x$ and the Dirichlet function are bounded with infinite variation. BV does imply bounded (Theorem 4.24).
- 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.
- $|f|$ or $f^2$ BV does not give $f$ BV. $f=\pm1$ on rationals/irrationals: $|f|=f^2\equiv1$.
- 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.
- 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$.
- 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$.
- 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.
- 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.
- 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
- 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}$.
- 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 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 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]$.
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$.
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$.
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$.
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$.
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)$.
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.
Suggested plan — 2 lectures × 60 min, plus an optional 30 min on Stieltjes integrals.
- 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.
- 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.
- (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 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.
- 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.
- 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.
- 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?
- Denoise the noisy sine with a 1-D total-variation method (for example
denoise_tv_chambollefrom scikit-image'srestorationmodule, 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.
🧪 Self-check quiz
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?