3

Question: Is there a way to find the complete asymptotic expansion (by deriving the correct $O(1)$ term) via the Euler-Maclaurin formula?


Let $$s_n=\sum_{j=1}^n j\log j$$

Fix $m\ge 1$. By the Euler-Maclaurin formula $$ \begin{align*} s_n&=\int_1^n t\log t\ dt+\frac{n\log n}{2}+\frac{\log n}{12} -\sum_{s=2}^{m-1} \frac{B_{2s}}{(2s)!}\left(\frac{(2s-3)!}{n^{2s-2}}-\frac{(2s-3)!}{1^{2s-2}}\right)+ R_m \\ &= \frac{n^2 \log n}{2}-\frac{n^2}{4}+\frac{n\log n}{2}+\frac{\log n}{12} +\frac{1}{4}-\sum _{s=2}^{m-1} \frac{B_{2s}}{(2s)(2s-1)(2s-2)}\left(\frac{1}{n^{2s-2}}-1\right) +R_m(n) \end{align*}$$ where $$R_m(n)= \int _1^n\frac{B_{2m}-\tilde B_{2m}(t)}{(2m)!}\frac{(2m-2)!}{t^{2m-1}}\ dt=\int_1^n \frac{B_{2m}-\tilde B_{2m}(t)}{(2m)(2m-1)t^{2m-1}}\ dt$$ Now our goal is to bound $R_m(n)$ for large $n$. Since $|B_{2m}-\tilde B_{2m}(t)|\le 2|B_{2m}|$ we have by the triangle inequality for integrals $$\begin{align*} |R_m (n)| &\le \int _1^{n} \frac{2|B_{2m}|}{(2m)(2m-1)t^{2m-1}}\ dt \\&=\frac{2|B_{2m}|}{(2m)(2m-1)(2m-2)}\left(1-\frac{1}{n^{2m-2}}\right) \end{align*}$$ so bounded for $m\ge 1$ and in particular, $R_m(n)=O(1)$ for large $n$. So it should be that $$s_n\overset{?}{\sim} \frac{n^2\log n}{2}-\frac{n^2}{4}+\frac{n\log n}{2}+\frac{1}{4} -\sum_{s=2}^{m-1} \frac{B_{2s}}{(2s)(2s-1)(2s-2) n^{2s-2}}$$ for $m\ge 1$ as $n\to +\infty$. However, I don't think this is a valid asymptotic expansion since if $m=1$ the $R_m(n)$ term contributes a factor of $O(1)$; so the $1/4$ term is off by a constant factor. After doing some searching, indeed, the correct constant is $C:=\log A =0.248754\dots$ where $A$ is the Glaisher–Kinkelin constant. This can be found via the Abel–Plana formula, which is a separate topic.

When $m=1$

$$R_1(n)=\frac{1}{2}\int_1^n \frac{B_{2}-\tilde B_{2}(t)}{t}\ dt=\frac{\log n}{12} -\int _1^n \frac{\tilde B_2(t)}{t}\ dt$$ after substituting $B_2=1/6$. I do not know how to evaluate second integral.

