# First Order Variation Example

I am in a introductory stochastic calculus class and came across and example from that asks for the first order variation and the quadratic variation of a continuous function. For example:

$f(x) = cos(2x)$ defined on the interval $-\pi/2 <= x <= \pi$

From the variation formula provided in wikipedia, I would think that the first order variation would be:

$\int_{-\pi/2}^\pi|-2sin(2x)|dx$

And the quadratic variation would be 0 since it is a continuously differentiable function. Is this the correct logic? Sorry if this is too basic of a question.

Total variation of order $1$:
Yes, you can apply this formula, but I would say it is more helpful to calculate this using the very definition of the total variation to see what the total variation of order $1$ means. Hint: Use that $f$ is monotonically increasing (decreasing, resp.) on $[-\pi/4,0] \cup [\pi/2,\pi]$ ($[-\pi/2,\pi/4] \cup [0,\pi/2]$, respectively).
Total variation of order $2$: