12

I am studying a bit of asymptotics and for practice I decided to find the asymptotic of the following, $$s(n)=\sum_{i=0}^n\sqrt{i(n-i)}$$ as $n\to\infty$. This comes directly from this post, where @Gary provided some hints in the comments: $${\rm Li}_{-1/2}^2(z)=\left(\sum_{n=0}^\infty \sqrt nz^n\right)\left(\sum_{n=0}^\infty \sqrt n z^n\right)=\sum_{n=0}^\infty\underbrace{\sum_{i=0}^n \sqrt{i(n-i)}}_{s(n)}z^n$$ but I am unable to finish the problem with this method as I don't know how to find the $n$th Maclaurin coefficient. Feel free to also use any other methods to find the asymptotics (maybe Euler-Maclaurin), but such an answer will preferably come after the original issue is resolved. As a bonus, a derivation of the complete asymptotic expansion of $s(n)$ will also be nice to see.

Sorry for the long question. To outline:

  1. How to find the $n$th Maclaurin Coefficient?
  2. Alternative methods to find asymptotics?
  3. Complete asymptotic expansion?

My attempt is below.


By $(25.12.12)$, $$\begin{align*}{\rm{Li}}_{-1/2}(z)&=\frac{\sqrt\pi}{2}(-\log\left(z\right))^{-3/2}+\sum_{n=0}^\infty\frac{\zeta(-1/2-n)}{n!}\log^n(z) \end{align*}$$ which by Taylor's formula, $$\begin{align*} {\rm Li}_{-1/2}^2(z)&=-\frac{\pi}{4\log^3(z)}+\sum_{n=0}^\infty(-1)^n\sqrt\pi\frac{\zeta(-1/2-n)}{n!}(-\log(z))^{n-3/2}+F(z) \\ &=\frac{\pi}{4(1-z)}+\sum_{n=0}^\infty(-1)^n\sqrt\pi\frac{\zeta(-1/2-n)}{n!}(-\log(z))^{n-3/2}+G(z) \end{align*}$$ as $z\to1$, where $F(z),G(z)$ are holomorphic at $z=1$. Expanding the first term by its geometric series, $$\sum_{n=0}^\infty\left(s(n)-\frac{\pi}{4}\right)z^n=\sum_{n=0}^\infty(-1)^n\sqrt\pi\frac{\zeta(-1/2-n)}{n!}(-\log(z))^{n-3/2}+G(z)$$ as $z\to 1$. Now the RHS is, $$\sqrt\pi\zeta(-1/2)(-\log(z))^{-3/2}-\sqrt\pi\zeta(-3/2)(-\log(z))^{-1/2}+O\left(\sqrt{\log(z)}\right)$$ as $z\to1$, which by Taylor's formula, $$\sqrt\pi\zeta(-1/2)(1-z)^{-3/2}+\sqrt\pi\left(\zeta(-3/2)-\frac{3}{4}\zeta(-1/2)\right)(1-z)^{-1/2}+O\left((1-z)^{1/2}\right)$$ as $z\to1$. Now all that is left is to extract the $n$th Maclaurin coefficient of the function above as, $$s(n)=[z^n]{\rm Li}_{-1/2}^2(z).$$

