Use Abel-Plana formula to compute $\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1} dt$

I have asked a related problem here:

$$I=\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1} dt$$

But I want to use the Abel-Plana formula to calculate above integral. The Abel-Plana formula says: $$\sum_{n=0}^\infty f(n)=\int_0^\infty f(x)dx+\frac{1}{2}f(0)+i\int_0^\infty \frac{f(it)-f(-it)}{e^{2\pi t}-1}dt$$ This formula requires: $$|f(z)|\le \frac{C}{|z|^{1+\epsilon}}$$ to guarantee both $$\sum_{n=0}^\infty f(n)$$ and $$\int_0^\infty f(x)dx$$ converge.

Can I use it if $$\sum_{n=0}^\infty f(n)$$ and $$\int_0^\infty f(x)dx$$ diverge, but $$\lim_{N\rightarrow \infty} \left( \sum_{n=0}^N f(n) -\int_0^N f(x)dx\right)$$ exists?

Here is my attempt: $$I=\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1} dt ~~~~~~\text{let}~~~f(z)=\frac{\ln(1+z)}{2}$$

$$f(it)-f(-it)=\frac{\ln(1+it)}{2}-\frac{\ln(1-it)}{2}=\mathrm{artanh}(it)=i\cdot \arctan(t)$$

plug into the Abel-Plana formula:

$$\sum_{n=0}^\infty \frac{\ln(1+n)}{2}=\int_0^\infty \frac{\ln(1+x)}{2}dx+0-\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1}dt$$

$$I=\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1}dt=\lim_{N\rightarrow \infty} \left( \int_0^N \frac{\ln(1+x)}{2}dx-\sum_{n=0}^N \frac{\ln(1+n)}{2} \right)$$

$$I=\frac{1}{2}\lim_{N\rightarrow \infty} \left( ~~(N+1)\ln(N+1)-N- \ln[(N+1)!] ~~\right)$$

let $$n=N+1$$ and apply Stirling's formula:

$$I=\frac{1}{2}\lim_{n\rightarrow \infty} \left( ~~n\ln(n)-n+1- \ln\left[\sqrt{2\pi n} \left(\frac{n}{e}\right)^n \right] ~~\right)$$

expand and cancel the terms:

$$I=\frac{1}{2}\lim_{n\rightarrow \infty} \left( 1-\frac{1}{2}\ln(2\pi)-\frac{1}{2}\ln(n)\right)$$

Surely this limit diverges. The correct result is without the last term $$-\frac{1}{2}\ln(n)$$

Update: I put the solution in the answer box below.

• The line directly before “let $n=N+1$…” has a diverging limit. Are you sure the inequality condition is satisfied for the Abel Plana formula? Commented Jul 13, 2022 at 1:54
• There should be a term $f(N)/2$ (plus an error term) in the summation formula if you just sum up to $N$. In the Wikipedia result it is assumed that $f(N)\to 0$ as $N\to \infty$, thus $f(N)/2$ and the error term both vanish. See the general result here.
– Gary
Commented Jul 13, 2022 at 2:37
• Thank you so much for this! But what is the second line (Eq.2.10.2) in this general formula? I mean the index seems not balanced... (the first line has index "n", but the second line has index "m", when do those "m" terms vanish?) @Gary Commented Jul 13, 2022 at 2:47
• @MathFail You can choose your favourite positive integer $m$. This version is used to obtain asymptotic expansions, hence the finite sum up to $m$. There is also this version: $$\sum\limits_{j = a}^n {f(j)} = \int_a^n {f(t)dt} + \frac{{f(a) + f(n)}}{2} + 2\int_0^{ + \infty } {\frac{{{\mathop{\rm Im}\nolimits} (f(n + it) - f(a + it))}}{{e^{2\pi t} - 1}}dt}$$ valid under certain conditions on $f$. See pp. $289$-$290$ in F. W. J. Olver's book Asymptotics and Special Functions.
– Gary
Commented Jul 13, 2022 at 3:01
• I see, I will read that book, thank you so much! @Gary Commented Jul 13, 2022 at 3:12

Thank you to @Gary for mentioning this term I missed. And here is the full solution.

Use Abel-Plana formula, Eq.(2.10.2) $$\sum_{n=a}^N f(n)=\int_a^N f(x)dx+\frac{1}{2}f(a)+\frac{1}{2}f(N)+i\int_0^\infty \frac{f(it)-f(-it)}{e^{2\pi t}-1}dt+\hat{R}$$

where $$\hat{R}$$ is the remainder representing the last two terms in the second line of Eq.(2.10.2).

Let $$f(z)=\frac{1}{2}\ln(1+z)$$

then the remainder $$\hat{R}$$ vanishes when $$N\rightarrow\infty$$ for our choice of $$f(z)$$, namely,

$$\lim_{N\to \infty} \hat{R}=0$$

Let

$$I=\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1} dt$$ Simplify the following terms $$f(it)-f(-it)=\frac{\ln(1+it)}{2}-\frac{\ln(1-it)}{2}=\mathrm{artanh}(it)=i\cdot \arctan(t)$$

Let $$~a=0$$, and we get

$$\sum_{n=0}^N \frac{\ln(1+n)}{2}=\int_0^N \frac{\ln(1+x)}{2}dx+0+\frac{1}{2}\cdot\frac{\ln(1+N)}{2}-\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1}dt+\hat{R}$$

Organize terms and take the limit on both sides,

