# Help with Double Sum (lattice sum) over all integers m,n of 1/(a+m^2+n^2)

Im researching electric fields in periodic arrays of charges, and encountered this summation that I can't find any published work on.

Has anybody encountered a solution to $$\sum_{m,n=-\infty,\infty}\frac{1}{a+m^2+n^2}$$ where a is a real constant?

When constant a=0 it converges, see mathworld.wolfram.com/DoubleSeries.html.

The 1D version also converges, see the "Rational Functions" section of here: en.wikipedia.org/wiki/List_of_mathematical_series#cite_note-7 Therefore I believe the 2D sum that this post focuses on will also converge.

• This sum looks divergent. For large $m$ and $n$ we can approximate the sum by an integral: set $m=r\cos\phi$ and $n=r\sin\phi$, so that $m^2+n^2=r^2$ and the sum is approximately $\int_0^{\infty}\frac{1}{a+r^2}2\pi r\,d r$, which diverges as $r\to\infty$. Nov 26, 2021 at 20:53
• The 1D sum converges, see the "Rational Functions" section of here: en.wikipedia.org/wiki/List_of_mathematical_series#cite_note-7 Therefore I believe the 2D sum will also converge. Also, the 2D summation (without constant a) converges too, see mathworld.wolfram.com/DoubleSeries.html Nov 26, 2021 at 21:03
• Yes it converges for dimension $d<2$, but not for $d\ge2$. The double sum you are linking does not converge: $\sum_{i,j=-\infty}^{\infty}'\frac{1}{(i^2+j^2)^s}=4\beta(s)\zeta(s)$ only works for $s>1$, not for your case $s=1$. Nov 26, 2021 at 21:14
• Thank you Roman! Nov 27, 2021 at 6:03
• As it stands (with all terms being positive) the summation diverges logaritmically, but you can get conditional convergence if you add a term (-1)^(m+n) in the numerator. The physical meaning of that term is that (as I suppose) the electric charges of the points in the lattice are of alternating signs (cations and anions) Dec 1, 2021 at 7:04

This kind of sum can be studied by integral transformation. Notice that $$\int_0^1t^{x-1}dt=\frac{1}{x}$$ if $$\text{Re}(x)>0$$:

Integrate[t^(x - 1), {t, 0, 1}]
(*    1/x if Re[x] > 0    *)


and therefore a $$d$$-dimensional lattice sum is $$S_d(a)=\sum_{n_1,n_2,\ldots,n_d=-\infty}^{\infty} \frac{1}{a+n_1^2+n_2^2+\ldots+n_d^2}= \sum_{n_1,n_2,\ldots,n_d=-\infty}^{\infty} \int_0^1 t^{a+n_1^2+n_2^2+\ldots+n_d^2-1}dt = \int_0^1t^{a-1}\left(\sum_{n=-\infty}^{\infty}t^{n^2}\right)^ddt$$

The infinite sum is Jacobi's elliptic theta function $$\vartheta_3(0,t)=\vartheta_3(t)$$:

Sum[t^(n^2), {n, -∞, ∞}]
(*    EllipticTheta[3, 0, t]    *)


which makes the lattice sum $$S_d(a)= \int_0^1t^{a-1}\left[\vartheta_3(t)\right]^ddt$$

S[d_?NumericQ, a_?NumericQ] :=
NIntegrate[t^(a - 1) EllipticTheta[3, t]^d, {t, 0, 1}]


This integral converges only for $$d<2$$ because the elliptic theta function is $$\theta_3(t)\approx\sqrt{\frac{\pi}{1-t}}$$ for $$t\to1$$:

Limit[Sqrt[1 - t] * EllipticTheta[3, t], t -> 1, Direction -> "FromBelow"]
(*    Sqrt[π]    *)


## more general denominator

For the more general sum $$S_{d,p}(a)=\sum_{n_1,n_2,\ldots,n_d=-\infty}^{\infty}\frac{1}{(a+n_1^2+n_2^2+\ldots+n_d^2)^p}$$ we can use the integral relationship $$\int_0^1\frac{(-\ln t)^{p-1}}{\Gamma(p)}t^{x-1}dt=\frac{1}{x^p}$$

Integrate[(-Log[t])^(p - 1)/Gamma[p] t^(x - 1), {t, 0, 1}]
(*    x^(-p) if Re[p] > 0 && Re[x] > 0    *)


Therefore, $$S_{d,p}(a)=\sum_{n_1,n_2,\ldots,n_d=-\infty}^{\infty}\int_0^1\frac{(-\ln t)^{p-1}}{\Gamma(p)}t^{a+n_1^2+n_2^2+\ldots+n_d^2-1}dt\\ =\int_0^1 \frac{(-\ln t)^{p-1}}{\Gamma(p)} t^{a-1}\left[\vartheta_3(t)\right]^ddt$$

S[d_?NumericQ, p_?NumericQ, a_?NumericQ] /; d < 2*p && a > 0 :=
NIntegrate[(-Log[t])^(p - 1)/Gamma[p] t^(a - 1) EllipticTheta[3, t]^d,
{t, 0, 1}]


This integral converges for $$d<2p$$: as $$t\to1^-$$ we have $$(-\ln t)\approx(1-t)$$ and $$\vartheta_3(t)\approx\sqrt{\frac{\pi}{1-t}}$$, and so the integrand is asymptotically proportional to $$(1-t)^{p-1-d/2}$$; the integral converges if $$p-1-d/2>-1$$.

### numerical stability

A note on convergence: the above numerical integral is rather difficult to evaluate for small $$a\ll1$$. To improve stability, we separate out the singular part of the integrand around $$t\approx0$$ by setting $$\vartheta_3(t\approx0)\approx1$$ and

J[d_, p_, a_, t_] = (-Log[t])^(p - 1)/Gamma[p] t^(a - 1) EllipticTheta[3, t]^d;
J0[d_, p_, a_, t_] = (-Log[t])^(p - 1)/Gamma[p] t^(a - 1);


The function J0 carries the same singularity as the integrand J but can be integrated analytically:

Assuming[p > 0 && a > 0, Integrate[J0[d, p, a, t], {t, 0, 1}]]
(*    a^-p    *)


Therefore, the numerical integral can be written as

S1[d_?NumericQ, p_?NumericQ, a_?NumericQ] /; d < 2*p && a > 0 && p > 0 :=
a^-p + NIntegrate[J[d, p, a, t] - J0[d, p, a, t], {t, 0, 1}]


which can be evaluated for even very small values of $$a$$.

You are interested in the case $$d=2$$ and $$p=3/2$$:

Plot[S1[2, 3/2, a], {a, 0, 5}]


• Really nice analysis of the problem. Does the integral converge for $d\in[1,2)$? Or only for $d=1$?
– Jojo
Nov 27, 2021 at 17:42
• @Joe it converges for $d<2$, so $d\in(-\infty,2)$. Not sure what $d<0$ means in practice; but the integral seems fine with it. Nov 27, 2021 at 18:56
• Interesting. Does $\lim_{d\rightarrow 2^-}$ exist? That could be relevant to OP's physical problem, given that $S_2(a)$ is undefined
– Jojo
Nov 27, 2021 at 19:10
• @Joe it diverges as $d\to2^-$. Nov 27, 2021 at 19:32
• We indeed encounter such sums in QFT. You must be very careful with your regulator to get something sensible, especially in 2D where you get logs rather than something that will be removed by dimensional regularization. If you have a 2D square lattice with N items on a side, with periodic boundary conditions, you probably want $\left(\sum_{|m|,|n|\leq N/2} \frac{1}{n^2+m^2-x}\right)-2\pi \log(N/2)$; see eq 58 in arxiv.org/abs/1912.04425 Nov 28, 2021 at 12:00