# Total variation of a Fourier series

Let $f(x) = f(x+2\pi)$ be a bounded real function given by the Fourier series of the form
$$f(x) = \sum_{k=1}^N a_k \sin(kx + \phi_k).$$ What is the total variation $V(f)$ of this function over one period? In this case, one should be able to use that $V(f) = \int |f'(x)|dx$ and that $$f'(x) = \sum_{k=1}^{N} k a_k \cos(kx + \phi_k),$$ but how?

If instead the function is given by an infinite Fourier series, then what are the conditions on the $a_k$ terms for the total variation to be finite?

-
A periodic function is of bounded variation if and only if it is antiderivative of a finite signed measure on $[0,2\pi)$ (or, better, on the circle $\mathbb T$) with total mass $0$. Therefore, $\sum_{n\in \mathbb Z} c_n e^{inx}$ is the Fourier series of a function of bounded variation if and only if $\sum_{n\in\mathbb Z} in c_n e^{inx}$ is the Fourier series of a finite signed measure. Let $b_n=i n c_n$ to simplify notation. The following result can be found, for example, in An Introduction to Harmonic Analysis by Katznelson.
Theorem (Herglotz). $\sum_{n\in\mathbb Z} b_n e^{inx}$ is the Fourier series of a positive measure if and only if the sequence $(b_n)$ is positive definite. The latter means that $$\sum_{n,m}b_{n-m}z_n\overline{z_m}\ge 0\quad \text{ for all sequences }\ z_n\in \mathbb C \tag1$$ where only finitely many $z_n$ are nonzero.
Hence, $\sum_{n\in \mathbb Z} c_n e^{inx}$ is the Fourier series of a function of bounded variation if and only if the sequence $(nc_n)$ is the difference of two positive definite sequences. I don't think this is a practical condition, but then, neither is (1).