So I have been trying for a few days to figure out the sum of

$$ S = \sum_{k=1}^\infty \frac{1}{k^2 - a^2} $$ where $a \in (0,1)$. So far from my nummerical analysis and CAS that this sum equals

$$ S = \frac{1}{2a} \left[ \frac{1}{a} \, - \, \pi \cot(a\pi) \right] $$

But I have not been able to prove this yet. Anyone know how? My guess is that the sum of this series is related to fourier-series but nothing particalr comes to mind.

For the easy values, I have been able to use telescopic series, and a bit of algebraic magic, but for the general case I am stumpled. Anyone have any ideas or hints? Cheers.

  • 11
    $\begingroup$ There is the identity $$\frac{\sin\,\pi x}{\pi x}=\prod_{k=1}^\infty \left(1-\frac{x^2}{k^2}\right)$$ Take the logarithm, differentiate, see what happens. $\endgroup$ May 5, 2012 at 19:17
  • 6
    $\begingroup$ Why was this downvoted? $\endgroup$
    – t.b.
    May 5, 2012 at 19:22
  • $\begingroup$ Did you mean $k=1$ underneath the sum sign? $\endgroup$ May 5, 2012 at 19:30
  • $\begingroup$ Yes he did, @Joel. $\endgroup$ May 5, 2012 at 19:33
  • $\begingroup$ @N3buchadnezzar your expected answer has an error. Checked against Wolfram Alpha's snipurl.com/23dq2hp and instead of plus sign, it shows minus sign. Follow J.M's hint, your might approach the answer. $\endgroup$ May 5, 2012 at 20:19

5 Answers 5


This question was settled in the Mathematics chatroom, but I'll put up the solution here for reference.

Starting with the infinite product

$$\frac{\sin\,\pi x}{\pi x}=\prod_{k=1}^\infty \left(1-\frac{x^2}{k^2}\right)$$

taking the logarithm of both sides gives

$$\log\left(\frac{\sin\,\pi x}{\pi x}\right)=\log\left(\prod_{k=1}^\infty \left(1-\frac{x^2}{k^2}\right)\right)=\sum_{k=1}^\infty \log\left(1-\frac{x^2}{k^2}\right)$$

Differentiation gives

$$\frac{\pi x}{\sin\,\pi x}\left(\frac{\cos\,\pi x}{x}-\frac{\sin\,\pi x}{\pi x^2}\right)=\sum_{k=1}^\infty \frac{-2x}{k^2\left(1-\frac{x^2}{k^2}\right)}$$

which simplifies to

$$\pi\cot\,\pi x-\frac1{x}=-2x\sum_{k=1}^\infty \frac1{k^2-x^2}$$


$$\sum_{k=1}^\infty \frac1{k^2-x^2}=\frac1{2x^2}-\frac{\pi\cot\,\pi x}{2x}$$

  • $\begingroup$ While we are taking logarithm should'nt one be careful? i.e $\frac{\sin(\pi x)}{\pi x}$ can be negative real number for example. What branch are we considering? $\endgroup$ May 1, 2020 at 13:50
  • 3
    $\begingroup$ @S.S "can be negative real number" - have you looked at a plot of $\dfrac{\sin\pi x}{\pi x}$ for $0<x<1$ (cf. the title of this question)? $\endgroup$ May 1, 2020 at 14:43
  • $\begingroup$ Sorry I forgot that that the domain you were talking about was $x\in(0,1)$. $\endgroup$ May 3, 2020 at 12:05

Let us consider the principal value of the conditionally convergent infinite harmonic series $$ \begin{align} f(z) &=\sum_{k=-\infty}^\infty\frac{1}{z+k}\\ &=\lim_{n\to\infty}\sum_{k=-n}^n\frac{1}{z+k}\tag{1a}\\ &=\lim_{n\to\infty}\frac1z+\sum_{k=1}^n\frac{1}{z-k}+\frac{1}{z+k}\tag{1b}\\ &=\frac1z+\sum_{k=1}^\infty\frac{2z}{z^2-k^2}\tag{1c} \end{align} $$ The series in $(1c)$ converges absolutely for all non-integer $z$.

Each of the terms in $(1c)$ is odd, so $f(-z)=-f(z)$.

The series in $(1a)$ shows that $f$ has a simple pole with residue $1$ at each integer.

