Let $f : [a, b] \to R$ be continuous and suppose that $|f|$ is of bounded variation over $[a, b]$.
Show that then $f$ is of bounded variation over $[a, b]$ and give a counterexample to the above statement in case $f$ is not continuous.
To prove above claim, I had tried to used the reverse triangular inequality, but only succeeded to prove "$f$ is of bounded variation $\implies |f|$ is of bounded variation".
Any adivce/hint to prove above claim?