TITLE: A continuous function on $[0,1]$ that is not of a bounded veriation
QUESTION [5 upvotes]: Suppose $f$ is continuous on [0, 1]. Must there be a nondegenerate closed subinterval $[a, b]$
of [0, 1] for which the restriction of $f$ to $[a, b]$ is of bounded variation? 
$\mathbf{My\ attempt}:$
Suppose for all $[a,b]\subseteq [0,1]$ with $a\neq b$, we have $f$ restricted to $[a,b]$ is not of a bounded variation, $i.e$ for all $n \in \mathbb{Z^+}$ there exists a partition $\mathcal{P}_{{n}}$ such that $V(f,\mathcal{P_n})\geq n$.
I am not sure if there would be some examples shows that is not true, I am using a contradiction here to conclude that there must be a nondegenerate interval of $[0,1$ such that $f$ restricted to this interval is of a bounded variation. I will appreciate it any help with that. Thank you.

REPLY [5 votes]: It is well known that any function of bounded variation is differentiable almost everywhere and that there exists a function that is continuous but differentiable nowhere. For the first statement use the fact that any function of bounded variation is the difference of two monotone functions and monotone functions are differentiable almost everywhere: http://mathonline.wikidot.com/lebesgue-s-theorem-for-the-differentiability-of-monotone-fun
For the second statement go to https://en.wikipedia.org/wiki/Weierstrass_function