1

Explicit form of $\sum_{m=1}^{\infty}\frac{\cos(mk)}{m^2}$ for $k \in [-\pi,\pi]$?


I know for $k \in [0,2\pi]$ then the simplifies to $\frac{\pi^2}{6} - \frac{\pi}{2}k - \frac{k^2}{4}$ by Gradshteyn's book. For negative $k$, only the linear term changes sign. Does that mean the linear term vanishes for $k \in [-\pi,\pi]$?

3 Answers3

2

Since$^{(*)}$ $$ \sum_{m=1}^{\infty}\frac{\cos(mk)}{m^2}=\frac{\pi^2}{6} - \frac{\pi}{2}k + \frac{k^2}{4} \tag{1} $$ for $k\in[0,2\pi]$, and the LHS of $(1)$ is an even function of $k$, it must be equal to the even extension of the RHS of $(1)$ in the interval $[-2\pi,0]$. Therefore, $$ \sum_{m=1}^{\infty}\frac{\cos(mk)}{m^2}=\frac{\pi^2}{6} - \frac{\pi}{2}|k| + \frac{k^2}{4} \tag{2} $$ for $k\in[-2\pi,2\pi]$ --- in particular, for $k\in[-\pi,\pi]$.


$^{(*)}$ See, for instance, How to do $\sum_{k=1}^{\infty} \frac{\cos(kx)}{k^2}$? and Series $\sum_{n=1}^{\infty}\frac{\cos(nx)}{n^2}$.

Gonçalo
  • 15,869
  • Ah, that is very simple. Thank you.

    If you don't mind, in https://math.stackexchange.com/a/4444724/597047 i wanted to understand two things: where they use the fact that $0\leq x \leq 2\pi$ and how the third line of the $F(x)-F(0)$ work is obtained from the second. That is, where does that natural log come from?

    – KZ-Spectra Jun 05 '24 at 22:31
  • I suggest that you ask those questions to the author of that answer. – Gonçalo Jun 05 '24 at 22:44
1

If you are interested in using complex integration, the solution to a more general sum can be found (the solutions in the links do not use such approach).

Let's consider $$S(a)=\sum_{m=1}^\infty\frac{\cos(km)}{m^2+a^2}=\frac12\sum_{m=-\infty;\,m\neq0}^\infty\frac{e^{ikm}}{m^2+a^2}$$ and the function $$f(z)=\frac{2\pi i}{e^{2\pi iz}-1}\frac{e^{ikz}}{z^2+a^2},\quad k\in[0;2\pi]$$

We integrate this function along a big circle $C_R$ in the complex plane (radius $R\to\infty$). We choose the radius in such a way to avoid "dangerous" points $z=0,\pm1,\pm2,...$, choosing, for example $R_n=n+\frac12;\, n=1,2,3, ...\to\infty$. Then $$\oint_{C_R}f(z)dz=2\pi i\left(\underset{z=\pm1;\pm2;...}{\operatorname{Res}}\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}+\underset{z=0}{\operatorname{Res}}\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}+\underset{z=\pm ia}{\operatorname{Res}}\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}\right)$$ For $z$ on this big circle and $k\in[0;2\pi]\,\,\big|\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}\big|<\big|\frac{const}{z^2+a^2}\big|$

As $\oint_{C_R}\frac{dz}{z^2+a^2}\to 0$ at $R_n\to\infty$, and using $$\underset{z=\pm1;\pm2;...}{\operatorname{Res}}\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}=2S(a)$$ we get $$\oint_{C_R}f(z)dz\to0=2S(a)+\underset{z=0}{\operatorname{Res}}\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}+\underset{z=\pm ia}{\operatorname{Res}}\frac{2\pi i\,e^{ikz}}{e^{2\pi iz}-1}\frac1{z^2+a^2}$$ $$\Rightarrow 2S(a)=\frac\pi a\left(\frac{e^{ka}}{e^{2\pi a}-1}-\frac{e^{-ka}}{e^{-2\pi a}-1}\right)-\frac1{a^2}$$ $$\boxed{\,\,S(a)=\sum_{m=1}^\infty\frac{\cos(km)}{m^2+a^2}=\frac\pi {2a}\frac{\cosh a(k-\pi)}{\sinh \pi a}-\frac1{2a^2}\,\,}$$ Leading $a\to0$ $$S=S(0)=\frac{(k-\pi)^2}4-\frac{\pi^2}{12}=\frac{k^2}4-\frac{\pi k}2+\frac{\pi^2}6;\quad k\in[0;2\pi]$$ If we want to consider $k$ on the interval $[-2\pi;2\pi]$, the answer is $$S=\frac{k^2}4-\frac{\pi |k|}2+\frac{\pi^2}6;\quad k\in[-2\pi;2\pi]$$ as @Gonçalo explained in his post.

Svyatoslav
  • 20,502
1

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{{\displaystyle #1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\iverson}[1]{\left[\left[\,{#1}\,\right]\right]} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\sr}[2]{\,\,\,\stackrel{{#1}}{{#2}}\,\,\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} & \color{#44f}{\left.\sum_{m = 1}^{\infty} {\cos\pars{mk} \over m^{2}} \right\vert_{k\ \in\ \bracks{-\pi,\pi}}} = \Re\sum_{m = 1}^{\infty} {\pars{\expo{\ic\verts{k}}}^{m} \over m^{2}} \sr{\rm by\ def.}{=} \Re\on{Li}_{2}\pars{\expo{\ic\verts{k}}} \\[5mm] = & \ \Re\on{Li}_{\color{red}{2}}\pars{\rule{0pt}{5mm}\expo{2\pi\ic\bracks{\color{red}{\verts{k}/2\pi}}}\,} = {1 \over 2}\bracks{-\,{\pars{2\pi\ic}^{\color{red}{2}} \over \color{red}{2}!}\on{B}_{\color{red}{2}}\pars{\color{red}{\verts{k} \over 2\pi}}} \label{1}\tag{1} \end{align} The last expression is Jonqui$\grave{\rm e}$re's Inversion Formula and $\ds{\on{B}_{n}}$ is the $n$-order Bernoulli Polynomial.

Note that $\ds{\on{B}_{2}\pars{x} = x^{2} - x + 1/6}$ which reduces \eqref{1} to \begin{align} & \color{#44f}{\left.\sum_{m = 1}^{\infty} {\cos\pars{mk} \over m^{2}} \right\vert_{k\ \in\ \bracks{-\pi,\pi}}} = \bbx{\color{#44f}{{1 \over 4}k^{2} - {\pi \over 2}\verts{k} + {\pi^{2} \over 6}}} \\ & \end{align}

Felix Marin
  • 94,079