$f$ has period $1$: $$ \begin{align} f(z+1)-f(z) &=\lim_{n\to\infty}\sum_{k=-n}^n\frac{1}{z+k+1}-\frac{1}{z+k}\\ &=\lim_{n\to\infty}\frac{1}{z+n+1}-\frac{1}{z-n}\\ &=0\tag{2} \end{align} $$ $f(1/2)=0$: $$ \begin{align} f(1/2) &=\lim_{n\to\infty}\sum_{k=-n}^n\frac{1}{k+1/2}\\ &=\lim_{n\to\infty}\frac{1}{n+1/2}\\ &=0\tag{3} \end{align} $$ Take the derivative of $f$: $$ f'(z)=\lim_{n\to\infty}\sum_{k=-n}^n\frac{-1}{(z+k)^2}\tag{4} $$ This series converges absolutely. and the terms monotonically go to $0$ as $|\Im(z)|\to\infty$.

Let's consider $if(iy)$ as $y\to\infty$. Using $(1c)$, we get $$ \begin{align} if(iy) &=\frac1y+\sum_{k=1}^\infty\frac{2y}{y^2+k^2}\\ &=\frac1y+\sum_{k=1}^\infty\frac{2/y}{1+(k/y)^2}\tag{5} \end{align} $$ As $y\to\infty$, the summation in $(5)$ is a Riemann sum for the integral $$ \int_0^\infty\frac{2\mathrm{d}x}{1+x^2}=\pi\tag{6} $$ Thus, $if(iy)\to\pi$ as $y\to\infty$ and $if(iy)\to-\pi$ as $y\to-\infty$.

Since $f$ has period $1$ and $f'(z)\to0$ as $|\Im(z)|\to\infty$, it is evident that $f(z)\to-i\pi$ as $\Im(z)\to\infty$ and $f(z)\to i\pi$ as $\Im(z)\to-\infty$. This means that $f$ is bounded when away from the real axis.

The functions $f$ and $\pi\cot(\pi z)$ have the same poles, with identical residues, and both are bounded when away from the real axis. Thus, their difference is bounded for all $z$. Since their difference is analytic and bounded, it must be constant. This difference is $0$ at $1/2$, so it must be $0$ everywhere. Therefore, the principal value of $$ \sum_{k=-\infty}^\infty\frac{1}{z+k}=\pi\cot(\pi z)\tag{7} $$ for all $z$.

Combining $(1c)$ and $(7)$ yields $$ \frac1z+\sum_{k=1}^\infty\frac{2z}{z^2-k^2}=\pi\cot(\pi z)\tag{8} $$ Therefore, $$ \begin{align} \sum_{k=1}^\infty\frac{1}{k^2-z^2} &=\frac{1}{2z^2}-\frac{\pi\cot(\pi z)}{2z}\\ &=\frac{1}{2z}\left[\frac1z-\pi\cot(\pi z)\right]\tag{9} \end{align} $$

  • 1
    $\begingroup$ A real approach is given in this answer, $\endgroup$
    – robjohn
    Feb 23, 2021 at 14:19

You may prove this by expanding $\cos(zx)$ in Fourier series as shown here.

This paper could help too as well as articles in SE dealing with evaluation of $\zeta(n)$ with $n$ even.


@Kobe found here by means of residue calculus

$$\sum_{k = 1}^\infty \frac{1}{k^2 + a^2} = \frac{\pi\coth(\pi a)}{2a} - \frac{1}{2a^2}$$

To get your result, replace $a$ by $ia$.


$\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{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \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{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $\ds{\bbox[5px,#ffd]{}}$

\begin{align} S & \equiv \bbox[5px,#ffd]{\sum_{k = 1}^{\infty} {1 \over k^{2} - a^{2}}} = \sum_{k = 0}^{\infty} {1 \over \pars{k + 1 - a}\pars{k + 1 + a}} \\[5mm] & = {\Psi\pars{1 - a} - \Psi\pars{1 + a} \over -2a} = {\Psi\pars{1 - a} - \bracks{\Psi\pars{a} + 1/a} \over -2a} \\[5mm] & = {1 \over -2a}\bracks{\pi\cot\pars{\pi a} - {1 \over a}} = \bbx{{1 \over 2a}\bracks{{1 \over a} - \pi\cot\pars{\pi a}}} \\ & \end{align}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.