bob
  • 3,079
  • One can also write the constant term as $\frac1{12} - \zeta'(-1)$. – Travis Willse Jul 05 '24 at 02:21
  • @TravisWillse. We can also write $C=\frac{\gamma+\log 2\pi}{12}-\frac{\zeta ' (2)}{2\pi^2}$. – bob Jul 05 '24 at 07:17
  • 1
    "and in particular, $R_m(n)=O(1/n^{2m-2})$" is clearly not the case. Note that $1-1/n^{2m-2} \sim 1$ for large $n$, whence $R_m(n)=O(1)$. – Gary Jul 08 '24 at 03:28
  • Furthermore, I think, you should have $$ \sum\limits_{s = 2}^{m - 1} {\frac{{B_{2s} }}{{(2s)!}}\left( {\frac{{(2s - 3)!}}{{n^{2s - 2} }} - \frac{{(2s - 3)!}}{{1^{2s - 2} }}} \right)} = \sum\limits_{s = 2}^{m - 1} {\frac{{B_{2s} }}{{2s(2s - 1)(2s - 2)}}\left( {\frac{1}{{n^{2s - 2} }} - 1} \right)} $$ when applying the Euler–Maclaurin formula. – Gary Jul 08 '24 at 04:22
  • @Gary. I've reexamined the derivates and made the edits. I knew something was up with the order of the remainder term, but I missed my simple mistake several times. Thank you for the corrections. – bob Jul 08 '24 at 05:43
  • @Gary. So in this case the $O(1)$ contributions come from $1/4$ (via IBP), $R_m(n)$, and the finite sum $\sum {s=2}^{m-1} \frac{B{2s}}{(2s)(2s-1)(2s-2)}$ is that correct? – bob Jul 08 '24 at 05:49
  • @bob Yes, employ $\int_1^n = \int_1^{ + \infty } - \int_n^{ + \infty }$ for $R_m$. The part $ \int_1^{ + \infty }$, $1/4$ and the finite sum together will be the constant term. It looks like it depends on $m$, but it does not. – Gary Jul 08 '24 at 05:58
  • @Gary. Ok, I understand. I was trying $\int_1^n = \int_1^{ + \infty } - \int_n^{ + \infty }$ for the remainder but since I had the order of $R_m$ wrong, the integrals kept diverging. – bob Jul 08 '24 at 06:02
  • 1
    You may assume that $m$ is sufficiently large. – Gary Jul 08 '24 at 06:12

3 Answers3

4

This is too long for a comment.

I could have asked the same question years ago but, using Mathematica, I found a way to do it for any order

Series[Unevaluated[Sum[k Log[k], {k, 1, n}]], {n, Infinity, 7}]

generates before any simplifcation

$$\log \left(e^{-\frac{n^2}{4}} n^{\frac{n^2}{2}+\frac{n}{2}+\frac{1 }{12}} \left(A+\frac{A}{720 n^2}-\frac{1433 A}{7257600 n^4}+\frac{1550887 A}{15676416000 n^6}+O\left(\frac{1}{n^8}\right)\right)\right)$$ which is $$\frac{6 n^2+6 n+1}{12}\, \log (n)-\frac{n^2}{4}+\log (A)+\frac{1}{720 n^2}-\frac{1}{5040n^4}+\frac{1}{10080n^6}+O\left(\frac{1}{n^8}\right)$$

3

In fact we can get full asymptotics (including the constant term) in a bit different way - using analytical continuation.

Using the Frullani integral first $\,\ln j=\int_0^\infty\frac{e^{-t}-e^{-jt}}tdt\,$, and changing the order of summation and integration $$S=\sum_{j=1}^nj\ln j=\int_0^\infty\frac{dt}t\sum\left(je^{-t}-je^{-tj}\right)$$ $$=\int_0^\infty\left(\frac{n(n+1)}2e^{-t}+\frac{ne^{-nt}}{e^t-1}-\frac{1-e^{-nt}}{(e^t-1)^2}e^t\right)\frac{dt}t\tag{1}$$ Now, we consider $$S(\alpha)=\int_0^\infty\left(\frac{n(n+1)}2e^{-t}+\frac{ne^{-nt}}{e^t-1}-\frac{1-e^{-nt}}{(e^t-1)^2}e^t\right)t^\alpha\,dt$$ where we choose $\alpha>1$ - in order to handle every integral separately. In the end we will put $\alpha=-1$ to get the answer. $$S(\alpha)=I_1+I_2+I_3+I_4\tag{2}$$ where $$I_1=\frac{n(n+1)}2\int_0^\infty t^\alpha e^{-t}dt=\frac{n(n+1)}2\Gamma(\alpha+1)\tag{a}$$ $$I_2=n\int_0^\infty\frac{t^\alpha e^{-nt}}{e^t-1}dt=\int_0^\infty\left(\frac xn\right)^{\alpha-1}e^{-x}\frac{\frac xn}{e^\frac xn-1}dx$$ Using the decomposition $$\frac t{e^t-1}=\sum_{k=0}^\infty\frac{B_k}{k!}t^k$$ where $B_k$ denotes Bernoulli number, and performing integration term by term, $$I_2\sim n^{1-\alpha}\sum_{k=0}^\infty\frac{B_k}{k!\,n^k}\Gamma(\alpha+k)\tag{b}$$ In the same way, integrating by parts first, we find $$I_3=\int_0^\infty\frac{t^\alpha e^{-nt}}{(e^t-1)^2}e^tdt$$ $$\sim\alpha n^{1-\alpha}\sum_{k=0}^\infty\frac{B_k}{k!\,n^k}\Gamma(\alpha-1+k)-n^{1-\alpha}\sum_{k=0}^\infty\frac{B_k}{k!\,n^k}\Gamma(\alpha+k)\tag{c}$$ Integrating by parts, $$I_4=-\int_0^\infty\frac{t^\alpha e^t}{(e^t-1)^2}dt=-\alpha\Gamma(\alpha)\zeta(\alpha)=-\Gamma(1+\alpha)\zeta(\alpha)\tag{d}$$ Taking (a), (b), (c), (d) together and putting $\alpha=-1+\epsilon, \,\epsilon\to 0$, after straightforward transformations we get $$S(-1+\epsilon)\sim\frac{n(n+1)}2\Gamma(\epsilon)-\Gamma(\epsilon)\zeta(-1+\epsilon)$$ $$+(-1+\epsilon)n^{2-\epsilon}\left(B_0\Gamma(-2+\epsilon)+\frac{B_1}n\Gamma(-1+\epsilon)+\frac{B_2}{2n^2}\Gamma(\epsilon)\right)$$ $$+(-1+\epsilon)n^{2-\epsilon}\sum_{k=3}^\infty\frac{B_k}{k!n^k}\Gamma(k-2)$$ Using $\Gamma(1+\epsilon)=1-\gamma\epsilon+O(\epsilon^2)$, taking $B_0=1,\,B_1=-\frac12,\,B_2=\frac16,\,B_3=0$, and keeping only non-vanishing (at $\epsilon\to0$) terms $$S\sim-\sum_{k=1}^\infty\frac{B_{k+3}}{n^{k+1}(k+1)(k+2)(k+3)}+\frac{n(n+1)}{2\epsilon}-\frac{n(n+1)\gamma}2-\frac{\zeta(-1)}\epsilon+\gamma\zeta(-1)$$ $$-\zeta'(-1) -(1-\epsilon\ln n)(1-\epsilon)\left(\frac{n^2}{2\epsilon}-\gamma n^2+\frac34n^2+\frac n{2\epsilon}-\frac{n\gamma}2+\frac n2+\frac1{12\epsilon}-\frac\gamma{12}\right)$$ Now, we take $\zeta(-1)=-\frac1{12}$. As expected, all diverging terms cancel, and we get the desired asymptotics: $$\boxed{\,\,S\sim \ln n\left(\frac{n(n+1)}2+\frac1{12}\right)-\frac{n^2}4+\frac1{12}-\zeta'(-1)-\frac1n\sum_{k=1}^\infty\frac{B_{k+3}}{n^k\,(k+1)(k+2)(k+3)}\,\,}$$

