# 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?

• You can't take the supremum over all partitions, otherwise no non-constant function could have zero quadratic variation. Are you taking maybe the $\limsup$ as the mesh of the partition tends to $0$? – Daniel Fischer Jul 8 '15 at 23:55
• Yes, thank your for pointing out! I just generalised the definition for total variation without thinking about this case, for total variation by the triangle inequality for finer partitions the sum increases, But in the quadratic case $(f(a) - f(c) + f(c) - f(b))^2 = (f(a)-f(c)^2 + (f(c) - f(b))^2 - 2(f(a)-f(c))(f(c)-f(b))$, so it could decrease and therefore just taking the sup does not works here. – StefanH Jul 9 '15 at 13:17
• Just one comment: The definition you gave is that of $2$-variation. If you consider paths of a stochastic process, then the paths of the quadratic variation process will be smaller than or equal to the $2$-variation of the paths in value. However, the converse may be false. The classical example here, too, is Brownian motion. See also here: en.wikipedia.org/wiki/P-variation. – Kehrwert Jul 18 '20 at 8:17

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$$

• Just for to record, because it took me a while to see that the sums are indeed Riemann-sums for the integral. We have $f(x_k) = 0$ if $k$ is odd, and $f(x_k) = 1/\sqrt{2\pi(n+k)+pi/2}$ otherwise, therefore (suppose $n$ is even, otherwise on extra term needs to be added at the end) <see next comment> – StefanH Jul 9 '15 at 11:44
• \begin{align*} \sum_{k=0}^n (f(x_k) - f(x_{k+1})^2 = \sum_{k=0}^n \left(f(x_{2\left \lfloor \frac{k+1}{2} \right\rfloor}\right)^2 & = f(x_0)^2 + \sum_{i=1}^{n/2} 2f(x_{2i})^2 \\ & = \frac{1}{2\pi}\frac{1}{n + \frac{1}{4}} + \frac{1}{2\pi} \sum_{i=1}^{n/2} \frac{2}{n+2i + \frac{1}{4}} \\ & = \frac{1}{2\pi}\left( \frac{1}{1+1/4n}\frac{1}{n} + \sum_{i=1}^{n/2} \frac{1}{1+2i/n+1/4n}\cdot \frac{2}{n}\right) \end{align*} The last sum is a Riemann-sum for a partition where the first interval has length $1/n$ and all the other $2/n$, and the point $2i/n+1/4n$ is selected from each. – StefanH Jul 9 '15 at 12:11
• Okay, I see this argument is not working, that are not Riemann-sums, as the "partitions" are to large, try $n=2$ for example, then we have $[0,1/n]$, and $[1/n, 3/n]$ as intervalls, which is by $1/n$ to big, and this is always the case, but luckily this "overlaying" part vanishes for $n\to\infty$. More precisely: \begin{align*} & \frac{1}{1+1/4n}\frac{1}{n} + \sum_{i=1}^{n/2} \frac{1}{1+2i/n+1/4n}\cdot \frac{2}{n} \\ & = \frac{1}{1+1/4n}\frac{1}{n} + \sum_{i=1}^{n/2-1} \frac{1}{1+2i/n+1/4n}\cdot \frac{2}{n} + \frac{1}{1+1+\frac{1}{4n}} \cdot \frac{2}{n} \\ \end{align*}Because <next comment> – StefanH Jul 9 '15 at 13:02
• $$\frac{1}{1+1+\frac{1}{4n}} \cdot \frac{2}{n} = \frac{1}{2n}\left( \frac{4}{2+1/4n}\right) = \frac{1}{2n}\left( 1 + \frac{4 - (2+1/4n)}{2+1/4n}\right)$$ we can write the last sum above as $$\frac{1}{1+1/4n}\frac{1}{n} + \sum_{i=1}^{n/2-1} \frac{1}{1+2i/n+1/4n}\cdot \frac{2}{n} + \frac{1}{1+1}\frac{1}{n} + \frac{1}{2n}\cdot \frac{4 - (2+1/4n)}{2+1/4n}.$$ Now the last three terms consitute indeed a Riemann-sum on $[0,1]$, where in the last interval $[(n-1)/n,1]$ the point $1$ was selected. The fouth summand goes to zero as $n \to \infty$, therefore the whole expression goes to the integral. – StefanH Jul 9 '15 at 13:02
• @Stefan Very good. It was so messy adding all the fine details so I left it out, but it's nice to have them here:) – Winther Jul 9 '15 at 21:12