Tutorials › Measure Theory › Variation Of Piecewise Smooth Functions With Jumps

Functions of Bounded Variation · Tutorial 631 of 798

Variation Of Piecewise Smooth Functions With Jumps

Learn to calculate total variation by adding the integral of the absolute derivative on smooth pieces to the contributions from jumps and breakpoint values.

Advanced 11 min read

What You'll Learn

  • Define total variation using finite partitions of a compact interval.
  • Compute the variation of a continuously differentiable piece from its derivative.
  • Apply a formula that includes both one-sided traces and the actual value at each breakpoint.
  • Distinguish a trace jump from the variation cost of an arbitrary point value.
  • Check exact variation calculations with explicit partitions and limiting points.

Separate Smooth Motion from Breakpoint Costs

Total variation records all changes of a function along an interval, not just its net change from one endpoint to the other. For a function that is smooth except at finitely many points, its variation has two sources: motion along the smooth pieces, and the changes needed to reach or leave the values assigned at breakpoints. At a breakpoint, the value of the function need not equal either one-sided limit. The formula below accounts for that possibility explicitly.

Throughout, the domain is a compact interval \([a,b]\subset\mathbb{R}\), with Lebesgue measure \(m\) on \(\mathbb{R}\). The functions in this tutorial are finite, real-valued functions on \([a,b]\). For a partition \(P=\{a=t_0<t_1<\cdots<t_k=b\}\), its variation sum is \(\sum_{j=1}^k|f(t_j)-f(t_{j-1})|\). The total variation \(V_a^b(f)\) is the supremum of these sums over all finite partitions.

Definition: A function \(f:[a,b]\to\mathbb{R}\) is piecewise \(C^1\) with finitely many breakpoints if there is a partition \(a=x_0<x_1<\cdots<x_N=b\) such that, on each open interval \((x_{i-1},x_i)\), \(f\) agrees with a function \(g_i\) that is continuously differentiable on \([x_{i-1},x_i]\). At each partition point, including the endpoints, \(f(x_i)\) may be any finite real number. The one-sided traces are \(f(x_i-)=g_i(x_i)\) for \(i\ge1\) and \(f(x_i+)=g_{i+1}(x_i)\) for \(i<N\).

For an interior breakpoint, the two relevant changes are from the left trace to the assigned value and from the assigned value to the right trace. At the endpoints there is only one adjoining smooth piece, so there is only one possible discrepancy. The integral in the formula is the Lebesgue integral with respect to \(m\); for a continuous derivative on a compact interval it is finite and agrees with its Riemann integral.

Variation on a Smooth Piece