Svyatoslav
  • 20,502
  • 1
    Note that $$ - \frac{1}{n}\sum_{k = 1}^\infty {\frac{{B_{k + 3} }}{{n^k (k + 1)(k + 2)(k + 3)}}} = - \sum_{k = 1}^\infty {\frac{{B_{2k + 2} }}{{2k(2k + 1)(2k + 2)n^{2k} }}} .$$ – Gary Mar 06 '25 at 01:11
3

Using the Euler–Maclaurin formula, we have: \begin{align*} \sum\limits_{j = 1}^n {j\log j} = \;&\frac{{n^2 \log n}}{2} - \frac{{n^2 }}{4} + \frac{{n\log n}}{2} + \frac{{\log n}}{{12}} + \frac{1}{4} - \frac{1}{6}\int_1^n {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^2 }}{\rm d}t} \\ =\;& \left( {\frac{{n^2 }}{2} + \frac{n}{2} + \frac{1}{{12}}} \right)\log n - \frac{{n^2 }}{4} + \frac{1}{4} - \frac{1}{6}\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^2 }}{\rm d}t} \\& + \frac{1}{6}\int_n^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^2 }}{\rm d}t} . \end{align*} It is readily shown that $$ \frac{1}{6}\int_n^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^2 }}{\rm d}t} = \mathcal{O}\!\left( {\frac{1}{n}} \right) $$ as $n\to+\infty$. Employing the Euler–Maclaurin formula for $$ \zeta (s) - \frac{1}{{s - 1}} = \sum\limits_{n = 1}^\infty {\frac{1}{{n^s }} - } \int_1^{ + \infty } {\frac{{{\rm d}t}}{{t^s }}} $$ with $\operatorname{Re}(s)>1$, we get $$ \zeta (s) = \frac{1}{{s - 1}} + \frac{1}{2} + \frac{s}{{12}} - \frac{{s(s + 1)(s + 2)}}{6}\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^{3 + s} }}{\rm d}t} , $$ provided $\operatorname{Re}(s)>-2$ and $s\neq 1$, via analytic continuation. Differentiating both sides and substituting $s=-1$, we obtain $$ \zeta '( - 1) = - \frac{1}{4} + \frac{1}{{12}} + \frac{1}{6}\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^2 }}{\rm d}t} , $$ or $$ \frac{1}{4} - \frac{1}{6}\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^2 }}{\rm d}t} = \frac{1}{{12}} - \zeta '( - 1). $$ Therefore, $$ \sum\limits_{j = 1}^n {j\log j} = \left( {\frac{{n^2 }}{2} + \frac{n}{2} + \frac{1}{{12}}} \right)\log n - \frac{{n^2 }}{4} + \frac{1}{{12}} - \zeta '( - 1) + \mathcal{O}\!\left( {\frac{1}{n}} \right) $$ as $n\to+\infty$.