bob
  • 2,167
  • 2
    Using this, we have $$\frac{S(n)}{n^2}= \frac{1}{n^2}\sum_{i=0}^n\sqrt{i(n-i)}= \frac{1}{n}\sum_{i=0}^n\sqrt{\frac{i}{n}\left(1-\frac{i}{n}\right)}=...$$ considering $f(x)=\sqrt{x(1-x)}$ $$...=\frac{1}{n}\sum_{i=0}^nf\left(\frac{i}{n}\right)$$ As a result $$\frac{S(n)}{n^2} \to \int_0^1f(x)dx=\frac{\pi}{8}, n\to\infty$$ So $$S(n) \sim \frac{\pi}{8} \cdot n^2$$ Does this work? – rtybase Aug 16 '23 at 09:24
  • @rtybase. Yes, this works as an alternative method to the one I've outlined in my question. This doesn't allow for the higher order asymptotics though. – bob Aug 16 '23 at 10:54
  • Except for the very first term of the asymptotic expansion, namely $\frac{\pi}{8}n^2$, I believe the problem is too dangerously close to https://en.wikipedia.org/wiki/Gauss_circle_problem to be simple to tackle. – Jack D'Aurizio Aug 16 '23 at 18:21
  • Heuristically, $S(n) \sim \frac \pi 8 n^2- k \sqrt n$ where $k\sim \frac 3 7$ – Claude Leibovici Aug 17 '23 at 06:00
  • @ClaudeLeibovici. Gary finds the coefficient of the second term, $$2\zeta\left(-\frac{1}{2}\right)\approx 0.415772$$ which is indeed close to your approximate, $$-k=-\frac{3}{7}\approx-0.428571$$ – bob Aug 17 '23 at 10:11
  • This shows you how to get the asymptotic expansion. – J.G. Aug 17 '23 at 10:17
  • 1
    Use the Cauchy integral formula for the Maclaurin coefficients and proceed as I did here. – Gary Aug 18 '23 at 00:41
  • @Gary. I am having trouble using the Hankel contour. Could you guide me on how to find where ${\rm Li}{-1/2}^2(z)$ is analytic on, and it's asymptotic behaviour as $z\to\infty$? I just applied Cauchy's integral formula. $$s(n)=\frac{1}{2\pi i}\oint{(0+)}\frac{{\rm Li}_{-1/2}^2(z)}{z^{n+1}}\ dz$$ – bob Aug 18 '23 at 05:29
  • Never mind, I think I got it. – bob Aug 18 '23 at 06:29
  • @Gary. After collapsing the contour back to the positive real axis, how do I extract the contribution from the origin? I tried using Cauchy's integral formula but it gives me a divergent result. – bob Aug 18 '23 at 08:24
  • @AkivaWeinberger. It seems weird that the $\frac{1}{\sqrt\pi}$ term only appears after the third term. I may have to recheck my work. – bob Aug 21 '23 at 17:24
  • @bob I think the error is mine; it should cancel with the offset Gamma term in the numerator. Let me double-check. – Akiva Weinberger Aug 21 '23 at 17:31
  • 1
    @JackD'Aurizio Given the final answer \begin{align} s(n)\sim{}&\frac\pi8n^2-2\zeta\left(-\frac12\right)\sqrt n-\zeta\left(-\frac32\right)\frac1{\sqrt n}\ &-\frac14\zeta\left(-\frac52\right)\frac1{n\sqrt n}-\frac18\zeta\left(-\frac72\right)\frac1{n^2\sqrt n}\ &-\frac5{64}\zeta\left(-\frac92\right)\frac1{n^3\sqrt n}-\frac7{128}\zeta\left(-\frac{11}2\right)\frac1{n^4\sqrt n}-\dotsb, \end{align} does this impact the Gauss problem at all? – Akiva Weinberger Aug 21 '23 at 17:37
  • 1
    Here's a Desmos graph with the asymptotic expansion. Slide around the $n$ slider to see how $f(n)$ (exact) and $g(n)$ (asymptotic) match. https://www.desmos.com/calculator/tpknap1vcq – Akiva Weinberger Aug 21 '23 at 18:08
  • @AkivaWeinberger. Thank you, that is very neat. – bob Aug 21 '23 at 18:11

1 Answers1

6

Derivation of full asymptotic expansion (thank you @Gary)

