# Proving a function has a bounded variation

$f$ is continuous on $[a,b]$ and $\vert f \vert$ has a bounded variation. I would like to show $f$ has bounded variation.

Using the intermediate value theorem we can take a partition such that (1) $f(x_{i+1}), f(x_i)\ge 0$ or $f(x_{i+1}), f(x_i) \le 0$. We can use the fact that $|f|$ has bounded variation to find an upper bound over the sums of $\vert f(x_{i+1})-f(x_i)\vert$. How do we know that the property (1) will be satisfied once our partition is refined?

-
Hint: Use the intermediate value theorem to force each pair $f(x_k), f(x_{k+1})$ to both be either $\geq 0$ or $\leq 0$.