# How do I solve the double summation $\sum_{n=1}^{\infty} \sum_{m=1}^{\infty} \frac{m^2 - n^2}{(m^2 + n^2)^2}$?

Basically I'm stuck with this double summation. I want some help evaluating this summation. $$\sum_{n=1}^{\infty} \sum_{m=1}^{\infty} \frac{m^2 - n^2}{(m^2 + n^2)^2}$$

Am I allowed to change the order of summation in this?

• Possibly a partial fraction decomposition into poly gamma functions might help, but I’ve not followed the thought through May 2 at 18:36
• Looks like the series isn't absolutely convergent, so reordering isn't allowed. May 2 at 19:12
• Also this has come up before here, although there seems to be some disagreement.
– RRL
May 2 at 19:24
• @RRL A conditionally convergent series can be rearranged to sum to any real number. A reordering isn't allowed unless you can prove it doesn't change the sum, and in this case swapping the order of summation actually does change the sum. May 2 at 19:30
• Unless the sum is $0$ in which case both iterated series are equal. The iterated series are not arbitrary rearrangements. But I would agree that without absolute convergence you can rearrange to get other values. In this case the sum appears to be $\pm \frac{\pi}{4}$ depending on the order. I would mark this as a duplicate except the linked question asks about $\sum_{m> n> 0}$.
– RRL
May 2 at 19:33

Let me give my 5 cents and present one more (heuristic) solution based on the Euler-Maclaurin summation formula. First, we note that for any finite $$k\quad \sum_{n=1}^k \sum_{m=1}^k\frac{m^2 - n^2}{(m^2 + n^2)^2}=0$$. Therefore, we can consider $$S=\sum_{n=1}^{\infty} \sum_{m=1}^{\infty} \frac{m^2 - n^2}{(m^2 + n^2)^2}=\lim_{k\to\infty}\sum_{n=k}^\infty \sum_{m=k}^\infty\frac{m^2 - n^2}{(m^2 + n^2)^2}=\lim_{k\to\infty}S(k)$$ To evaluate $$S(k)$$ we can use Euler-Maclaurin summation formula which perfectly works in this case: $$S(k)=\sum_{n=k}^\infty\bigg(\int_k^\infty \frac{m^2 - n^2}{(m^2 + n^2)^2}dm+\frac{1}{2}\Big(\frac{m^2 - n^2}{(m^2 + n^2)^2}\,\bigg|^{m=k}+\frac{m^2 - n^2}{(m^2 + n^2)^2}\,\bigg|^{m=\infty}\,\Big)+...\bigg)$$ Other terms contain higher derivatives with respect to $$m$$ and, therefore, higher power of $$\frac{1}{k}$$ $$S(k)\sim \sum_{n=k}^\infty\bigg(\int_k^\infty \frac{m^2 - n^2}{(m^2 + n^2)^2}dm+\frac{1}{2}\frac{k^2 - n^2}{(k^2 + n^2)^2}\bigg)$$ Using the Euler-Maclaurin formula with respect to $$n$$, we can treat the second term as $$\frac{1}{2}\sum_{n=k}^\infty\frac{k^2 - n^2}{(k^2 + n^2)^2}=\frac{1}{2}\int_k^\infty\frac{k^2 - n^2}{(k^2 + n^2)^2}dn+O\Big(\frac{1}{k^2}\Big)$$ $$=\frac{1}{2k}\int_1^\infty\frac{dx}{1+x^2}-\frac{1}{k}\int_1^\infty\frac{x^2\,dx}{(1+x^2)^2}+O\Big(\frac{1}{k^2}\Big)=O\Big(\frac{1}{k}\Big)$$ Therefore, all contribution comes from the term $$S(k)= \sum_{n=k}^\infty\int_k^\infty \frac{m^2 - n^2}{(m^2 + n^2)^2}dm+O\Big(\frac{1}{k}\Big)=\int_k^\infty dn\int_k^\infty \frac{m^2 - n^2}{(m^2 + n^2)^2}dm+O\Big(\frac{1}{k}\Big)$$ $$=\int_1^\infty dx\int_1^\infty\frac{y^2-x^2}{(y^2+x^2)^2}ds+O\Big(\frac{1}{k}\Big)=\int_1^\infty \frac{dx}{x}\int_{1/x}^\infty\frac{s^2-1}{(s^2+1)^2}dx+O\Big(\frac{1}{k}\Big)$$ Integration with respect to $$s$$ is straightforward: $$S(k)=\int_1^\infty \frac{dx}{x}\int_{1/x}^\infty\Big(\frac{1}{s^2+1}-\frac{2}{(s^2+1)^2}\Big)ds+O\Big(\frac{1}{k}\Big)$$ $$=\int_1^\infty \frac{dx}{x}\Big(\arctan x-\arctan x+x-\frac{x^3}{1+x^2}\Big)+O\Big(\frac{1}{k}\Big)$$ $$=\int_1^\infty\frac{dx}{1+x^2}+O\Big(\frac{1}{k}\Big)=\frac{\pi}{4}+O\Big(\frac{1}{k}\Big)$$ $$S=\lim_{k\to\infty}S(k)=\frac{\pi}{4}$$

• Thank you for your beautiful solution sir! May 3 at 19:43
• @Vaibhav C M I'm glad if this helps. Please look at the elegant and professional solutions in the second post. May 3 at 20:29

Since the sum does not converge absolutely, we are not allowed to rearrange the order of summation. In this answer, we will show that the sum

$$S := \sum_{n=1}^{\infty} \sum_{m=1}^{\infty} \frac{m^2 - n^2}{(m^2 + n^2)^2}$$

converges and find its value.

New Anwer. We will follow @Svyatoslav's approach with some simplification. As in his answer, we note that

$$S = \lim_{K \to\infty} \sum_{n > K} \sum_{m > K} \frac{m^2 - n^2}{(m^2 + n^2)^2}.$$

To estimate the inner sum, we observe:

Observation. Let $$K$$ be a positive integer, and let $$f : [K, \infty) \to [0, \infty)$$ be decreasing and integrable. Then by the triangle inequality, \begin{align*} \left| \int_{K}^{\infty} f(x) \, \mathrm{d}x - \sum_{n > K}^{\infty} f(n) \right| &\leq \sum_{n > K}^{\infty} \left| \int_{n-1}^{n} f(x) \, \mathrm{d}x - f(n) \right| \\ &\leq \sum_{n > K}^{\infty} \bigl[ f(n-1) - f(n) \bigr] \\ &\leq f(K). \end{align*}

So, by noting that both $$x \mapsto \frac{1}{x^2 + n^2}$$ and $$x \mapsto \frac{2n^2}{(x^2+n^2)^2}$$ satisfy the hypotheses of the lemma, we get

$$\left| \sum_{m > K} \frac{m^2 - n^2}{(m^2 + n^2)^2} - \int_{K}^{\infty} \frac{x^2 - n^2}{(x^2 + n^2)^2} \, \mathrm{d}x \right| \leq \frac{1}{K^2 + n^2} + \frac{2n^2}{(K^2 + n^2)^2} \leq \frac{3}{n^2}.$$

Therefore

\begin{align*} \sum_{n > K} \sum_{m > K} \frac{m^2 - n^2}{(m^2 + n^2)^2} &= \sum_{n > K} \biggl[ \int_{K}^{\infty} \frac{x^2 - n^2}{(x^2 + n^2)^2} \, \mathrm{d}x + \mathcal{O}\biggl(\frac{1}{n^2}\biggr) \biggr] \\ &= \sum_{n > K} \biggl[ \frac{K}{K^2 + n^2} + \mathcal{O}\biggl(\frac{1}{n^2}\biggr) \biggr] \\ &= \sum_{n > K} \frac{1}{1 + (n/K)^2} \frac{1}{K} + \mathcal{O}\biggl(\frac{1}{K}\biggr) \end{align*}

