Improve upper bound for double sum

I'll use the labels $m$ and $n$ for the indices in the sums to avoid confusion with the complex number $i\in\Bbb{C}$. And in the variable $\theta:=\pi x$ things look a bit nicer. The first thing to note is that in the double infinite sum $$T(x)=\sum_{m,n=0}^\infty \frac{\sin((2m+1)\theta)}{(2m+1)(2n+1)[(2m+1)^2+(2n+1)^2]},$$ the numerator $\sin((2m+1)\theta)$ seems like the biggest problem. Fortunately it doesn't depend on $n$, and so it makes sense to first try to eliminate $n$ altogether. Separating the variables as much as possible yields \begin{eqnarray*} T(x)&=&\sum_{m,n=0}^\infty \frac{\sin((2n+1)\theta)}{(2m+1)(2n+1)[(2m+1)^2+(2n+1)^2]}\\ &=&\sum_{m\geq0}\left(\frac{\sin((2m+1)\theta)}{2m+1} \sum_{n\geq0}\frac{1}{(2n+1)[(2m+1)^2+(2n+1)^2]}\right),\\ \end{eqnarray*} and this inner sum over $n$ has the partial fraction expansion \begin{eqnarray*} \sum_{n\geq0}&&\hspace{-10pt}\frac{1}{(2n+1)[(2m+1)^2+(2n+1)^2]}\\ &=&\frac{1}{2(2m+1)^2}\sum_{n\geq0}\left[\frac{2}{2n+1}-\frac{1}{(2n+1)+(2m+1)i}-\frac{1}{(2n+1)-(2m+1)i}\right]\\ &=&\frac{1}{4(2m+1)^2}\sum_{n\geq0}\left[\frac{2}{n+\tfrac12}-\frac{1}{(n+\tfrac12)+(m+\tfrac12)i}-\frac{1}{(n+\tfrac12)-(m+\tfrac12)i}\right]. \end{eqnarray*} We can express this infinite series more consicely in terms of the digamma function as \begin{eqnarray*} \sum_{n\geq0}&&\hspace{-10pt}\left[\frac{2}{n+\tfrac12}-\frac{1}{(n+\tfrac12)+(m+\tfrac12)i}-\frac{1}{(n+\tfrac12)-(m+\tfrac12)i}\right]\\ &=&-\left(2\psi(\tfrac12)-\psi(\tfrac12+(m+\tfrac12)i)-\psi(\tfrac12-(m+\tfrac12)i)\right)\\ &=&-2\left(\psi(\tfrac12)-\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)\right)\\ &=&4\ln(2)+2\gamma+2\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i), \end{eqnarray*} where $\gamma$ denotes the Euler-Mascheroni constant. See also the section on evaluation of sums of rational functions at the Wikipedia page on the digamma function for more details on the first step in the derivation above. This allows us to rewrite the original sum as \begin{eqnarray*} T(x)&=&\sum_{m\geq0}\left(\frac{\sin((2m+1)\theta)}{(2m+1)^3} \left[\ln(2)+\frac{\gamma}{2}+\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{2}\right]\right)\\ &=&\left(\ln(2)+\frac{\gamma}{2}\right)\left(\sum_{m\geq0}\frac{\sin((2m+1)\theta)}{(2m+1)^3}\right)+\frac12\sum_{m\geq0}\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{(2m+1)^3}\sin((2m+1)\theta). \end{eqnarray*} This first series is the Fourier series for $\tfrac{\pi}{8}\theta(\pi-\theta)$, so we have $$T(x)=\frac{\pi}{16}\left(2\ln(2)+\gamma\right)\theta(\pi-\theta)+\frac12\sum_{m\geq0}\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{(2m+1)^3}\sin((2m+1)\theta).$$ So now it remains to determine an upper bound for the series $$S(\theta):=\sum_{m\geq0}\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{(2m+1)^3}\sin((2m+1)\theta).$$ This seems unlikely to have any manageable closed form, and from this point forward estimates enter the picture. This means striking a balance between sharpness and computability of the estimates, and the amount of time and effort I'm willing to put in.


