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.
Best Answer
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)$$