# How to calculate the sum of the series $\sum_{n=1}^{\infty}\frac{\cos^3(nx)}{n^2}$?

As the title says, I need to calculate the sum of the function series $$\sum_{n=1}^{\infty}\frac{\cos^3(nx)}{n^2}$$ so that I can find out if the series does simple or uniform converge to something.

Usually, for problems like this I need to write the sum like a difference of sums so when we write the sums, some terms will go away, but I can't think of a way to write this one.

Can you help me?

UPDATE

I managed to show that the series is uniform convergent even if I do not know to who it converges. Still, I wonder if there is any way to calculate the sum of the series.

• The answer will involve complex dilogarithms. Nov 21 '18 at 21:03
• @LordSharktheUnknown Ok... it's a bit too much for me and I probably won't understand since I am not soo advanced in math knowledge. Thanks for the info anyway. Nov 21 '18 at 21:15

$$\sum_{n\geq 1}\frac{\cos(nx)}{n^2} = \text{Re}\,\text{Li}_2(e^{ix})$$ is a periodic and piecewise-parabolic function, as the primitive of the sawtooth wave $$\sum_{n\geq 1}\frac{\sin(nx)}{n}$$.
Since $$\cos^3(nx)=\frac{1}{4}\cos(3nx)+\frac{3}{4}\cos(nx)$$ your function is a piecewise-parabolic function too.

In explicit terms it is a $$2\pi$$-periodic, even function which equals $$\frac{3}{4}\left(x-\frac{\pi}{3}\right)\left(x-\frac{2\pi}{3}\right)$$ over $$[0,2\pi/3]$$ and $$\frac{3}{4}\left(x-\frac{2\pi}{3}\right)\left(x-\frac{4\pi}{3}\right)$$ over $$[2\pi/3,\pi]$$.

This is very simple to derive by interpolation once the original series is evaluated at $$x\in\left\{0,\frac{\pi}{3},\frac{2\pi}{3},\pi,\frac{4\pi}{3},\frac{5\pi}{3}\right\}$$.


"As the title says, I need to calculate the sum of the function series..."

$$$$\bbx{\mbox{It's clear that}\ \sum_{n=1}^{\infty}{\cos^{3}\pars{nx} \over n^{2}} = {\pi^{2} \over 6\phantom{^{2}}}\ \mbox{when}\ \braces{\verts{x} \over 2\pi} = 0}$$$$

Hereafter, I'll consider the case $$\ds{\braces{\verts{x} \over 2\pi} \not= 0}$$. Lets $$\ds{r \equiv 2\pi\braces{\verts{x} \over 2\pi}}$$ with $$\ds{r \in \left[0,2\pi\right)}$$. Then \begin{align} &\bbox[10px,#ffd]{\sum_{n=1}^{\infty}{\cos^{3}\pars{nx} \over n^{2}}} = \sum_{n=1}^{\infty}{\cos^{3}\pars{n\verts{x}} \over n^{2}} = \sum_{n=1}^{\infty}{\cos^{3}\pars{nr} \over n^{2}} \\[5mm] = &\ \sum_{n=1}^{\infty}{\bracks{3\cos\pars{nr} + \cos\pars{3nr}}/4 \over n^{2}} \\[5mm] = &\ {3 \over 4}\,\Re\sum_{n = 1}^{\infty} {\pars{\expo{\ic r}}^{n} \over n^{2}} + {1 \over 4}\,\Re\sum_{n = 1}^{\infty} {\pars{\expo{3\ic r}}^{n} \over n^{2}} \\[5mm] = &\ {3 \over 4}\, \Re\mrm{Li}_{2}\pars{\exp\pars{\ic r}} + {1 \over 4}\, \Re\mrm{Li}_{2}\pars{\exp\pars{\ic\tilde{r}}} \\[2mm] &\ \mbox{where}\ \tilde{r} \equiv 2\pi\braces{3r \over 2\pi} = 2\pi\braces{3\braces{\verts{x} \over 2\pi}} \end{align} $$\ds{\mrm{Li}_{s}}$$ is the Polylogarithm Function. Note that $$\ds{3r \in \left[0,6\pi\right)}$$.

With Jonqui$$\grave{\mathrm{e}}$$re Inversion Formula, it's found \begin{align} &\left.\bbox[10px,#ffd]{\sum_{n=1}^{\infty}{\cos^{3}\pars{nx} \over n^{2}}}\,\right\vert _{\ \verts{x}/\pars{2\pi} \not=\ 0} \\[5mm] = &\ \bbx{{3 \over 4}\,\bracks{\pi^{2}\,\mrm{B}_{2}\pars{\braces{\verts{x} \over 2\pi}}} + {1 \over 4}\,\bracks{\pi^{2}\, \mrm{B}_{2}\pars{\braces{3\braces{\verts{x} \over 2\pi}}}}} \end{align}

$$\ds{\mrm{B}_{n}}$$ is a Bernoulli Polynomial. Note that $$\ds{\mrm{B}_{2}\pars{z} = z^{2} - z + {1 \over 6}}$$.