# A continuous function on $[0,1]$ not of bounded variation

I'm looking for a continuous function $f$ defined on the compact interval $[0,1]$ which is not of bounded variation.

I think such function might exist. Any idea?

Of course the function $f$ such that $$f(x) = \begin{cases} 1 & \text{if x \in [0,1] \cap \mathbb{Q}} \\\\ 0 & \text{if x \notin [0,1] \cap \mathbb{Q}} \end{cases}$$ is not of bounded variation on $[0,1]$, but it is not continuous on $[0,1]$.

Consider any continuous function passing through the points $(\frac1{2n},\frac1n)$ and $(\frac1{2n+1},0)$, e.g. composed of linear segments. It must have infinite variation because $\sum\frac1n=\infty$.

• Thank you for your answer. Can you draw an example of your function? Dec 28 '14 at 0:35
• @OlivierOloa I'm a little tired so this will have to do: i.stack.imgur.com/phWFJ.png. It should be easy to imagine anyway. Dec 28 '14 at 1:44
• It is OK! Thanks! Dec 28 '14 at 1:54
• There is no such continuous function over the compact set $[0,1]$ since the construction implies that the function is unbounded. May 18 '18 at 11:22

For example $x\sin(1/x)$ (and 0 for $x=0$).

The variation is unbounded, because it is bounded ;-) from below by the sum of absolute values of extrema, but it is the harmonic-like series.

Here is an general idea. A function of bounded variation on $$[0,1]$$ is necessary differentiable a.e.. In another word, any continuous function which is not differentiable on a positive measure set is not of bounded variation. So, Weierstrass Function is not of bounded variation for sure.
Also, some function which oscillate too much can not be bounded variation as well, for example $$u(x)=x^a\sin(\frac{1}{x^b})$$ is not of bounded variation as long as $$1 \le a\leq b$$.
• Yes, with $1 < a \le b$ and $u(0)=0$, this also provides an example of a function that is differentiable everywhere but not of bounded variation. Mar 25 '16 at 1:12
• The property about $x^a \sin(1/x^b)$ is exercise 4.4b on page 205 of Benedetto-Czaja, or exercise 35 of page 119 in Royden-Fitzpatrick. Both exercises assume $a$ and $b$ are positive. Note that if $a$ is negative then $x^a \sin(1/x^b)$ will be unbounded, so will never have bounded variation. Aug 12 at 12:59
The Weierstrass Function restricted to the interval $[0,1]$