What Total Variation Measures
Total variation records the accumulated size of a function’s changes, not just its net change from one endpoint to another. That distinction is easy to lose in a calculation: signed increments can cancel, partitions can omit important turning points, and changing whether endpoints are included can change the variation. The examples below isolate these errors and show how to check a claim against the definition.
All functions in this tutorial are real-valued. The discussion is pointwise and uses no measure space. If \(I\) is an interval and \(f:I\to\mathbb{R}\), a finite partition of \(I\) means a finite increasing list of points in \(I\). For a closed interval \([a,b]\), a partition is required to start at \(a\) and end at \(b\). For an open interval, all partition points lie strictly inside it. For a half-open interval, the included endpoint is required as the corresponding first or last partition point; the excluded endpoint is not included.
On \([a,b]\), the signed increments instead satisfy a telescoping identity:
This identity describes the net change. It is not the definition of variation, because it retains signs before summing. A function is of bounded variation on \(I\), abbreviated \(BV\) on \(I\), precisely when \(V_I(f)<\infty\).
Signed Increments Are Not Variation
The most direct error is to calculate signed increments and call their sum the total variation. The following example has a modest net change but considerably more accumulated change.
Worked Example: A Piecewise-Linear Function with Cancellation
Let \(f:[0,3]\to\mathbb{R}\) be linear on each of \([0,1]\), \([1,2]\), and \([2,3]\), with \(f(0)=0\), \(f(1)=2\), \(f(2)=-1\), and \(f(3)=1\). Compute its total variation.
On the partition \(P=(0,1,2,3)\), the three increments are \(2-0=2\), \(-1-2=-3\), and \(1-(-1)=2\). Thus the signed sum is \(2-3+2=1\), while the variation sum is \(|2|+|-3|+|2|=2+3+2=7\).
To verify that \(7\) is the total variation, take any partition and insert the points \(1\) and \(2\) if they are not already present. Inserting points cannot decrease the variation sum, as proved below. On each resulting subinterval, \(f\) is monotone, so the sum of the absolute increments there equals the absolute difference between the subinterval’s endpoint values. The three segment contributions are therefore \(|2-0|=2\), \(|-1-2|=3\), and \(|1-(-1)|=2\). Any original partition has sum at most \(7\), and \(P\) attains \(7\); hence \(V_{[0,3]}(f)=7\).
Check: the endpoint difference is \(f(3)-f(0)=1-0=1\), matching the signed sum, not the variation. Reversing the order of the three changes gives the same absolute contributions, \(2+3+2=7\).
Common mistake. The calculation “the increments sum to \(1\), so the total variation is \(1\)” is wrong because it allows the downward change \(-3\) to cancel the upward changes. The correction is to take the absolute value of each increment before adding: \(2+3+2=7\).
What Partition Refinement Does
A partition \(Q\) refines a partition \(P\) if every point of \(P\) is also a point of \(Q\). Refinement has a definite effect on the variation sum: it cannot lower it. This fact does not say that every two partitions can be compared just by counting their points; the claim applies when one partition contains all the points of the other.
Proof. Consider one interval \([x_{i-1},x_i]\) of \(P\), and list the points of \(Q\) in that interval as \(x_{i-1}=y_0<y_1<\cdots<y_k=x_i\). The triangle inequality gives \[ |f(x_i)-f(x_{i-1})| =\left|\sum_{j=1}^{k}\bigl(f(y_j)-f(y_{j-1})\bigr)\right| \le\sum_{j=1}^{k}|f(y_j)-f(y_{j-1})|. \] Adding this inequality over the intervals of \(P\) gives \(S_P(f)\le S_Q(f)\), since the subintervals of \(Q\) together are exactly those pieces. \(\square\)
Worked Example: A Partition That Misses a Turning Point
Define \(f:[0,2]\to\mathbb{R}\) by \(f(x)=x\) for \(0\le x\le1\) and \(f(x)=2-x\) for \(1\le x\le2\). Compare the partition \(P=(0,2)\) with its refinement \(Q=(0,1,2)\), and find the total variation.
For \(P\), the only increment is \(f(2)-f(0)=0-0=0\), so \(S_P(f)=|0|=0\). The point \(1\) is a turning point: \(f(1)=1\). For \(Q\), the increments are \(1-0=1\) and \(0-1=-1\), so \(S_Q(f)=|1|+|-1|=2\).
On \([0,1]\), \(f\) is increasing, and on \([1,2]\), it is decreasing. Inserting \(1\) into any partition can only raise its sum by the proposition. Once \(1\) is inserted, the absolute increments on each monotone piece sum to its endpoint change, which is \(1\) on each piece. Thus every partition sum is at most \(1+1=2\), while \(Q\) attains \(2\). Therefore \(V_{[0,2]}(f)=2\).
Check: the refined sum \(2\) is at least the coarse sum \(0\), and a partition containing the turning point records both changes. The endpoint difference \(f(2)-f(0)=0\) again records only the net change.
A related error is to assume that a partition with more points must have a larger sum than every partition with fewer points. The refinement proposition does not make that assertion: it compares a partition with a partition that contains all its points. For a reliable variation calculation, either use the supremum in the definition or show that a proposed partition captures all changes and that no other partition can do better.
Endpoint Conventions Matter
Variation is defined using the points in the interval under consideration. Therefore, variation on an open interval need not equal variation on a closed interval obtained by adding endpoints. In particular, an endpoint value can differ from all nearby values and contribute to variation when that endpoint is included. This is not a contradiction: the two variations use different sets of admissible partition points.
Worked Example: Changing Whether an Endpoint Is Included
Define \(f:[0,1]\to\mathbb{R}\) by \(f(0)=4\) and \(f(x)=0\) for every \(x\in(0,1]\). Compare variation on \([0,1]\), \([0,1)\), and \((0,1]\).
For any partition of \([0,1]\), the first increment is from \(f(0)=4\) to a value \(0\), and all later increments are between values \(0\) and \(0\). Thus its variation sum is \(4\), so \(V_{[0,1]}(f)=4\). The same reasoning applies to partitions of \([0,1)\), which include \(0\) but exclude \(1\): a partition with at least one step has first increment of absolute value \(4\), and all subsequent increments are zero. Hence \(V_{[0,1)}(f)=4\).
On \((0,1]\), the function is identically zero. Every increment in every partition is \(0-0=0\), so \(V_{(0,1]}(f)=0\). Its restriction to \((0,1)\) is also identically zero and has variation \(0\).
Check: including \(0\) adds the change from \(4\) to \(0\), of size \(|0-4|=4\); excluding \(0\) removes it. These values follow directly from the endpoint convention in the definition.
When a problem says “variation on \(I\),” the interval \(I\) is part of the data. A calculation on \([a,b]\) cannot automatically be transferred to \((a,b)\), \([a,b)\), or \((a,b]\). Endpoint limits and endpoint values also must not be silently identified: in this example the right-hand limit at \(0\) is \(0\), but the value \(f(0)\) is \(4\).
Cancellation in Sums of Functions
Variation also responds to cancellation when functions are added. For real-valued functions \(f\) and \(g\) on the same interval \(I\), the correct general estimate is subadditivity, \(V_I(f+g)\le V_I(f)+V_I(g)\). Equality is not guaranteed.
Proof. For any finite partition \(P=(x_0,\ldots,x_n)\) of \(I\), the triangle inequality gives \[ |(f+g)(x_i)-(f+g)(x_{i-1})| \le |f(x_i)-f(x_{i-1})|+|g(x_i)-g(x_{i-1})| \] for each \(i\). Summing over \(i\) yields \(S_P(f+g)\le S_P(f)+S_P(g)\le V_I(f)+V_I(g)\). Taking the supremum over all \(P\) proves the claimed inequality. If either term on the right is infinite, the inequality holds in the extended nonnegative reals as well. \(\square\)
Worked Example: Opposite Changes Cancel
On \(I=[0,1]\), let \(f(x)=x\) and \(g(x)=1-x\). Compute their variations and the variation of their sum.
For any partition \(P=(x_0,\ldots,x_n)\) of \([0,1]\), the increments of \(f\) are \(x_i-x_{i-1}\ge0\). Their absolute values sum to \(\sum_{i=1}^{n}(x_i-x_{i-1})=1-0=1\), so \(V_{[0,1]}(f)=1\). The increments of \(g\) are \(-(x_i-x_{i-1})\); their absolute values also sum to \(1\), giving \(V_{[0,1]}(g)=1\).
For every \(x\in[0,1]\), \((f+g)(x)=x+(1-x)=1\). Every increment of the constant function \(f+g\) is \(1-1=0\), so \(V_{[0,1]}(f+g)=0\). Thus the subadditivity estimate reads \(0\le1+1=2\), and it is strict.
Check: for the partition \((0,1)\), the increments of \(f\) and \(g\) are \(1\) and \(-1\), whose absolute values sum to \(2\), while the increment of \(f+g\) is \(1-1=0\). This verifies the cancellation directly.
In general, the triangle inequality is applied to the increments at each step, before taking the supremum over partitions. Replacing that inequality with equality is an error unless equality has been separately justified. The example shows why: opposing increments cancel in the sum of functions, even though each function changes by a total amount of \(1\).
A Practical Audit for Variation Arguments
Before accepting a total-variation calculation, check what is being summed and which points are allowed. These checks catch the errors treated here:
- Absolute values: variation sums \(|f(x_i)-f(x_{i-1})|\); the signed sum instead telescopes to the net endpoint change.
- Partition points: if a partition is refined, its sum cannot decrease. To claim a partition gives the full variation, also justify why no other partition gives a larger sum.
- Endpoints: state whether the interval is open, closed, or half-open, and use only partition points in that interval.
- Combining functions: subadditivity gives an upper bound for \(V_I(f+g)\); cancellation can make the inequality strict.
These are definition-level checks, but they are useful even in longer arguments: a correct endpoint convention and a correctly formed partition sum are necessary before any later estimate can be applied.
Check Your Understanding
For each question, distinguish the variation sum from the signed sum and state the interval convention being used.
- For the piecewise-linear function with successive values \(0,2,-1,1\) at \(0,1,2,3\), what is the signed endpoint change, and what is the total variation?
- For the function \(f(x)=x\) on \([0,1]\) and \(f(x)=2-x\) on \([1,2]\), why does the partition \((0,2)\) fail to attain the total variation?
- Give a proof that inserting one point \(y\) between consecutive partition points \(x\) and \(z\) cannot decrease the variation sum.
- For \(f(0)=4\) and \(f(x)=0\) on \((0,1]\), compare \(V_{[0,1]}(f)\) and \(V_{(0,1]}(f)\). Which partition point accounts for the difference?
- For \(f(x)=x\) and \(g(x)=1-x\) on \([0,1]\), compute \(V(f)\), \(V(g)\), and \(V(f+g)\). Why does equality fail in the subadditivity estimate?