Note: This question relates to two previous questions on math.stackexchange ([1](https://math.stackexchange.com/questions/3831022/asymptotic-bound-for-int-0-infty-int-0-infty-xym-e-fracx22i) and [2](https://math.stackexchange.com/questions/3923440/approximating-a-double-sum-by-a-double-integral)), neither of which had satisfactory answers after posting bounties.


Whilst trying to count certain types of bipartite graphs, I'm lead to try to bound the following quantity
$$
S:=\sum\_{x=0}^\infty \sum\_{y=0}^\infty (x+y)^m e^{-\frac{x^2}{2i} - \frac{y^2}{2j}}
$$
where $i,j$ and $m$ are integers, and I'm interested in the asymptotics for large $i$ and $j$ and potentially $m$ (although it would suffice to have a good upper bound when $i \approx j$ and $m=o(i)$).


A natural strategy seems to be to consider the integral
$$
I:=\int\_0^\infty \int\_0^\infty (x+y)^m e^{-\frac{x^2}{2i} - \frac{y^2}{2j}} dx\,dy
$$
and show that $S \approx I$, and hopefully bound $I$ by analytic means. Unfortunately both parts of this strategy have been causing me difficulty.


One can derive an exact expression for $I$ by multiplying out the terms and using known identities for the quantities $\int\_0^\infty x^k e^{-\frac{x^2}{2i}} dx$, however the asymptotics of this sum is unclear to me. It would seem more natural to use a type of `saddle-point' method here, approximate the logarithm of the function around its maximum at $(x\_0,y\_0) = \left(i \sqrt{\frac{m}{i+j}},j \sqrt{\frac{m}{i+j}} \right)$, where the function takes the value $\exp\left(m\log\sqrt{(i+j)(m)}-\frac{m}{2}\right)$, using the first two terms of the Taylor series, and so evaluate the integral in this region as a standard Gaussian, and then show that the contribution from outside this region is negligible.


This would lead to the following bound, which I believe is in fact the correct asymptotic order
$$
I \approx \exp\left(m\log\sqrt{(i+j)(m)}-\frac{m}{2}\right)\pi\sqrt{2ij},
$$
however I wasn't able to get this approach to work, there is a gap between where I can show the approximation to the Gaussian holds and where the integral is negligible. [With the help of a CAS](https://math.stackexchange.com/a/3831449/826466) this quantity can be shown to be an upper bound for $I$, which would be sufficient for my application, but it would be nice to know of a more natural method to approach such problems (and I suspect there are standard tools for this sort of thing).


With this, it would be sufficient to show that
$$
|I-S| = o\left(\exp\left(m\log\sqrt{(i+j)(m)}-\frac{m}{2}\right)\sqrt{ij}\right),
$$
and I wouldn't be surprised if the difference is even bounded by a multiple of the maximum of the function. Indeed, for functions of a single variable with a unique maximum it's possible to bound the difference between the integral and the sum in terms of the maximum by considering appropriate telescoping sums. However, a naive analogue of this argument doesn't seem to work in two dimensions, and trying to apply this argument to each `slice' of the integral led to some pretty horrendous calculations. I also looked into using the [Euler-Maclaurin formula](https://en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula) but it's a bit out of my area of expertise.


Of course, there may be a way to bound or approximate $S$ without considering $I$ at all, which I would be happy to hear about!



Asymptotic bound for $\sum_{x=0}^\infty \sum_{y=0}^\infty (x+y)^m e^{-\frac{x^2}{2i} - \frac{y^2}{2j}}$ for $i$ and $j$ large
$\newcommand{\Ga}{\Gamma}$Let $a:=\sqrt i$ and $b:=\sqrt j$, so that
\begin{equation\*}
 a^2\asymp b^2>>m. \tag{1}
\end{equation\*}
Here in what follows, $A\asymp B$ means that $A\ll B$ and $A\gg B$;  

$A\ll B$ and $B\gg A$ mean $A=O(B)$; $A<<B$ and $B>>A$ mean $A=o(B)$.  

Note that for integers $k\ge0$
\begin{equation\*}
 J\_k:=J\_k(a^2):=\int\_0^\infty dx\,x^k e^{-x^2/(2a^2)}\,
 =2^{(k-1)/2} a^{k+1} \Ga\Big(\frac{k+1}{2}\Big)\gg(a^2k/C\_1)^{k/2}, \tag{2}
\end{equation\*}
where $0^0:=1$ and $C\_1>0$ is a universal real constant.



> 
> **Lemma 1:** For $k\in[0,m]$
> \begin{equation\*}
>  S\_k:=S\_k(a^2):=\sum\_{n=0}^\infty n^k e^{-n^2/(2a^2)}\sim J\_k. 
> \end{equation\*}
> 
> 
> 


The proof of this lemma is straightforward, but very nasty, and it will be given at the end of this answer.


Using Lemma 1, it is easy to reduce the asymptotics of $S$ to that of the corresponding double integral $I$ (which will not explicitly appear in the following display, though):
\begin{align\*}
 S&=\sum\_{x,y=0}^\infty (x+y)^m e^{-\frac{x^2}{2a^2} - \frac{y^2}{2b^2}} \\ 
 &=\sum\_{x,y=0}^\infty \sum\_{k=0}^m\binom mk x^k y^{m-k} e^{-\frac{x^2}{2a^2} - \frac{y^2}{2b^2}} \\ 
 &=\sum\_{k=0}^m\binom mk \sum\_{x,y=0}^\infty x^k y^{m-k} e^{-\frac{x^2}{2a^2} - \frac{y^2}{2b^2}} \\ 
 &=\sum\_{k=0}^m\binom mk S\_k(a^2)S\_{m-k}(b^2) \\ 
 &\sim\sum\_{k=0}^m\binom mk J\_k(a^2)J\_{m-k}(b^2) \\ 
 &=ab\,2^{m/2-1}\sum\_{k=0}^m\binom mk a^k b^{m-k}\Ga\Big(\frac{k+1}2\Big)\Ga\Big(\frac{m-k+1}2\Big) \\ 
 &=ab\,2^{m/2-1}\Ga\Big(\frac m2+1\Big)\sum\_{k=0}^m\binom mk a^k b^{m-k}
 \int\_0^1 dx\, x^{\frac{k+1}2-1}(1-x)^{\frac{m-k+1}2-1} \\ 
 &=ab\,2^{m/2-1}\Ga\Big(\frac m2+1\Big)
 \int\_0^1 \frac{dx}{\sqrt{x(1-x)}}\,\sum\_{k=0}^m\binom mk (a\sqrt x)^k (b\sqrt{1-x})^{m-k} \\ 
 &=ab\,2^{m/2-1}\Ga\Big(\frac m2+1\Big)K\_m,
\end{align\*}
where
\begin{align\*}
 K\_m&:=\int\_0^1 \frac{dx}{\sqrt{x(1-x)}}\,(a\sqrt x+b\sqrt{1-x})^m \\ 
 &=2\int\_0^{\pi/2} dt\,(a\cos t+b\sin t)^m \\ 
 &=2(a^2+b^2)^{m/2}\int\_0^{\pi/2} dt\,\cos^m(t-t\_{a,b}) 
\end{align\*}
and
\begin{equation\*}
 t\_{a,b}:=\arccos\frac a{\sqrt{a^2+b^2}}. 
\end{equation\*}
A straightforward saddlepoint approximation (noting, in particular, that $(\ln\cos)''\le-1$) shows that
\begin{equation\*}
 K\_m\sim2\sqrt{2\pi/m}\,(a^2+b^2)^{m/2} 
\end{equation\*}
if $m\to\infty$, whence
\begin{align\*}
 S&\sim ab\,2^{m/2-1}\Ga\Big(\frac m2+1\Big)2\sqrt{2\pi/m}\,(a^2+b^2)^{m/2}. 
\end{align\*}


If $m\not\to\infty$, then without loss of generality $m=m\_\*$, a constant, whence
\begin{align\*}
 S&\sim ab\,2^{m\_\*/2-1}\Ga\Big(\frac{m\_\*}2+1\Big)2(a^2+b^2)^{m\_\*/2}\int\_0^{\pi/2} dt\,\cos^{m\_\*}(t-t\_{a,b}). 
\end{align\*}


It remains to prove Lemma 1.




---


*Proof of Lemma 1:* Note that
\begin{equation\*}
 S\_k=\sum\_{n=0}^\infty S\_{k,n},\quad J\_k=\sum\_{n=0}^\infty J\_{k,n},
\end{equation\*}
where
\begin{equation\*}
 S\_{k,n}:=e^{g(n)},\quad J\_{k,n}:=\int\_n^{n+1} dx\,e^{g(x)},
\end{equation\*}
and
\begin{equation\*}
 g(x):=g\_k(x):=k\ln x-x^2/(2a^2). 
\end{equation\*}
Next,
\begin{equation\*}
 g'(x)=\frac kx-\frac x{a^2}=\frac{ka^2-x^2}{xa^2}. \tag{2.5}
\end{equation\*}
So, if
\begin{equation\*}
 k<<n<<a^2,
\end{equation\*}
then for $x\in[n,n+1]$ we have $g'(x)\to0$ and hence $S\_{k,n}\sim J\_{k,n}$.


So, to complete the proof of the lemma, it suffices to show that for any real $C>0$
\begin{equation\*}
 \sum\_{0\le n\le Ck} e^{g(n)}+\sum\_{n\ge a^2/C} e^{g(n)}
 +\int\_{0\le x\le Ck} dx\, e^{g(x)}+\int\_{x\ge a^2/C} dx\, e^{g(x)}<<J\_k. \tag{3}
\end{equation\*}
Conditions $k\in[0,m]$ and (1), together with (2.5), imply that (eventually) $g$ is increasing on $[0,Ck]$ and hence
\begin{equation\*}
 \sum\_{0\le n\le Ck} e^{g(n)}\le(1+Ck)e^{g(Ck)}\le(1+Ck)(Ck)^k<<J\_k, \tag{4}
\end{equation\*}
by (2). Similarly,
\begin{equation\*}
 \int\_{0\le x\le Ck} dx\, e^{g(x)}<<J\_k. \tag{5}
\end{equation\*}
Next, for $x\ge a^2/C$ we have $g'(x)\le0$ and also $g''(x)\le0$ (since $g$ is concave). So, for $n\ge a^2/C$ we have $g(n)\le k\ln(a^2/C)-a^2/(2C^2)$ and also
\begin{equation\*}
 g'(n)\le\frac{Ck}{a^2}-\frac1C\sim-\frac1C,
\end{equation\*}
again because of conditions $k\in[0,m]$ and (1). So,
\begin{equation\*}
 \sum\_{n\ge a^2/C} e^{g(n)}\ll\exp\Big\{k\ln\frac{a^2}C-\frac{a^2}{2C^2}\Big\}. \tag{5.5}
\end{equation\*}
With $C\_1$ as in (2), consider now
\begin{equation\*}
 H(k):=k\ln\frac{a^2}C-\frac{a^2}{2C^2}-\ln((a^2k/C\_1)^{k/2})
 =\frac k2\,\ln\frac{C\_1a^2}{C^2k}-\frac{a^2}{2C^2}. 
\end{equation\*}
Again by conditions $k\in[0,m]$ and (1), one has $k\le ca^2$, where $c\downarrow0$, whence
\begin{equation\*}
 H'(k)=\frac12\,\ln\frac{C\_1a^2}{C^2k}-\frac12>0,
\end{equation\*}
so that $H(k)$ is increasing and hence
\begin{equation\*}
 H(k)\le H(ca^2)
 =\frac{ca^2}2\,\ln\frac{C\_1}{C^2c}-\frac{a^2}{2C^2}\sim-\frac{a^2}{2C^2}\to-\infty. 
\end{equation\*}
Now (5.5) and (2) yield  

\begin{equation\*}
 \sum\_{n\ge a^2/C} e^{g(n)}<<J\_k. \tag{6}
\end{equation\*}
Similarly,
\begin{equation\*}
 \int\_{x\ge a^2/C} dx\, e^{g(x)}<<J\_k. \tag{7}
\end{equation\*}
Collecting (4), (5), (6), and (7), we get (3), which completes the proof of the lemma. $\Box$


