Example of differentiable function which has non-zero quadratic variation

The quadratic variation of a function $f : [a,b] \to \mathbb R$ is defined to be $$ \sup_P \sum_{i=1}^n (f(x_i) - f(x_{i-1}))^2 $$ where the supremum is taken over all partitions $P$ such that $a = t_0 < t_1 < \ldots < t_n = b$. If $f : [a,b]$ is continuously differentiable, then its quadratic variation vanishes. I know examples of non-differentiable functions where the quadratic variation is non-zero, for example a typical path of a brownian motion.

Do you know an example of a differentiable function $f : [a,b] \to \mathbb R$ which has non-zero quadratic variation?


Since it's not made clear yet in the question I will here assume the definition $$Q(f,[a,b]) \equiv \limsup\limits_{|\Pi|\to 0}\sum_\Pi (f(x_k)-f(x_{k+1}))^2$$ for the quadratic variation where $\Pi$ denotes a partition of $[a,b]$ and $\limsup$ is taken over all partitions with a given mesh size $|\Pi|$.


For the differentiable function $$f(x) = \left\{\matrix{x^2\sin\left(\frac{1}{x^4}\right) & x \not= 0\\0 & x = 0}\right.$$

and the partition

$$x_{k} = \left\{\matrix{\frac{1}{\sqrt[4]{2\pi(n+k) + \frac{\pi}{2}}} & k\text{ even }\\\frac{1}{\sqrt[4]{2\pi(n+k)}} & k\text{ odd }}\right.$$

we get

$$Q(f,[0,1]) \geq \lim_{n\to\infty}\sum_{k=0}^n(f(x_k)-f(x_{k+1}))^2 = \frac{1}{2\pi}\int_0^1 \frac{{\rm d}x}{1+x} = \frac{\log 2}{2\pi} > 0$$