I was evaluating:
$$I:=\int_{0}^{\infty}\frac{\sin(x)}{\sinh(x)}\,dx$$
This is what I did, how can my answer be simplified if correct. The following is my work:
$$I=2\int_{0}^{\infty}\frac{\sin(x)}{e^x-e^{-x}}\,dx$$
$$=2\int_{0}^{\infty}\frac{e^{-x}\sin(x)}{1-e^{-2x}}\,dx$$
$$=2\int_{0}^{\infty}e^{-x}\sin(x)\sum_{n=0}^{\infty}e^{-2xn}\,dx$$
$$=-2\Im\sum_{n=0}^{\infty}\int_{0}^{\infty}e^{-(2n+1+i)x}\,dx$$
$$=2\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2+1}$$
$$=2\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2+1}$$
$$=\frac{1}{2i}\sum_{n=1}^{\infty}\frac{1}{n+\alpha}-\frac{1}{n+\beta}$$
$$\alpha:=-\frac{1+i}{2},\beta:=\frac{i-1}{2}$$
Adding and subtracting $\frac{1}{n}$ yields:
$$I=\frac{1}{2i}[\sum_{n=1}^{\infty}\frac{1}{n}-\frac{1}{n+\beta}-\sum_{n=0}^{\infty}\frac{1}{n}-\frac{1}{n+\alpha}]$$
$$I=\frac{1}{2i}(\psi(\beta)-\psi(\alpha))$$
And so
$$I=\frac{1}{2i}(\psi(\frac{i-1}{2})-\psi(-\frac{i+1}{2}))$$
I found a YouTube video on this integral where it was correctly evaluated to be $\frac{\pi}{2}\tanh(\frac{\pi}{2})$
Can I get some guidance on simplifying the digamma functions so as to get the given answer. Also if I made any mistakes I would like corrections to them please.
Thank you for your help!
Edit (1):
We can use the following digamma properties namely:
$$\psi(1-x)-\psi(x)=\pi\cot(\pi x)$$
$$\psi(1+x)-\psi(x)=\frac{1}{x}$$
Using these we can see that:
$$\psi(-\frac{1+i}{2})=\frac{2}{1+i}+\psi(\frac{1-i}{2})$$
$$\psi(\frac{i-1}{2})=\frac{2}{1-i}-\pi\cot(\frac{\pi}{2}(1+i))+\psi(\frac{1-i}{2})$$
Doing the arithmetic we obtain a new expression for $I$.
$$I=1+\frac{\pi}{2}\tanh(\frac{\pi}{2})$$
New question: why is the $+1$ there? I can’t seem to figure out how it got there but it is the only thing left causing problems. Any help is appreciated!
Edit (2): I solved it! Here is what I did wrong and how I fixed it:
$$I=\frac{1}{2i}[\sum_{n=1}^{\infty}\frac{1}{n}-\frac{1}{n+\beta}-\sum_{n=0}^{\infty}\frac{1}{n}-\frac{1}{n+\alpha}]$$
$$I=\frac{1}{2i}(\psi(\beta+1)-\psi(\alpha+1))$$
$$I=\frac{1}{2i}(\psi(\frac{i+1}{2})-\psi(\frac{1-i}{2}))$$
Then from the aforementioned formula we can see that:
$$\psi(\frac{1-i}{2})=\psi(\frac{1+i}{2})-\pi\cot(\frac{\pi}{2}(1-i))$$
And so doing the arithmetic we get:
$$I=\frac{\pi}{2}\tanh(\frac{\pi}{2})$$