Letting $$K \to \infty$$, this converges to

$$S = \int_{1}^{\infty} \frac{1}{1+x^2} \, \mathrm{d}x = \frac{\pi}{4}.$$

Old Answer. First, using the identity

$$\int_{0}^{\infty} x \cos(nx) e^{-mx} \, \mathrm{d}x = \frac{m^2 - n^2}{(m^2 + n^2)^2}, \qquad m, n > 0,$$

and Fubini's theorem, we obtain

\begin{align*} S(n) := \sum_{m=1}^{\infty} \frac{m^2 - n^2}{(m^2 + n^2)^2} &= \sum_{m=1}^{\infty} \int_{0}^{\infty} x \cos(nx) e^{-mx} \, \mathrm{d}x \\ &= \int_{0}^{\infty} \sum_{m=1}^{\infty} x \cos(nx) e^{-mx} \, \mathrm{d}x \\ &= \int_{0}^{\infty} \frac{x \cos(nx)}{e^x - 1} \, \mathrm{d}x = \int_{0}^{2\pi} f(x) \cos(nx) \, \mathrm{d}x, \end{align*}

where $$f$$ is the function defined by

$$f(x) = \sum_{k=0}^{\infty} \frac{x+2k\pi}{e^{x+2k\pi} - 1}.$$

Now consider the $$2\pi$$-periodic modification $$\tilde{f}(x) = f(x \text{ mod } 2\pi)$$. Using the general theory of Fourier series, we can check that

$$\frac{a_0}{2} + \sum_{n=1}^{\infty} \bigl[ a_n \cos(n\theta) + b_n \sin(n\theta) \bigr] = \frac{\tilde{f}(\theta^+) + \tilde{f}(\theta^-)}{2} \tag{*}$$

where

$$a_n = \frac{S(n)}{\pi} = \frac{1}{\pi} \int_{0}^{2\pi} f(x)\cos(nx) \, \mathrm{d}x \qquad\text{and}\qquad b_n = \frac{1}{\pi} \int_{0}^{2\pi} f(x)\sin(nx) \, \mathrm{d}x.$$

Plugging $$\theta = 0$$ into $$\text{(*)}$$ and comparing this with $$S = \sum_{n=1}^{\infty} S(n)$$, it follows that

\begin{align*} S = \sum_{n=1}^{\infty} S(n) &= \frac{\pi}{2}[f(0) + f(2\pi)] - \frac{1}{2} \int_{0}^{2\pi} f(x) \, \mathrm{d}x \\ &= \frac{\pi}{2} + 2\pi^2 \sum_{k=1}^{\infty} \frac{k}{e^{2k\pi} - 1} - \frac{1}{2} \int_{0}^{\infty} \frac{x}{e^x - 1} \, \mathrm{d}x \end{align*}

The sum and the integral in the last line are well known:

$$\sum_{k=1}^{\infty} \frac{k}{e^{2k\pi} - 1} = \frac{1}{24} - \frac{1}{8\pi} \qquad\text{and}\qquad \int_{0}^{\infty} \frac{x}{e^x - 1} \, \mathrm{d}x = \zeta(2) = \frac{\pi^2}{6}.$$

see this posting for instance. Therefore

$$S = \frac{\pi}{4}.$$

• Nice solution! An amateur always looks at the work of a professional with fascination :) An elegant proof of $\sum_{n=1}^{\infty}\frac{1}{\sinh^2\!\pi n}=\frac{1}{6}-\frac{1}{2\pi}$ using complex integration is also here math.stackexchange.com/questions/1866502/… (a third post) May 3 at 4:57
• @Svyatoslav, Thank you! I also like your answer very much! I think we can simplify your approach a bit, so I will update my answer accordingly. May 3 at 10:26
• Thank you for your simplification! It this form it is much easier, just three lines :) May 3 at 12:52