I don't know much about series such as $S(\theta)$, or whether there is any pattern to the values of $\sin((2m+1)\theta)$ as $m$ ranges over the nonnegative integers. What is certain though is that $0<\sin(\theta)<\theta$ and that $$|\sin((2m+1)\theta)|\leq1 \qquad\text{ for }\quad m\geq1,$$ because $0<\theta<\pi$. Now define the constants \begin{eqnarray*} A&:=&\operatorname{Re}\psi(\tfrac12+\tfrac12i)\approx-0.8681073626\ldots,\\ B&:=&\sum_{m\geq1}\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{(2m+1)^3}\approx0.03247625\ldots, \end{eqnarray*} so that $$S(\theta) \leq A\sin(\theta) +\sum_{m\geq1}\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{(2m+1)^3}|\sin((2m+1)\theta)| \leq A\sin(\theta)+B.$$ Putting everything together this yields $$T(x)\leq\frac{\pi^3}{16}\left(2\ln(2)+\gamma\right)x(1-x)+\frac12\left(A\sin(\pi x)+B\right).$$ This 'first order' bound can of course be refined by computing more initial terms of the series for $S(\theta)$, leaving a smaller remainder term $B$. For example, taking the first three terms yields the 'third order' bound $$T(x)\leq\frac{\pi^3}{16}\left(2\ln(2)+\gamma\right)x(1-x) +\frac12\left(A_0\sin(\pi x)+A_1\sin(3\pi x)+A_2\sin(5\pi x)+B_3\right),$$ where \begin{eqnarray*} A_0&=&\operatorname{Re}\psi(\tfrac12+\tfrac12i) &\approx&-0.8681073626\ldots,\\ A_1&=&\frac{1}{3^3}\operatorname{Re}\psi(\tfrac12+\tfrac32i) &\approx&\hphantom{-}0.0142581155\ldots,\\ A_2&=&\frac{1}{5^3}\operatorname{Re}\psi(\tfrac12+\tfrac52i) &\approx&\hphantom{-}0.0072753399\ldots,\\ B_3&=&\sum_{m\geq3}\frac{\operatorname{Re}\psi(\tfrac12+(m+\tfrac12)i)}{(2m+1)^3} &\approx&\hphantom{-}0.0109427956\ldots. \end{eqnarray*} Below are two plots comparing the upper bounds to the original function $T(x)$. The plot on the left shows $T(x)$ in blue, and the first order bound in purple; the third order bound is indistinguishable from $T(x)$ at this scale. The plot on the right shows the difference between the third order upper bound and $T(x)$. For comparison it also shows the constant term $-\tfrac12B_3$.

enter image description here

This shows that for the number of terms $A_m\sin((2m+1)\pi x)$ we have expanded, the constant term $\tfrac12B_3$ is quite tight (it seems we could decrease the constant term by about $0.0015$). It also shows that the difference is dominated by the next term $c\sin(7\pi x)$ for some constant $c$.


Mathcad calculated the following approximate graph of the function $T$. enter image description here

In this approximation we had a range both for $i$ and $j$ from $0$ to $100$. This approximation should be very precise because the series for $T(x)$ should converge very quickly, because for the range both for $i$ and $j$ from $0$ to $10$ we obtained an almost coinciding graph. I expect this approach can provide a rigorous computer aided bound for $T(x)$.

The graph looks symmetric, which suggest that $T(1-x)=T(x)$ for each $x\in [0,1]$. The graph suggest that $T(x)$ is a bit bigger than a quadratic function $4T\left(\tfrac12\right)x(1-x)$. The value $T\left(\tfrac12\right)$ calculated with the range both for $i$ and $j$ from $0$ to $10000$ is $0.51254399898721\dots$.