How one can prove that the infinite sum of this function equals its integral $$ \sum_{n=-\infty}^\infty\frac{\cos\pi\sqrt{n^2+1}}{3+4n^2}=\int_{-\infty}^\infty\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}dx\ ? \tag{1} $$

My analysis: Mathematica wasn't able to return any closed form for the integral or the sum. Then I checked this relation by numerical computations and it agreed to about 20 decimal places.

I know from this question Sum equals integral that the function $\text{sinc}\ x=\frac{\sin x}{x}$ has the same property $$ \int_{-\infty}^{+\infty} {\rm sinc}\, x \, dx = \sum_{n = -\infty}^{+\infty} {\rm sinc}\, n = \pi $$ I tried to find a closed form for the integral $(1)$ but couldn't.

Motivation: I was challenged by a friend to prove this relation. I'm curious how one can prove it?

Note: There has been a suggestion to straightforwardly apply Euler-MacLauren summation formula to prove this statement. Though I don't know why it can not be applied in this case, I checked numerically whether the sum equals the integral for the similar looking functions $f_1(x)=\frac{\cos\pi\sqrt{x^2+1}}{1+x^2}$ and $f_2(x)=\frac{\cos\pi\sqrt{x^2+1}}{2+x^2}$, but in both cases there was a difference of about 1% between the sum and the integral. In starck contrast to this, using the same algorithm for $\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}$ there wasn't any difference between the sum and the integral at least to 20 decimal places. So I think it is very unlikely that 1% error can be attributed to computational error.

  • $\begingroup$ @fibo: your numerical evidence is wrong. Type this command in Mathematica and you will see that the integral and the series are the same thing: $$ N\left[\sum _{n=-2000}^{+2000} \frac{\text{Cos}[\pi \text{Sqrt}[n{}^{\wedge}2+1]]}{3+4n{}^{\wedge}2}-\text{NIntegrate}\left[\text{Re}\left[\text{BesselK}[1,-i \pi +x] \text{Sinh}\left[\frac{x}{2}\right]\right],\{x,0,+\infty \}\right]\right]$$ $\endgroup$ – Jack D'Aurizio Dec 27 '15 at 23:21
  • $\begingroup$ @JackD'Aurizio you clearly misunderstood me. What I mean is, EM summation 'works' for $\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}$, but it does not work for similar looking function $\frac{\cos\pi\sqrt{x^2+1}}{1+x^2}$. And by integral I didn't mean the BesselK integral in your comment above. Please see the note I added to the question. $\endgroup$ – user294724 Dec 27 '15 at 23:27
  • $\begingroup$ your question deals with a particular sum and a particular integral. My deleted answer shows they are the same, and also shows the integral equals the integral with the Bessel function appearing above. $\endgroup$ – Jack D'Aurizio Dec 28 '15 at 1:13

For any positive $a$, define

$$f_a(x) =\frac{\cos\pi\sqrt{x^2+1}}{x^2+a^2}$$

What you have observed is caused by the equality $$\sum_{n=-\infty}^\infty f_a(n) - \int_{-\infty}^\infty f_a(x) dx = \frac{2\pi}{a(e^{2\pi a} - 1)}\times \begin{cases} \cosh\pi\sqrt{a^2-1}, & a > 1\\ \\ \cos\pi\sqrt{1-a^2}, & a < 1 \end{cases} \tag{*1} $$ and the fact $$\cos\pi\sqrt{1-a^2} = \cos\frac{\pi}{2} = 0\quad\text{ when } a^2 = \frac34$$

To see why $(*1)$ is true, we use the fact $f_a(n)$ is an even function in $n$ to rewrite LHS of $(*1)$ as

$$2 \left[\sum_{n=0}^\infty f_a(n) - \left(\int_0^\infty f_a(x) dx + \frac12 f_a(0)\right)\right]$$

This is similar to what you will find in the Abel-Plana formula${}^{\color{blue}{[1]}}$,

For any function $f(z)$ which is

  1. continuous on $\Re z \ge 0$ and analytic on $\Re z > 0$
  2. $f(z) \sim o(e^{2\pi|\Im z|} )$ as $\Im z \to \pm \infty$, uniformly with respect to $\Re z$.
  3. $f(z) \sim O(e^{2\pi|\Im z|}/|z|^{1+\epsilon})$ as $\Re z \to +\infty$ ${}^{\color{blue}{[2]}}$.