Using the $n$th coefficient extraction operator $[z^n]$, $$\begin{align*}s(n)&=\sum_{i=0}^n\sqrt{i(n-i)}=[z^n]\left(\sum_{n=0}^\infty \sqrt nz^n\right)\left(\sum_{n=0}^\infty \sqrt n z^n\right)=[z^n]{\rm Li}_{-1/2}^2(z)\end{align*}$$ therefore by Cauchy's integral formula, $$s(n)=\frac{1}{2\pi i}\oint_{(0+)}\frac{{\rm Li}_{-1/2}^2(z)}{z^{n+1}}\ dz$$ for $n\ge1$. Now ${\rm Li}_{-1/2}^2(z)$ is analytic on $\mathbb{C}\setminus [1,+\infty)$ and $O(\log z)$ as $z\to\infty$; thus the integral along the arc vanishes and we are left with, $$s(n)=\frac{1}{2\pi i}\oint_{\mathscr {H^+}}\frac{{\rm Li}_{-1/2}^2(z)}{z^{n+1}}{\ dz}$$ where $\mathscr{H^+}$ is the Hankel contour surrounding $[1,+\infty)$. Making the substitution $z\mapsto e^s$, $$s(n)=\frac{1}{2\pi i}\oint_\mathscr{H}e^{-ns}\operatorname{Li}_{-1/2}^2(e^s)\ ds$$ where $\mathscr{H}$ is the Hankel contour surrounding $[0,+\infty)$. Note that by $(25.12.12)$, $${\rm{Li}}^2_{-1/2}\left(e^s\right)=-\frac{\pi}{4}s^{-3}+\sqrt \pi \zeta \left( { - \frac{1}{2}} \right)( - s)^{ - 3/2} + F(s)$$ where $F(s)=o(1)$ as $s\to 0$. We can integrate these first two terms along the Hankel contour, $$-\frac{\pi}{4}\frac{1}{2\pi i}\oint_{\mathscr{H}}s^{-3}e^{-ns}\ ds=\frac{\pi}{4}\frac{1}{2!}\frac{d^2e^{-ns}}{ds^2}\bigg{|}_{s=0}=\frac{\pi}{8}n^2$$ which is the leading order term, and with a change of variables $t=ns$ the next asymptotic term is, $$\begin{align*}\sqrt\pi\zeta\left(-\frac{1}{2}\right)\frac{1}{2\pi i}\oint_{\mathscr{H}}(-s)^{-3/2}e^{-ns}\ ds&=\frac{1}{\sqrt\pi}\zeta\left(-\frac{1}{2}\right)n^{1/2}\frac{1}{2i}\oint_{\mathscr{H}}(-t)^{-3/2}e^{-t}\ dt \\ &=-\frac{1}{\sqrt\pi}\zeta\left(-\frac{1}{2}\right)n^{1/2}\Gamma\left(-\frac{1}{2}\right) \\ &=2\zeta\left(-\frac{1}{2}\right)n^{1/2} \end{align*}$$ where the Hankel representation of the $\Gamma$ function and the well known value $\Gamma(-1/2)=-2\sqrt\pi$ was used. Now collapsing the contour back to the positive real line, $$s(n)=\frac{\pi}{8}n^2+2\zeta\left(-\frac{1}{2}\right)n^{1/2}+\frac{1}{2\pi i}\int_0^\infty e^{-nt}\lim_{\varepsilon\to 0}(F(t+i\varepsilon)-F(t-i\varepsilon))\ dt,$$ with $$F(s) = ( - s)^{ - 3/2} \sum\limits_{k = 1}^\infty {\sqrt \pi \frac{{\zeta ( - 1/2 - k)}}{{k!}}s^k } + H(s)$$ as $s\to 0$, where $H(s)$ is analytic at the origin. Taking the limit as $\varepsilon\to 0$, $$ \lim_{\varepsilon\to 0}(F(t + { i}\varepsilon ) - F(t - { i}\varepsilon )) = - 2{ i}\sqrt \pi \sum\limits_{k = 1}^\infty {\frac{{\zeta ( - 1/2 - k)}}{{k!}}t^{k - 3/2} } $$ hence by Watson's lemma we obtain the complete asymptotic expansion, $$s(n)\sim\frac{\pi}{8}n^2+2\zeta\left(-\frac{1}{2}\right)n^{1/2}-\frac{1}{\sqrt \pi}\sum_{k=1}^\infty\frac{\Gamma(k-1/2)}{\Gamma(k+1)}\zeta\left(-\frac{1}{2}-k\right)\frac{1}{n^{k-1/2}}$$ as $n\to+\infty$.