You can now apply the Euler–Maclaurin formula to any given order. For the remainder term, use the identity $\int_1^n = \int_1^{ + \infty } - \int_n^{ + \infty }$. Demonstrate that $\int_n^{+\infty}$ has the appropriate order of magnitude. Although you will derive a different formula for the constant, the constant itself remains the same, namely $\frac{1}{12} - \zeta'(-1)$.

Gary
  • 36,640
  • Sorry, but I am not quite following from the beginning. Which version of the formula are you using? With my remainder, I cannot get odd Bernoulli polynomials, namely $B_3(t-\lfloor t\rfloor)$. – bob Jul 08 '24 at 06:23
  • Integrate by parts the $B_2$ version: https://en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula#Low-order_cases – Gary Jul 08 '24 at 06:33
  • @bob Do you have any further questions? Did any of us answer your question? – Gary Jul 08 '24 at 23:17
  • 1
    I haven’t been able to go through your answer yet because I was busy yesterday (it was my birthday). I apologize for the delay. But as it stands, it looks exactly like what I was looking for so I will accept it. – bob Jul 09 '24 at 03:46
  • 1
    After applying Euler-Maclaurin to $\zeta(s)$ should we add the condition $s\neq 1$? When $s = 1$ the RHS still diverges, also the $\zeta$ function can only be continued to $\mathbb C \setminus {1}$. – bob Jul 09 '24 at 18:07
  • How do you differentiate the expansion

    $$\zeta (s) = \frac{1}{{s - 1}} + \frac{1}{2} + \frac{s}{{12}} - \frac{{s(s + 1)(s + 2)}}{6}\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^{3 + s} }}{\rm d}t}$$ on both sides? I see that you differentiate term by term, but I don't understand how to deal with the integral term. Chain rule doesn't give me the required result.

    – bob Jul 10 '24 at 06:49
  • @bob You have to use the product rule since it is a product. Omitting the minus sign you get $$ \left( {\frac{{\rm d}}{{{\rm d}s}}\frac{{s(s + 1)(s + 2)}}{6}} \right)\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^{3 + s} }}{\rm d}t} + \frac{{s(s + 1)(s + 2)}}{6}\frac{{\rm d}}{{{\rm d}s}}\int_1^{ + \infty } {\frac{{B_3 (t - \left\lfloor t \right\rfloor )}}{{t^{3 + s} }}{\rm d}t} . $$ Now, if $s=-1$, the second term vanishes but the first one does not. – Gary Jul 10 '24 at 06:54
  • Oh sorry, I meant the product rule. I was still applying it wrong though. I looked at the $(s+a)$ terms individually and was trying to apply the product rule with 4 factors, which greatly complicated things. – bob Jul 10 '24 at 06:58
  • Do you use the inequality $|B_{m}(t)|\le \tfrac{2m!}{(2\pi )^m}\zeta(m)$ for $m>0$ and $0\le t\le 1$ to size the $\int _n^{+\infty}$ integral? We have

    $$\left|\int_n^{+\infty} \frac{B(t-\lfloor t\rfloor)}{t^2}\ dt\right| \le \frac{2m!\zeta(m)}{(2\pi)^m} \int_n^{+\infty} \frac{1}{t^2}\ dt$$ which is $O(1/n)$ as $n\to +\infty$. Is this the correct inequality to use?

    – bob Jul 10 '24 at 07:09
  • What is $m$? You just note that the periodic Bernoulli polynomial is a continuous bounded function. You don't need the precise value of the upper bound. (In fact, $\left| {B_3 (t - \left\lfloor t \right\rfloor )} \right| \le \frac{1}{{3^{3/2} \cdot 4}}$ for all real $t$.) – Gary Jul 10 '24 at 07:24
  • 1
    I was looking at https://en.wikipedia.org/wiki/Euler%E2%80%93Maclaurin_formula#The_remainder_term where I found the inequality, but it is easier to note that the periodic Bernoulli polynomial is a continuous bounded function. – bob Jul 10 '24 at 08:05
  • Is this method applicable to find the constant term in the asymptotic expansion of $\sum _{k=1}^n \tfrac{1}{k+1/2}$ as $n\to +\infty$? When I try, the singularity of the $\zeta$ function at $1$ doesn't allow me to proceed. – bob Jul 19 '24 at 07:45
  • @bob Please post a followup question explaining your problem in details. – Gary Jul 19 '24 at 07:47
  • I will do, give me a moment. – bob Jul 19 '24 at 07:49
  • I just posted the question. – bob Jul 19 '24 at 08:31