we have

$$\sum_{n=0}^\infty f(n) = \int_0^\infty f(x) dx + \frac12 f(0) + i \int_0^\infty \frac{f(it) - f(-it)}{e^{2\pi t}-1} dt\tag{*2}$$

However, $f_a(x)$ doesn't exactly satisfy the condition above. It has two poles at $\pm a i$. After a little bit of tweaking of the contour used in the proof of the Abel-Plana formula, one find:

$$\text{LHS}(*1) = 2i \lim_{\epsilon\to 0^{+}} \int_0^\infty \frac{f_a(it+\epsilon) - f_a(-it+\epsilon)}{e^{2\pi t} - 1} dt$$

For $t \ne a$, since $f_a(z)$ is even, the two pieces in $f_a(it+\epsilon) - f_a(-it+\epsilon)$ cancels out as $\epsilon \to 0^{+}$.
For $t \approx a$, the two pieces can be combined to a integral of $\frac{f(it)}{e^{2\pi t}-1}$ over a circle centered at $a$.
As a result, RHS reduces to

$$(2i)(2\pi i)\text{Res}_{t = a}\left[\frac{\cos\pi\sqrt{1-t^2}}{(a^2 - t^2)(e^{2\pi t} - 1)}\right] = \frac{2\pi}{a(e^{2\pi a}-1)}\times\begin{cases} \cosh\pi\sqrt{a^2-1}, & a > 1\\ \\ \cos\pi\sqrt{1-a^2}, & a < 1 \end{cases} $$ Back to the special case $a^2 = \frac{3}{4}$ which corresponds to the equality in question.

When $a^2 = \frac{3}{4}$, the "pole" of $f_a(z)$ at $z = \pm a i$ become removable singularities. The original version of Abel-Plana formula in $(*2)$ applies. Since $f_a(x)$ is even, last integral in $(*2)$ vanishes and the equality follows. This explain why the sum equal to the integral for $\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}$ but not other similar looking integrand like $\frac{\cos\pi\sqrt{x^2+1}}{1+x^2}$ or $\frac{\cos\pi\sqrt{x^2+1}}{2+x^2}$.


  • $\color{blue}{[1]}$ For more details of Abel-Plana formula and its derivation, please refer to $\S 8.3$ of Frank W. J Olver's book: Asymptotics and Special Functions.
  • $\color{blue}{[2]}$ In order to convert the AP formula on finite sum in Olver's book to infinite sum here, I have added a condition $(3)$ for this particular problem. The whole purpose of that is to force following limits to zero. $$\lim\limits_{b\to\infty} f(b) = 0\quad\text{ and }\quad\lim\limits_{b\to\infty}\int_0^\infty \frac{f(b+it)-f(b-it)}{e^{2\pi t} - 1}dt = 0$$ For other $f(z)$, if one can justifies these limits, we can forget condition $(3)$ and the AP formula remains valid.
| cite | improve this answer | |
  • $\begingroup$ Nice answer! +1 $\endgroup$ – Markus Scheuer Jan 2 '16 at 7:48
  • $\begingroup$ (+1) Very neat and clever. So, Abel-Plana was the key, rather than EML. $\endgroup$ – Jack D'Aurizio Jan 2 '16 at 14:29
  • $\begingroup$ I thought something needed to be said about the behavior of $f(z)$ as $\Re(z) \to +\infty$. But now you seem to be saying that the formula can't be applied to a function like $\frac{\sin z}{z+a}, \ a >0$. Is that correct? $\endgroup$ – Random Variable Nov 28 '17 at 10:57
  • $\begingroup$ @RandomVariable the third condition is added to force $\lim\limits_{b\to\infty}\int_0^\infty \frac{f(b+it)-f(b-it)}{e^{2\pi t} - 1}dt = 0$. As long as you can justify that, the formula will work. (e.g. it works for $\frac{\sin(\lambda(z+a))}{z+a}$ when $a > 0, 0 < \lambda < 2\pi$). $\endgroup$ – achille hui Nov 28 '17 at 11:38
  • $\begingroup$ Feel free to answer this question. I deleted my answer. $\endgroup$ – Random Variable Nov 28 '17 at 12:59

Your Answer

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