# Functions of Bounded Variation: Part 1

### Introduction

In the last two posts we studied monotone functions which vary in the same direction in a given interval. Here we will study functions which do not vary too much. In a sense continuous functions also don't vary too much (for example they are bounded on closed intervals). But here we need to discuss variation in a different sense. More technically we try to measure variation in smaller parts of an interval and then add up these variations to form total variation. We formalize these concepts now

### Functions of Bounded Variation

First we need to understand the concept of partition of an interval. Let $[a, b]$ be a closed interval and let $x_{0}, x_{1}, x_{2}, \ldots, x_{n}$ be a finite sequence of points such that $a = x_{0} < x_{1} < x_{2} < \cdots < x_{n - 1} < x_{n} = b$. Then the sequence of points $x_{i}$ i.e. the set $\{x_{0}, x_{1}, x_{2}, \ldots, x_{n}\}$ is called a partition of the interval $[a, b]$. A partition $P'$ is said to finer than a partition $P$ if $P \subseteq P'$. Then norm of a partition $P = \{x_{0}, x_{1}, x_{2}, \ldots, x_{n}\}$ is defined as the length of largest subinterval $[x_{i - 1}, x_{i}]$ and is denoted by $\left\|P\right\|$. It should be obvious that if $P \subseteq P'$ then $\left\|P\right\| \geq \left\|P'\right\|$. Thus making a partition finer tends to decrease its norm and in worst case does not change the norm.

The idea of partitions helps us to treat the subdivision of an interval into many sub-intervals in a technical and straightforward manner and it will be found later that this is very useful while dealing with the theory of Riemann Integration. For now we use this concept to define the concept of variation.

