For every $x \in \mathbb{R}$ define $$I(x) = \begin{cases}0 & \text{if } x \leq 0\\1 & \text{if } x > 0\end{cases}$$ Suppose that $(x_n)$ is a sequence of distinct points in (a, b) and that the series $\sum_{n = 1}^\infty c_n$ converges absolutely. Define $f(x) = \sum_{n = 1}^\infty c_n I( x - x_n)$. Show that $f$ is a function of bounded variation and that $V_a^b f = \sum_{n = 1}^\infty |c_n|$.
It is easy to show that $f$ is a function of bounded variation with $V_a^b f \leq \sum_{n = 1}^\infty |c_n|$. But I am unsure of how to prove equality.
I was wondering if I could get a hint.
Thanks!