TITLE: Symmetry of function defined by integral
QUESTION [174 upvotes]: Define a function $f(\alpha, \beta)$, $\alpha \in (-1,1)$, $\beta \in (-1,1)$ as
$$ f(\alpha, \beta) = \int_0^{\infty} dx \: \frac{x^{\alpha}}{1+2 x \cos{(\pi \beta)} + x^2}$$
One can use, for example, the Residue Theorem to show that
$$ f(\alpha, \beta) = \frac{\pi \sin{\left (\pi \alpha \beta\right )}}{ \sin{\left (\pi \alpha\right )} \,  \sin{\left (\pi \beta\right )}} $$
Clearly, from this latter expression, $f(\alpha, \beta) = f(\beta, \alpha)$.  My question is, can one see this symmetry directly from the integral expression?

REPLY [8 votes]: I hope this answers your question.
$$\begin{align}
 \int_0^{\infty} dx \: \frac{x^{\alpha}}{1+2 x \cos{(\pi \beta)} + x^2}
&= \int_0^{\infty} x^{\alpha}\,\mathcal M\circ\mathcal M^{-1}\left\{\frac{1}{1+2 x \cos{(\pi \beta)} + x^2}\right\} dx\\
&= \int_0^{\infty} \int^\infty_0 x^{\alpha}y^{\beta-1}\mathcal M^{-1}\left\{\frac{1}{1+2 x \cos{(\pi \beta)} + x^2}\right\}(y)\,\, dydx\\
&= \int_0^{\infty} \int^\infty_0 x^{\alpha}y^{\beta}\cdot\frac1y \mathcal M^{-1}\left\{\frac{1}{1+2 x \cos{(\pi \beta)} + x^2}\right\}(y)\,\, dydx\\
\end{align}
$$ 
Ideally, if $\displaystyle{\frac1y \mathcal M^{-1}\left\{\frac{1}{1+2 x \cos{(\pi \beta)} + x^2}\right\}(y)}$ is symmetric in $x$ and $y$, then we got what the OP wants.
Surprisingly,
$$\frac1y \mathcal M^{-1}\left\{\frac{1}{1+2 x \cos{(\pi \beta)} + x^2}\right\}(y)=\frac2{\pi}\frac{\sin\left(\frac{\ln x\ln y}{\pi}\right)}{(x^2-1)(y^2-1)}\qquad(\star)$$ which is obviously symmetric.
The rest of the answer is devoted to the proof of $(\star)$.

$$I:=\frac1y \mathcal M^{-1}\left\{\frac{1}{1+2 x \cos{(\pi \beta)} + x^2}\right\}(y)
=\frac1{2\pi iy}\int^{i\infty}_{-i\infty}\underbrace{\frac{y^{-\beta}}{1+2 x \cos{(\pi \beta)} + x^2}}_{:= f(\beta)}d\beta$$ 
Let's look at the poles and residues of the integrand, so that this integral can be evaluated by residue theorem later.
The poles are all simple, and are located at $$p_n^{\pm}=\pm\left(\frac{\ln x}{\pi i}+1\right)+2n:=\pm c\pm 1+2n\qquad n\in\mathbb Z$$
Moreover, the residues are
$$\operatorname{Res}(f(\beta),\beta=p_n^{\pm})=\pm\frac{y^{\mp c\mp 1-2n}}{\pi i(1-x^2)}$$
For $y>1$, $f(\beta)$ decays exponentially on the right half plane. By residue theorem,
$$\begin{align}
I &=\frac1{2\pi i y}\cdot -2\pi i\sum\text{residue on the right half plane} \\
&=-\frac1y\left(\sum^\infty_{n=0}\operatorname{Res}(f(\beta),p_n^{+})+\sum^\infty_{n=1}\operatorname{Res}(f(\beta),p_n^{-})\right) \\
&=-\frac1{\pi i(1-x^2)y}\left[\frac{y^{-c-1}}{1-y^{-2}}+\frac{y^{c+1}}{1-y^2}\right] \\
&=-\frac1{\pi i(1-x^2)}\left[\frac{y^{-c-2}}{1-y^{-2}}+\frac{y^{c}}{1-y^2}\right] \\
&=-\frac1{\pi i(1-x^2)}\left[\frac{y^{-c}}{y^{2}-1}+\frac{y^{c}}{1-y^2}\right] \\
&=-\frac1{\pi i(1-x^2)(1-y^2)}\left(e^{\ln y\ln x/(\pi i)}-e^{-\ln y\ln x/(\pi i)}\right)\\
&=\frac2{\pi(1-x^2)(1-y^2)}\sin\left(\frac{\ln x\ln y}{\pi}\right)\\
\end{align}
$$
For $0<y<1$, $f(\beta)$ decays exponentially on the left half plane. By residue theorem,
$$I=\frac1{2\pi i y}\cdot 2\pi i\sum\text{residue on the left half plane}$$ 
It is not a surprise that the sum is also equal to $\displaystyle{\frac2{\pi(1-x^2)(1-y^2)}\sin\left(\frac{\ln x\ln y}{\pi}\right)}$. This can be seen as an instance of analytic continuation, due to the removable singularity at $y=1$.

In conclusion, 
$$\frac1{2\pi i}\int^{i\infty}_{-i\infty}\frac{y^{-\beta-1}}{1+2 x \cos{(\pi \beta)} + x^2}d\beta=\frac2{\pi}\frac{\sin\left(\frac{\ln x\ln y}{\pi}\right)}{(x^2-1)(y^2-1)}$$
$$ \int_0^{\infty} dx \: \frac{x^{\alpha}}{1+2 x \cos{(\pi \beta)} + x^2}
= \frac2{\pi}\int_0^{\infty} \int^\infty_0 x^{\alpha}y^{\beta}\frac{\sin\left(\frac{\ln x\ln y}{\pi}\right)}{(x^2-1)(y^2-1)}dxdy$$