Proposition: If \(g:[u,v]\to\mathbb{R}\) is continuously differentiable, then \(V_u^v(g)=\int_u^v|g'(x)|\,dm(x)\).

Proof. Let \(u=t_0<\cdots<t_k=v\) be any partition. By the fundamental theorem of calculus and the triangle inequality, each increment satisfies \(|g(t_j)-g(t_{j-1})|=|\int_{t_{j-1}}^{t_j}g'(x)\,dm(x)|\le\int_{t_{j-1}}^{t_j}|g'(x)|\,dm(x)\). Summing over \(j\) shows that every partition sum is at most \(\int_u^v|g'|\,dm\), so \(V_u^v(g)\le\int_u^v|g'|\,dm\).

For the reverse inequality, take the uniform partition \(t_j=u+j(v-u)/n\), for \(j=0,\ldots,n\), when \(u<v\). The mean value theorem gives a point \(\xi_j\in(t_{j-1},t_j)\) such that \(|g(t_j)-g(t_{j-1})|=|g'(\xi_j)|(v-u)/n\). The function \(|g'|\) is continuous, so these Riemann sums converge to \(\int_u^v|g'|\,dm\). Since each is a partition sum, their limit is at most \(V_u^v(g)\). This proves the reverse inequality. If \(u=v\), both sides are zero. \(\square\)

The Finite-Jump Formula

Theorem: For a piecewise \(C^1\) function \(f:[a,b]\to\mathbb{R}\) with breakpoints \(x_0,\ldots,x_N\) as defined above, $$ V_a^b(f)=\sum_{i=1}^{N}\int_{x_{i-1}}^{x_i}|g_i'(x)|\,dm(x) +|f(a)-f(a+)| +\sum_{i=1}^{N-1}\bigl(|f(x_i)-f(x_i-)|+|f(x_i+)-f(x_i)|\bigr) +|f(b)-f(b-)|. $$ Here the sums over interior breakpoints are empty when \(N=1\). The formula includes endpoint discrepancies; if the endpoint value equals its adjoining trace, its contribution is zero.

Proof. First refine any partition by inserting every breakpoint \(x_i\). Inserting a point cannot decrease a variation sum, by the triangle inequality. Consider the points of this refined partition that lie in one smooth piece. The sum of increments between consecutive such points is bounded by the integral of \(|g_i'|\) over that piece, by the fundamental theorem of calculus and the triangle inequality. If a partition step reaches an assigned breakpoint value from the left, split its difference using the left trace; for example, \(|f(x_i)-f(t)|\le |f(x_i)-f(x_i-)|+|f(x_i-)-g_i(t)|\) for \(t<x_i\) in the adjoining piece. The second term is bounded by the integral of \(|g_i'|\) from \(t\) to \(x_i\). The step leaving the breakpoint is bounded in the same way using the right trace. At \(a\) and \(b\), the corresponding bounds use \(|f(a)-f(a+)|\) and \(|f(b)-f(b-)|\). Adding these bounds shows that every partition sum is at most the right side of the theorem. Taking the supremum gives the upper bound.

For the reverse bound, fix a positive \(\varepsilon\). On each smooth extension \(g_i\), the proposition gives partitions whose sums are as close as desired to \(\int_{x_{i-1}}^{x_i}|g_i'|\,dm\). Their points at a breakpoint can be taken as close to that breakpoint from the relevant side as desired: continuity of \(g_i\) makes the resulting endpoint increments converge to the increments involving the corresponding traces. Join these partitions in increasing order, inserting each actual breakpoint value \(f(x_i)\). The two increments around an interior breakpoint then converge to \(|f(x_i)-f(x_i-)|\) and \(|f(x_i+)-f(x_i)|\). At the endpoints, the corresponding single increments converge to the endpoint terms in the formula. Thus finite partitions have sums arbitrarily close to the full right side, which proves that \(V_a^b(f)\) is at least that side. The two bounds give the claimed equality. \(\square\)

If \(f(x_i)\) equals either one-sided trace, the two interior terms reduce to the absolute difference between the traces. More generally, this reduction holds whenever \(f(x_i)\) lies between the traces, because then the sum of the two distances equals the distance between the traces. If the assigned value lies outside that interval, the point value adds extra variation.

Worked Example: A Linear Piece with an Upward Jump

On \([-1,1]\), define \(f(x)=x\) for \(-1\le x<0\), \(f(0)=2\), and \(f(x)=x+2\) for \(0<x\le1\). Compute \(V_{-1}^1(f)\).

The smooth derivative is \(1\) on both pieces, so the smooth contribution is \(\int_{-1}^0 1\,dm+\int_0^1 1\,dm=1+1=2\). The left trace at zero is \(0\), the right trace is \(2\), and the assigned value is \(2\). Thus the breakpoint contribution is \(|2-0|+|2-2|=2+0=2\). The endpoint values equal their traces, so the endpoint contributions are both zero. The formula gives \(V_{-1}^1(f)=2+2=4\).

Check: For \(0<\varepsilon<1\), use the partition \(\{-1,-\varepsilon,0,1\}\). Its sum is \(|-\varepsilon-(-1)|+|2-(-\varepsilon)|+|(3)-2|=(1-\varepsilon)+(2+\varepsilon)+1=4\). This agrees with the formula and exhibits the upward jump: the traces are \(0\) and \(2\).

Worked Example: Opposing Smooth Motion and an Upward Jump

On \([0,2]\), let \(f(x)=x\) for \(0\le x<1\), set \(f(1)=3\), and let \(f(x)=4-x\) for \(1<x\le2\). The smooth motion increases before the breakpoint and decreases after it. Compute the total variation and determine the jump direction.

The derivatives on the two smooth pieces are \(1\) and \(-1\). Their variation contributions are \(\int_0^1|1|\,dm=1\) and \(\int_1^2|-1|\,dm=1\). The left trace is \(f(1-)=1\); the right trace is \(f(1+)=4-1=3\); and the assigned value is \(f(1)=3\). Therefore the breakpoint cost is \(|3-1|+|3-3|=2+0=2\). The endpoint discrepancies are zero, so \(V_0^2(f)=1+1+2=4\).

The jump is upward because the right trace minus the left trace is \(3-1=2>0\). Check: For \(0<\varepsilon<1\), the partition \(\{0,1-\varepsilon,1,2\}\) has sum \((1-\varepsilon)+|3-(1-\varepsilon)|+|2-3|=(1-\varepsilon)+(2+\varepsilon)+1=4\), matching the formula.

Worked Example: A Breakpoint Value Outside the Traces

Define \(f:[0,2]\to\mathbb{R}\) by \(f(x)=0\) for \(0\le x<1\), \(f(1)=6\), and \(f(x)=4\) for \(1<x\le2\). Compute the variation, and compare the assigned value with the trace jump.

Both smooth pieces are constant, so their derivative integrals are zero. The traces are \(f(1-)=0\) and \(f(1+)=4\), while the actual value is \(6\). The breakpoint contribution is \(|6-0|+|4-6|=6+2=8\). The endpoints match their adjoining traces, so \(V_0^2(f)=8\). The trace jump alone has size \(|4-0|=4\), which is not the variation cost of this assigned point value.

Check: The partition \(\{0,1,2\}\) gives \(|6-0|+|4-6|=6+2=8\). By contrast, if the value at \(1\) were \(2\), between the traces \(0\) and \(4\), the breakpoint cost would be \(|2-0|+|4-2|=2+2=4\), exactly the trace-jump size.

Common Pitfall: Adding Signed Changes

A variation calculation uses absolute increments. Adding signed changes instead computes only the net change, and it can cancel motion in opposite directions. For the preceding example with opposing smooth motion, the net change is \(f(2)-f(0)=2-0=2\), while the total variation is \(4\). The smooth pieces contribute \(1+1=2\), and the upward jump adds \(2\); these are accumulated as nonnegative quantities rather than canceled.

A second error is to assume that every jump contributes just the distance between the traces. That is valid when the value at the breakpoint lies between the traces, including the common right-continuous convention \(f(x_i)=f(x_i+)\). It is not valid for an arbitrary assigned value: in the example with traces \(0\) and \(4\) and value \(6\), the cost is \(8\), not \(4\). The formula also explains why changing a function at a single point can change its total variation, even though changing a function at one point does not change its Lebesgue integral.

Check Your Understanding

Use the finite-jump formula, keeping the actual breakpoint values distinct from the one-sided traces when needed.

  1. On \([0,2]\), let \(f(x)=2x\) for \(x<1\), \(f(1)=5\), and \(f(x)=3-x\) for \(x>1\). Find the two traces, the jump direction, and \(V_0^2(f)\).
  2. Suppose a piecewise \(C^1\) function has traces \(-2\) and \(3\) at an interior breakpoint. For which assigned values does the breakpoint cost equal \(5\)?
  3. Explain why \(|f(x_i)-f(x_i-)|+|f(x_i+)-f(x_i)|\) can exceed \(|f(x_i+)-f(x_i-)|\).
  4. For a continuously differentiable real-valued function on \([a,b]\), state the formula for total variation and identify the theorem that bounds each partition increment.
  5. Give an explicit partition check for the function in the second worked example, and verify that its sum is \(4\).