$$I=\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1}dt=\lim_{N\rightarrow \infty} \left( \int_0^N \frac{\ln(1+x)}{2}dx+\frac{\ln(1+N)}{4}-\sum_{n=0}^N \frac{\ln(1+n)}{2} \right)$$ Further, we get $$I=\frac{1}{2}\lim_{N\rightarrow \infty} \left( ~(N+1)\ln(N+1)-N+\frac{1}{2}\cdot\ln(1+N)- \ln[(N+1)!] ~\right)$$

let $$n=N+1$$:

\begin{align}I&=\frac{1}{2}\lim_{n\rightarrow \infty} \left( ~n\ln(n)-n+1+\frac{1}{2}\cdot\ln(n)- \ln (n!) ~\right)\\ \\ &=\frac{1}{2}\lim_{n\rightarrow \infty} \left(1+\ln\left(\frac{n^{n+\frac{1}2}}{n!e^n}\right)\right) \end{align}

Use Stirling's formula, we get the limit:

$$\lim_{n\rightarrow \infty} \left(\frac{n^{n+\frac{1}2}}{n!e^n}\right)=\frac{1}{\sqrt{2\pi}}$$

Finally,

$$\int_0^\infty \frac{\arctan(t)}{e^{2\pi t}-1} dt =\frac{1}{2}-\frac{1}{4}\cdot\ln(2\pi)$$

• You are useing the Abel–Plana and not the Euler–Maclaurin formula. Also, your first equality is incorrect. You cannot just let $N\to +\infty$ in some terms but not in others.
– Gary
Commented Jan 6, 2023 at 3:41
• Hi, I have edited the Abel-Plana formula and I add a paragraph underneath the first equality to explain the remainder vanishes for this specific choice of $f(z)$. Is this okay now? @Gary Commented May 11, 2023 at 23:57
• After the shift $n=N+1$, instead of replacing $n!$ by an approximation, just write what you get exactly: $$\frac{1}{2}\mathop {\lim }\limits_{n \to + \infty } \left( {1 + \ln \left( {\frac{{n^{n + 1/2} {\rm e}^{ - n} }}{{n!}}} \right)} \right).$$ Now refer to the known limit $$\mathop {\lim }\limits_{n \to + \infty } \frac{{n^{n + 1/2} {\rm e}^{ - n} }}{{n!}} = \frac{1}{{\sqrt {2\pi } }}.$$
– Gary
Commented May 12, 2023 at 0:03
• Thank you, I have fixed this part. Could you please take a look for your first comment, regarding my first equality, is that part okay now? @Gary Commented May 12, 2023 at 0:16
• Yes, I have updated and added all details, thank you. @Gary Commented May 12, 2023 at 1:36

Let me give you a more general result:

As we know:

$$\displaystyle \zeta(s,a)=\sum_{k=0}^{\infty}{\dfrac{1}{(n+a)^s}}$$

let $$\ f(x)=(x+a)^{-s}$$, and

$$\displaystyle f(ix)-f(-ix)=\dfrac{-2i\sin\left(s\arctan\left({\large\frac{x}{a}}\right)\right)}{(a^2+x^2)^{\large\frac{s}{2}}}$$

Substitute it into Abel Plana's formula and it gives that:

\displaystyle \begin{aligned}\zeta(s,a)&=\dfrac{1}{2a^s}+\int_{0}^{\infty}{\dfrac{1}{(x+a)^s} \ \mathrm{d}x}+\dfrac{2}{a^{s-1}}\int_{0}^{\infty}{\dfrac{\sin\left(s\arctan x\right)}{(1+x^2)^{^{\large\frac{s}{2}}}\left(e^{2aπx}-1\right)}\ \mathrm{d}x}\\\\&=\dfrac{a^{-s}}{2}+\dfrac{a^{1-s}}{s-1}+2a^{1-s}\int_{0}^{\infty}{\dfrac{\sin\left(s\arctan x\right)}{(1+x^2)^{^{\large\frac{s}{2}}}\left(e^{2aπx}-1\right)}\ \mathrm{d}x}\end{aligned}\\

Now, take the first and second derivative of both sides with respect to s:

\displaystyle \begin{aligned}\dfrac{\partial(\zeta(s,a))}{\partial s}&=-\dfrac{a^{-s}\ln a}{2}+\dfrac{a^{1-s}\ln a}{1-s}-\dfrac{a^{1-s}}{(1-s)^2}-2a^{1-s}\ln a\int_{0}^{\infty}{\dfrac{\sin\left(s\arctan x\right)}{(1+x^2)^{^{\large\frac{s}{2}}}\left(e^{2aπx}-1\right)}\ \mathrm{d}x}+2a^{1-s}\int_{0}^{\infty}{\dfrac{\arctan x\cos\left(s\arctan x\right)-{\large\frac{\ln(1+x^2)}{2}}\sin\left(s\arctan x\right)}{(1+x^2)^{^{\large\frac{s}{2}}}\left(e^{2aπx}-1\right)}\ \mathrm{d}x}\end{aligned}\\

Finally, let s = $$\ 0$$:

\displaystyle \begin{aligned}\zeta'(0,a)&=-\dfrac{\ln a}{2}+a\ln a-a+2a\int_{0}^{\infty}{\dfrac{\arctan x}{e^{2aπx}-1}\ \mathrm{d}x}\end{aligned}\\

$$\\$$

\displaystyle \begin{aligned}\int_{0}^{\infty}{\dfrac{\arctan x}{e^{2aπx}-1}\ \mathrm{d}x}&=\dfrac{\zeta'(0,a)}{2a}+\dfrac{\ln a}{4a}-\dfrac{\ln a}{2}+\dfrac{1}{2}\\\\&=\dfrac{\ln\Gamma(a)}{2a}+\dfrac{\ln a-\ln(2π)}{4a}-\dfrac{\ln a}{2}+\dfrac{1}{2}\end{aligned}