# calculus – An integral which is derived from Jacobi’s Sum of Two Squares Theorem by Complex Analysis

Here is an integral that I’m having trouble with. I have got to this integral by trying to prove Jacobi’s sum of two squares by complex analysis. And here is it:
$$I:= int_{-infty}^{infty} frac{operatorname{csch}(x) sin (2x)}{cos (2x) – cosh (pi)}mathrm{d}x=pi cothleft(frac{pi}{2}right) – frac{1}{2}B left(frac{1}{4}, frac{1}{4}right)$$
My step so far:
It is well-known that:
$$sum_{n=1}^infty 2 pi (-1)^{n-1} mathrm{e}^{-omega pi n} sin(pi kappa n) = frac{2 pi e^{pi omega } sin (pi kappa )}{2 e^{pi omega } cos (pi kappa )+e^{2 pi omega }+1}$$$$=frac{pi sin (pi kappa )}{cos (pi kappa )+coshleft( pi omega right)}$$
By substitution $$k = t+1$$ cause we know that $$cospi (t+1) = – cos pi t$$:
$$2cdotsum_{n=1}^infty mathrm{e}^{-omega pi n} sin(pi t n) = frac{ sin (pi t )}{coshleft( pi omega right)-cos (pi t)}$$
Now let $$omega = 1$$ and $$t = frac{2x}{pi}$$. We obtain:
$$2cdotsum_{n=1}^infty mathrm{e}^{-pi n} sinleft( 2nxright) = frac{ sin (2x )}{cos (2x)-coshleft( pi right)}$$
Plug this infinite representation in our integral:
$$I = -2cdotsum_{n=1}^infty mathrm{e}^{-pi n} int_{-infty}^{infty} frac{sin (2nx)}{sinh(x)} mathrm{d}x$$
Each integral inside is fairly easy to compute. Indeed, one can use Laplace transform:
$$int_{-infty}^{infty} frac{sin (2nx)}{sinh(x)} mathrm{d}x = 2 int_{0}^{infty} frac{sin (2nx)}{sinh(x)} mathrm{d}x=4 int_{0}^{infty} frac{e^{-x}sin (2nx)}{1- e^{-2x}} mathrm{d}x$$$$=4sum_{i=0}^{infty} int_{0}^{infty} sin(2nx) e^{-(2n+1)x} mathrm{d}x= pi tanhleft(npi right)$$
The last inequality is obtained by the fact that: $$tanh left(frac{pi x}{2}right) = frac{4x}{pi} sum_{kgeq 1} frac{1}{(2k-1)^2 + x^2}$$. Therefore:
$$I: = 2pi sum_{n=1}^{infty} e^{-pi n} tanh(pi n)$$
And I’m stuck here because I don’t know how to connect this sum with the result above. Indeed, I can derive a further result by using $$tanh(x)$$ generating summation which is:
$$tanh (x) = 1+ 2sum_{n=1}^{infty}frac{(-1)^n}{e^{2nx}}$$
However, I can’t still be able to get the Beta Function to appear. Hope anyone can help me to derive the result above. Thank you so much.