The summation of cosine $\sum_{k=1}^N \cos (k x)$ is well known (for example, see the previous question here) and is called Lagrange's trigonometric identity.
Is it possible to construct a similar solution for the absolute value of cosine? Namely, is there a closed form solution for the summation
$S(k, N) = \sum_{k=1}^N |\cos (k x)|$
I am hoping there is a trick I am missing...