So I was looking through the homepage of Youtube to see if there were any math problems that I thought that I might be able to solve (without a calculator/online resources) when I came across this video by Maths$505$ asking us to compute the value of the integral $$\color{black}{\int_{-\infty}^\infty\Gamma(1+ix)\Gamma(1-ix)dx}$$which I thought that I might be able to do without using any online resources or a calculator. Here is my attempt at computing the value of the aforementioned integral:$\color{white}{\require{cancel}{.}}$ $$\int_{-\infty}^\infty\Gamma(1+ix)\Gamma(1-ix)dx$$
$$\int_{-\infty}^\infty(ix)!(-ix)!dx$$
$$\text{Which can also be rewritten as }\int_{-\infty}^\infty ix\Gamma(ix)\Gamma(1-ix)dx$$
$$\text{Which can then be simplified as }\int_{-\infty}^\infty ix\pi\csc(\pi ix)dx$$$$\int_{-\infty}^\infty\dfrac{ix\pi}{\sin(\pi ix)}dx$$$$\int_{-\infty}^\infty\dfrac{\cancel{i}x\pi}{\cancel{i}\sinh(\pi x)}dx$$$$\pi\int_{-\infty}^\infty\dfrac{x\text{ }dx}{\sinh(\pi x)}$$$$\text{Since I know that }\sinh(z)\text{ is equal to }\dfrac{e^z-e^{-z}}{2}$$$$\pi\int_{-\infty}^\infty\dfrac{2x\text{ }dx}{e^{\pi x}-e^{-\pi x}}$$$$\text{Or }2\pi\int_{-\infty}^\infty\dfrac{x\text{ }dx}{e^{\pi x}-e^{-\pi x}}$$$$\text{Since I know that when you integrate with }e\text{ that means that }f(x)=f(-x)$$$$\text{That means we can rewrite the integral as}$$$$4\pi\int_0^\infty\dfrac{x}{e^{\pi x}-e^{-\pi x}}dx$$$$\text{Now to expand with }e$$$$4\pi\int_0^\infty\dfrac{xe^{-\pi x}}{e^{-\pi x}(e^{\pi x}-e^{-\pi x})}dx$$$$4\pi\int_0^\infty\dfrac{xe^{-\pi x}}{1-e^{-2\pi x}}dx$$$$\text{Which we can rewrite as }\sum_{k\geq0}e^{-2\pi kx}$$$$\text{Plugging this back into the integral gets us}$$$$4\pi\int_0^\infty xe^{-\pi x}\sum_{k\geq0}e^{-2\pi kx}dx$$$$\text{Or }4\pi\int_0^\infty\sum_{k\geq0}xe^{-(2k+1)\pi x}dx$$$$\text{Which can also be rewritten as }4\pi\sum_{k\geq0}\int_0^\infty xe^{-(2k+1)\pi x}dx$$$$\text{Now, substituting }-(2k+1)\pi x\text{ for }t\text{ (}t\text{-substitution)}$$$$4\pi\sum_{k\geq0}\int_0^\infty xe^tdx$$$$\text{Which should be rewritten as (to avoid getting stuck in an infinite loop of nothingness)}$$$$dx=\dfrac{dt}{(2k+1)\pi}$$$$4\pi\sum_{k\geq0}\int_0^\infty\dfrac{t}{(2k+1)\pi}-e^{-t}\dfrac{dt}{(2k+1)\pi}$$$$\text{Or }4\pi\sum_{k\geq0}\int_0^\infty\dfrac{1}{(2k+1)^2\pi^2}te^{-t}dt$$Now, to integrate:$$\dfrac{4}{\pi}\sum_{k\geq0}\dfrac{1}{(2k+1)^2}\int_0^\infty te^{-t}dt$$$$\dfrac{4}{\pi}\sum_{k\geq0}\dfrac{1}{(2k+1)^2}$$$$\text{Now to take the right hand and left hand sums}$$$$\dfrac{1}{4}\sum_{k\geq1}\dfrac{1}{(2k)^2}+\sum_{u\geq0}\dfrac{1}{(2n+1)^2}$$$$\dfrac{\pi^2}{24}+S=\dfrac{\pi^2}{6}$$$$S=\dfrac{4\pi^2-\pi^2}{24}=\dfrac{3\pi^2}{24}=\dfrac{\pi^2}{8}$$$$\therefore\text{ }\int_{-\infty}^\infty\Gamma(1+ix)\Gamma(1-ix)dx=\dfrac{\pi^2}{8}$$
My question
Is my solution correct, or what could I do to attain the correct solution/attain it more easily?
$$\color{white}{\small\text{(link to picture of proof)}}$$
Mistakes I might have made
- Any point where I simplify the integral
- Any point where I converted the integral to a sum
- Calculating the value of the sums
It's true that the integral equals $\displaystyle \frac{4}{\pi}\sum_{k\ge0}^{ }\frac{1}{\left(2k+1\right)^{2}}$, but the steps after that seem incorrect and are worded strangely.
As a possibly overcomplicated alternative, we know the integral in question is $\displaystyle 4\pi\int_{0}^{\infty}\frac{x}{e^{\pi x}-e^{-\pi x}}dx.$ Let $f(z) = \displaystyle \frac{ze^{\pi z}}{e^{2\pi z}-1}$. Its singularities are $z = ni$, $\forall n \in \mathbb{Z}$. Notice that $z=0$ is the only removable singularity because $f(z) \to \displaystyle \frac{1}{2\pi}$ as $z \to 0$. The other singularities are poles because the first term of the Laurent expansion of $f(z)$ centered at $z=ni$ is $\displaystyle \frac{n\left(-1\right)^{n}i}{2\pi}\cdot\frac{1}{z-ni}$, which blows up when $z \to ni$.
Using that information, let $R$ be sufficiently large and $r \in (0,1)$ be small in the following picture (you can play around with it here).
We employ Cauchy's Residue Theorem as follows:
$$ 0 = \left(\int_{0}^{R}+\int_{R}^{R+i}+\int_{R+i}^{r+i}+\int_{\lambda}^{ }+\int_{i-ri}^{0}\right)f(z)dz. $$
From left to right, let each contour integral be $I_1, I_2, \ldots, I_5$.
We transform $I_3$ like this:
$$ I_3 := \int_{R+i}^{r+i}f(z)dz=-\int_{r}^{R}f(x+i)d(x+i)=\int_{r}^{R}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx+i\int_{r}^{R}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx. $$
We transform $I_5$ like this:
$$ \int_{i-ri}^{0}f(z)dz=-\int_{0}^{1-r}f(iy)d(iy)=-\frac{i}{2}\int_{0}^{1-r}y\csc\left(\pi y\right)dy. $$ Applying $\Re$ on both sides of the following equation, we get
$$ \begin{align} \Re 0 &= \Re (I_1 + I_2 + I_3 + I_4 + I_5) \\ 0 &= \Re I_1 + \Re I_2 + \Re \int_{r}^{R}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx+\Re i\int_{r}^{R}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx + \Re I_4 - \frac{1}{2}\Re i \int_{0}^{1-r}y\csc\left(\pi y\right)dy \\ &= I_1 + \Re I_2 + \int_{r}^{R}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx + 0 + \Re I_4 - 0 \\ \end{align} $$
where we use the fact that $\displaystyle \frac{xe^{\pi x}}{e^{2\pi x}-1}$ and $y\csc\left(\pi y\right)$ are integrable where $x \in [r,R]$ and $y \in [0,1-r]$.
Applying $R \to \infty$ and $r \to 0^+$ on both sides, we can recover the desired integral:
$$ \begin{align} 0 &= \int_{0}^{\infty}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx+0+\int_{0}^{\infty}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx-\frac{\pi}{2}\Re i \operatorname{Res}\left(\frac{ze^{\pi z}}{e^{2\pi z}-1}, z = i\right) \\ &= 2\int_{0}^{\infty}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx-\frac{\pi}{2}\Re i \cdot\frac{1\left(-1\right)^{1}i}{2\pi} \\ &= 2\int_{0}^{\infty}\frac{xe^{\pi x}}{e^{2\pi x}-1}dx - \frac{1}{4} \\ \end{align} $$ where in $I_2$ we can let $z = R+iy$, use the theorem $\displaystyle \left|\int_{a}^{b}g\left(z\right)dz\right|\le\int_{a}^{b}\left|g\left(z\right)\right|dz$, and the Squeeze Theorem to prove it converges to $0$.
Finally, we can simply multiply both sides by $4\pi$ and eventually get $$I = 4\pi\int_{0}^{\infty}\frac{x}{e^{\pi x}-e^{-\pi x}}dx = \frac{\pi}{2}.$$