Let $f$ be a function defined on an interval $[a, b]$. Let $P = \{x_{0}, x_{1}, x_{2}, \ldots, x_{n}\}$ be a partition of the interval $[a, b]$. The sum
$\displaystyle \sum_{i = 1}^{i = n}|f(x_{i}) - f(x_{i - 1})|$
is said to be the variation of $f$ corresponding to a partition $P$ of interval $[a, b]$ and is denoted by $V_{f}(P)$. It is clear that $V_{f}(P) \leq V_{f}(P')$ whenever $P \subseteq P'$. Next consider the set $\{V_{f}(P) \mid P\,\text{is a partition of}\,[a, b]\}$. If this set is bounded above then we say that the function $f$ is of bounded variation in interval $[a, b]$ and the least upper bound (or supremum) of this set is called the total variation of $f$ in interval $[a, b]$ and is denoted by $V_{f}(a, b)$.

It should be clear that $V_{f}(a, b)$, if it exists, is non-negative. Also if $c$ is an interior point of $[a, b]$ and $f$ is of bounded variation in $[a, b]$ then $f$ is of bounded variation in $[a, c]$ with $V_{f}(a, c) \leq V_{f}(a, b)$. It is also not too difficult to observe that the variation is an additive function in the sense that:
If $f$ is of bounded variation in $[a, b]$ and $c \in (a, b)$ then the function is of bounded variation in both $[a, c]$ and $[c, b]$ and $V_{f}(a, b) = V_{f}(a, c) + V_{f}(c, b)$

For, if we have $P_{1}$ and $P_{2}$ as partitions of $[a, c]$ and $[c, b]$ then $P = P_{1} \cup P_{2}$ is a partition of of $[a, b]$ with $V_{f}(P) = V_{f}(P_{1}) + V_{f}(P_{2})$. This implies that $V_{f}(a, c) + V_{f}(c, b) \leq V_{f}(a, b)$. On the other hand if $P$ is a partition of $[a, b]$ then we can add the point $c$ to $P$ to get a finer partition $P'$ so that $V_{f}(P) \leq V_{f}(P')$. And then if $P_{1} = P' \cap [a, c], P_{2} = P' \cap [c, b]$, we have $V_{f}(P) \leq V_{f}(P') = V_{f}(P_{1}) + V_{f}(P_{2})$ and therefore $V_{f}(a, b) \leq V_{f}(a, c) + V_{f}(c, b)$.

And we can establish that:
If $f$ and $g$ are of bounded variation in $[a, b]$ then so are the following functions:
• $f \pm g$
• $k\cdot f$ where $k$ is a constant
• $f \cdot g$
• $f/g$ provided $g$ is bounded away from zero in $[a, b]$ i.e. when there is a number $k > 0$ such that $|g(x)| > k$ in $[a, b]$.
Let's now try to find examples of functions of bounded variation. A quick guess would be that continuous functions would automatically be of bounded variation because being continuous their values don't vary much near a point. However this guess is wrong as can be seen by the simple example below.

Let $f(x) = x\sin(1/x)$ for $x \neq 0$ and $f(0) = 0$. Then the function $f$ is continuous on $[0, 1]$. Let us form the partition $P = \{x_{0}, x_{1}, x_{2}, \ldots, x_{n}\}$ where $n$ is even and
$\displaystyle x_{0} = 0, x_{n} = 1, x_{1} = \frac{2}{(n - 1)\pi}, x_{2} = \frac{2}{(n - 2)\pi}, \cdots, x_{n - 1} = \frac{2}{\pi}$

Then
$\displaystyle |f(x_{1}) - f(x_{0})| = \frac{2}{(n - 1)\pi}$
$\displaystyle |f(x_{2}) - f(x_{1})| = \frac{2}{(n - 1)\pi}$
$\displaystyle |f(x_{3}) - f(x_{2})| = \frac{2}{(n - 3)\pi}$
$\displaystyle |f(x_{4}) - f(x_{3})| = \frac{2}{(n - 3)\pi}$
$\cdots$
$\displaystyle |f(x_{n - 1}) - f(x_{n - 2})| = \frac{2}{\pi}$
$\displaystyle |f(x_{n}) - f(x_{n - 1})| = \sin 1 - \frac{2}{\pi}$
so that
$\displaystyle \sum_{i = 1}^{n}|f(x_{i}) - f(x_{i - 1})| = \frac{4}{\pi}\left(\frac{1}{3} + \frac{1}{5} + \frac{1}{7} + \cdots + \frac{1}{n - 1}\right) + \sin 1$

Clearly the sum on the right diverges as $n \to \infty$ and hence the sum on the left is not bounded for all partitions $P$ of $[0, 1]$. Thus although the function $f$ does not vary too much near a single point, but it oscillates too much in the neighborhood of zero and these oscillations tend to make the total variation as unbounded.

So just continuity alone does not guarantee that a function is of bounded variation. What conditions a function must satisfy then to be of bounded variation? To answer this question we need to analyze the sum
$\displaystyle \sum_{i = 1}^{n}|f(x_{i}- f(x_{i - 1})|$

Clearly if we could remove the bars (the modulus/absolute values) above then the sum telescopes to $f(x_{n}) - f(x_{0}) = f(b) - f(a)$. This can happen if the value $f(x_{i}) - f(x_{i - 1}) \geq 0$ for all $i$ so that the function is increasing on $[a, b]$. Hence it follows that if a function $f$ is increasing then $f$ is of bounded variation. Similarly if $f$ were decreasing the above sum would telescope to $f(a) - f(b)$. Thus we see that
If a function $f$ is monotone on $[a, b]$ then it is of bounded variation in $[a, b]$
And thus the sum and difference of two monotone functions is also of bounded variation.

On the other hand, the continuity in entire interval is not necessary. However if the function is continuous in the closed interval and the differentiable in the corresponding open interval then we can use Mean Value Theorem to get
$\displaystyle \sum_{i = 1}^{n}|f(x_{i}- f(x_{i - 1})| = \sum_{i = 1}^{n}|f'(c_{i})|(x_{i} - x_{i - 1}),\,\, c_{i} \in (x_{i - 1}, x_{i})$
so that if the derivative $f'$ is bounded in $(a, b)$ (i.e. $|f'(x)| < M$ for all $x \in (a, b)$) then the above sum is no more than $M(b - a)$. It follows that:
If a function $f$ is continuous in $[a, b]$ and has a bounded derivative in $(a, b)$ then the function $f$ is of bounded variation in $[a, b]$.

From this result it follows that the function $f(x) = x\sin(1/x), x \neq 0, f(0) = 0$ is of bounded variation in any closed interval which does not include zero. Again if we change the function slightly so that $f(x) = x^{2}\sin(1/x), x \neq 0, f(0) = 0$ then the derivative is bounded in any finite interval so that the function is of bounded in any finite closed interval.

But again boundedness of derivative is not essential for the function to be of bounded variation. Clearly we can take any monotone function whose derivative becomes infinite at certain point and it will be of bounded variation because of being monotone. For example the function $f(x) = \sqrt{x}$ is monotone in any interval $[0, a]$, but the derivative $f'(x) = 1/(2\sqrt{x})$ is unbounded in $(0, a)$.

Thus we have seen two different conditions which are sufficient but not necessary to guarantee that the function under consideration is of bounded variation. To find out the essence of bounded variation and obtain necessary as well as sufficient conditions for it we need to examine the total variation of a function in further detail.

### Total Variation as a Function of the Interval

Let $f$ be a function of bounded variation in $[a, b]$. Then we have seen above that the function is of bounded variation in any sub-interval of $[a, b]$. This allows us to consider the total variation $V_{f}(a, b)$ as a function of the interval $[a, b]$. More formally let $x \in [a, b]$ and we will study $V_{f}(a, x)$ as a function of $x$. Clearly in case of degenerate interval $V_{f}(a, a) = 0$. We have seen above that the function $V_{f}(a, x)$ is an increasing function of $x$.

We now consider the function $g(x) = V_{f}(a, x) - f(x)$ in $[a, b]$. We will show that the function $g$ is also increasing in $[a, b]$. Let $a \leq x < y \leq b$ and we will prove that $g(x) \leq g(y)$. Clearly
\displaystyle \begin{aligned} g(y) - g(x) &= \{V_{f}(a, y) - f(y)\} - \{V_{f}(a, x) - f(x)\}\\ &= V_{f}(x, y) - \{f(y) - f(x)\}\\ &\geq 0\end{aligned}
because $|f(y) - f(x)|$ is itself a variation of $f$ for the interval $[x, y]$ and partition $P = \{x, y\}$.

Thus we have established that:
If a function $f$ is of bounded variation in $[a, b]$ then both the function $V_{f}(a, x)$ and $V_{f}(a, x) - f(x)$ are increasing in $[a, b]$.

Since $f(x) = V_{f}(a, x) - \{V_{f}(a, x) - f(x)\}$ it follows immediately that:
A function is of bounded variation in a closed interval if and only if it can be represented as a difference of two increasing functions.

Therefore the monotone functions lie at the heart of functions of bounded variation. This post serves as an introduction to functions of bounded variations and establishes their fundamental properties and finally links them to the monotone functions. In the next post we will study their link with continuous functions and some of their applications.