bob
  • 2,167
  • We have $$ {\mathop{\rm Li}\nolimits} _{ - 1/2}^2 ({\rm e}^s ) = - \frac{\pi }{4}s^{ - 3} + \sqrt \pi \zeta \left( { - \frac{1}{2}} \right)( - s)^{ - 3/2} + o(1) $$ as $s\to 0$. For the first two terms we can compute the integrals along the Hankel contours: $$
    • \frac{\pi }{4}\frac{1}{{2\pi {\rm i}}}\oint_\mathscr{H} {s^{ - 3} {\rm e}^{ - ns} {\rm d}s} = - \frac{\pi }{4}\left[ {\frac{1}{{2!}}\frac{{{\rm d}^2 {\rm e}^{ - ns} }}{{{\rm d}s^2 }}} \right]_{s = 0} = \frac{\pi }{8}n^2

    $$

    – Gary Aug 21 '23 at 00:35
  • and $$ \sqrt \pi \zeta \left( { - \frac{1}{2}} \right)\frac{1}{{2\pi {\rm i}}}\oint_\mathscr{H} {( - s)^{ - 3/2} {\rm e}^{ - ns} {\rm d}s} = \frac{1}{{\sqrt \pi }}\zeta \left( { - \frac{1}{2}} \right)n^{1/2} \frac{1}{{2{\rm i}}}\oint_\mathscr{H} {( - t)^{ - 3/2} {\rm e}^{ - t} {\rm d}t}\ = - \frac{1}{{\sqrt \pi }}\zeta \left( { - \frac{1}{2}} \right)n^{1/2} \Gamma \left( { - \frac{1}{2}} \right) = 2\zeta \left( { - \frac{1}{2}} \right)n^{1/2} $$ – Gary Aug 21 '23 at 00:36
  • Then you integrate the terms hidden in $o(1)$ by collapsing the contour to the positive real line and using Watson's lemma. – Gary Aug 21 '23 at 00:38
  • @Gary. When I take the second derivative of $e^{-ns}$ wrt $s$, I get $n^2 e^{-ns}$, hence a sign error for the first term. What am I missing? – bob Aug 21 '23 at 04:54
  • My mistake, the $-$ sign is not needed after the first $=$ sign. – Gary Aug 21 '23 at 05:44
  • @Gary. I am trying my best but I cannot figure out how you found the series expansion for $f(t)$ required for Watsons lemma in your answer. Could you help me in my answer? – bob Aug 21 '23 at 07:18
  • Note that what remains after getting the first two terms is $$ \int_0^{ + \infty } {{\rm e}^{ - nt} \frac{1}{{2\pi {\rm i}}}\mathop {\lim }\limits_{\varepsilon \to 0} (F(t + {\rm i}\varepsilon ) - F(t - {\rm i}\varepsilon )){\rm d}t} $$ with $$ F(s) = ( - s)^{ - 3/2} \sum\limits_{n = 1}^\infty {\sqrt \pi \frac{{\zeta ( - 1/2 - n)}}{{n!}}s^n } + H(s) $$ near the origin. Here $H(s)$ is analytic at $s=0$. You found this in your original post with $H(s)$ corresponding to $F(\mathrm{e}^s)$ there. – Gary Aug 21 '23 at 07:30
  • @Gary. I see it now, I was confusing myself with too many functions. How do I deal with the limit $\epsilon\to 0$? – bob Aug 21 '23 at 08:57
  • Can you see that the limit of that difference is $$ \mathop {\lim }\limits_{\varepsilon \to 0} \left[ {( - (t + i\varepsilon ))^{ - 3/2} - ( - (t - i\varepsilon ))^{ - 3/2} } \right]\sum\limits_{n = 1}^\infty {\sqrt \pi \frac{{\zeta ( - 1/2 - n)}}{{n!}}t^n } ;? $$ (note that $H(s)$ is single-valued). The limit in front of the sum should not be difficult. – Gary Aug 21 '23 at 10:05
  • 1
    @Gary. Thank you for writing it out like that, its much simpler than I thought. I should now have no more questions, and will write up the complete asymptotic expansion after I come back from dinner. Thanks again. – bob Aug 21 '23 at 10:09
  • 1
    @Gary. Sorry for the delay. Does my result look correct? – bob Aug 21 '23 at 16:48
  • @bob The coefficient of $n^{-3/2}$, which according to you should be $-\frac14\zeta\left(-\frac52\right)\approx-0.002129$, doesn't seem to check out numerically. – Akiva Weinberger Aug 21 '23 at 17:46
  • @AkivaWeinberger. What should the correct numerical value be? – bob Aug 21 '23 at 17:49
  • 2
    @bob Never mind!! Your value is correct. I simply didn't use enough decimal places for the $\sqrt n$ coefficient, and this was messing up values downstream. I was using $6$ decimal places, but for $n\approx800$ (where I was testing) I needed $10$. – Akiva Weinberger Aug 21 '23 at 17:55
  • You may add that $$ \mathop {\lim }\limits_{\varepsilon \to 0} (F(t + {\rm i}\varepsilon ) - F(t - {\rm i}\varepsilon )) = - 2{\rm i}\sqrt \pi \sum\limits_{k = 1}^\infty {\frac{{\zeta ( - 1/2 - k)}}{{k!}}t^{k - 3/2} } . $$ – Gary Aug 21 '23 at 23:57
  • 1
    @Gary. I will do. Thank you! – bob Aug 22 '23 at 04:16