$$\newcommand{C}[0]{\mathbb{C}}
\newcommand{div}[0]{\mathrm{div}}
\newcommand{division}[0]{÷}
\newcommand{grad}[0]{\mathrm{grad}\ }
\newcommand{N}[0]{\mathbb{N}}
\newcommand{Q}[0]{\mathbb{Q}}
\newcommand{R}[0]{\mathbb{R}}
\newcommand{rot}[0]{\mathrm{rot}\ }
\newcommand{Z}[0]{\mathbb{Z}}
$$
@integralsbot
さんがツイートした
こちらの定理
の解説です.
以下の等式が成り立ちます.ただし$\theta\in\R$とします.
$\displaystyle\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x=2\pi\left|\sin\theta\right|$
ツイート内容では右辺が$2\pi\sin\theta$となっていますが,$2\pi\left|\sin\theta\right|$が正しいです(実軸に沿って積分すると解釈した場合).これは対数関数の分岐点の位置関係が$\theta$によって変化し,それによって分岐点の避け方が異なるためです.
解説
実数$\alpha$に対し,複素関数$\arg_\alpha:\C\backslash\left\{re^{i\alpha}:r\in\R_{\geq0}\right\}\to\left]\alpha,\alpha+2\pi\right[$,$\log_\alpha:\C\backslash\left\{re^{i\alpha}:r\in\R_{\geq0}\right\}\to\C$を
$\forall\alpha\in\R,\ \forall r>0,\ \forall u\in\left]\alpha,\alpha+2\pi\right[,\ \arg_\alpha\left(re^{iu}\right)=u$
$\forall\alpha\in\R,\ \forall z\in\C\backslash\left\{re^{i\alpha}:r\in\R_{\geq0}\right\},\ \log_\alpha\left(z\right)=\ln\left|z\right|+i\arg_\alpha\left(z\right)$
により定義すると,任意の実数$\alpha$に対して,関数$\log_\alpha$は正則関数であり,
$\displaystyle\forall\alpha\in\R,\ \frac{\mathrm{d}}{\mathrm{d}z}\log_\alpha\left(z\right)=\frac{1}{z}$
です.
\begin{align*}
&\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\lim_{\varepsilon\rightarrow+0}\int_\varepsilon^R\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\lim_{\varepsilon\rightarrow+0}\left(\left[x\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\right]_{x=\varepsilon}^R-\int_\varepsilon^Rx\frac{0+\left(-2\right)\left(-2\frac{\cos2\theta}{x^3}\right)+\left(-4\right)\frac{1}{x^5}}{1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}}\mathrm{d}x\right)\\
=&\lim_{R\rightarrow\infty}\lim_{\varepsilon\rightarrow+0}\left(R\ln\left(1-2\frac{\cos2\theta}{R^2}+\frac{1}{R^4}\right)-\varepsilon\ln\left(1-2\frac{\cos2\theta}{\varepsilon^2}+\frac{1}{\varepsilon^4}\right)-\int_\varepsilon^R\frac{2\left(e^{2i\theta}+e^{-2i\theta}\right)x^2-4}{x^4-\left(e^{2i\theta}+e^{-2i\theta}\right)x^2+1}\mathrm{d}x\right)\\
=&\lim_{R\rightarrow\infty}\lim_{\varepsilon\rightarrow+0}\left(-R\left(2\frac{\cos2\theta}{R^2}-\frac{1}{R^4}+O\left(\frac{1}{R^4}\right)\right)-\varepsilon\left(\ln\left(\varepsilon^4-\left(2\cos2\theta\right)\varepsilon^2+1\right)-4\ln\varepsilon\right)-\int_\varepsilon^R\frac{2e^{2i\theta}\left(x^2-e^{-2i\theta}\right)+2e^{-2i\theta}\left(x^2-e^{2i\theta}\right)}{\left(x^2-e^{2i\theta}\right)\left(x^2-e^{-2i\theta}\right)}\mathrm{d}x\right)\\
=&\lim_{R\rightarrow\infty}\lim_{\varepsilon\rightarrow+0}\left(-2\frac{\cos2\theta}{R}+\frac{1}{R^3}+O\left(\frac{1}{R^3}\right)-\varepsilon\ln\left(\varepsilon^4-\left(2\cos2\theta\right)\varepsilon^2+1\right)+4\varepsilon\ln\varepsilon-\int_\varepsilon^R\left(\frac{2e^{2i\theta}}{x^2-e^{2i\theta}}+\frac{2e^{-2i\theta}}{x^2-e^{-2i\theta}}\right)\mathrm{d}x\right)\\
=&-2\cos2\theta\cdot0+0+0-0\ln\left(0^4-\left(2\cos2\theta\right)0^2+1\right)+4\cdot0+\lim_{R\rightarrow\infty}\lim_{\varepsilon\rightarrow+0}\left(-\int_\varepsilon^R\left(\frac{e^{i\theta}\left(x+e^{i\theta}\right)-e^{i\theta}\left(x-e^{i\theta}\right)}{\left(x-e^{i\theta}\right)\left(x+e^{i\theta}\right)}+\frac{e^{-i\theta}\left(x+e^{-i\theta}\right)-e^{-i\theta}\left(x-e^{-i\theta}\right)}{\left(x-e^{-i\theta}\right)\left(x+e^{-i\theta}\right)}\right)\mathrm{d}x\right)\\
=&\lim_{R\rightarrow\infty}\int_0^R\left(-\frac{e^{i\theta}}{x-e^{i\theta}}+\frac{e^{i\theta}}{x+e^{i\theta}}-\frac{e^{-i\theta}}{x-e^{-i\theta}}+\frac{e^{-i\theta}}{x+e^{-i\theta}}\right)\mathrm{d}x\\
\end{align*}
$\displaystyle\left(\mathrm{i}\right)\exists n\in\Z\ \mathrm{s.t.}\ 2n\pi<\theta<\left(2n+1\right)\pi$のとき
\begin{align*}
&\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\int_0^R\left(-\frac{e^{i\theta}}{x-e^{i\theta}}+\frac{e^{i\theta}}{x+e^{i\theta}}-\frac{e^{-i\theta}}{x-e^{-i\theta}}+\frac{e^{-i\theta}}{x+e^{-i\theta}}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\left[-e^{i\theta}\log_0\left(x-e^{i\theta}\right)+e^{i\theta}\log_0\left(x+e^{i\theta}\right)-e^{-i\theta}\log_0\left(x-e^{-i\theta}\right)+e^{-i\theta}\log_0\left(x+e^{-i\theta}\right)\right]_{x=0}^R\\
=&\lim_{R\rightarrow\infty}\left(-e^{i\theta}\log_0\left(R-e^{i\theta}\right)+e^{i\theta}\log_0\left(R+e^{i\theta}\right)-e^{-i\theta}\log_0\left(R-e^{-i\theta}\right)+e^{-i\theta}\log_0\left(R+e^{-i\theta}\right)\right)-\left(-e^{i\theta}\log_0\left(-e^{i\theta}\right)+e^{i\theta}\log_0\left(e^{i\theta}\right)-e^{-i\theta}\log_0\left(-e^{-i\theta}\right)+e^{-i\theta}\log_0\left(e^{-i\theta}\right)\right)\\
=&\lim_{R\rightarrow\infty}\left(e^{i\theta}\left(\ln\left|\frac{R+e^{i\theta}}{R-e^{i\theta}}\right|-i\arg_0\left(R-e^{i\theta}\right)+i\arg_0\left(R+e^{i\theta}\right)\right)+e^{-i\theta}\left(\ln\left|\frac{R+e^{-i\theta}}{R-e^{-i\theta}}\right|-i\arg_0\left(R-e^{-i\theta}\right)+i\arg_0\left(R+e^{-i\theta}\right)\right)\right)-\left(-e^{i\theta}i\left(\theta-2\pi\left\lfloor\frac{\theta}{2\pi}\right\rfloor+\pi\right)+e^{i\theta}i\left(\theta-2\pi\left\lfloor\frac{\theta}{2\pi}\right\rfloor\right)-e^{-i\theta}i\left(-\theta+2\pi\left\lfloor\frac{\theta}{2\pi}\right\rfloor+\pi\right)+e^{-i\theta}i\left(-\theta+2\pi\left\lfloor\frac{\theta}{2\pi}\right\rfloor+2\pi\right)\right)\\
=&e^{i\theta}\left(\ln\left|1\right|-i\cdot2\pi+i\cdot0\right)+e^{-i\theta}\left(\ln\left|1\right|-i\cdot0+i\cdot2\pi\right)+e^{i\theta}i\pi-e^{-i\theta}i\pi\\
=&-i\pi\left(e^{i\theta}-e^{-i\theta}\right)\\
=&2\pi\sin\theta\\
=&2\pi\left|\sin\theta\right|
\end{align*}
$\displaystyle\left(\mathrm{ii}\right)\exists n\in\Z\ \mathrm{s.t.}\ \left(2n+1\right)\pi<\theta<\left(2n+2\right)\pi$のとき
\begin{align*}
&\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\int_0^R\left(-\frac{e^{i\theta}}{x-e^{i\theta}}+\frac{e^{i\theta}}{x+e^{i\theta}}-\frac{e^{-i\theta}}{x-e^{-i\theta}}+\frac{e^{-i\theta}}{x+e^{-i\theta}}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\int_0^R\left(-\frac{-e^{i\left(\theta-\pi\right)}}{x+e^{i\left(\theta-\pi\right)}}+\frac{-e^{i\left(\theta-\pi\right)}}{x-e^{i\left(\theta-\pi\right)}}-\frac{-e^{-i\left(\theta-\pi\right)}}{x+e^{-i\left(\theta-\pi\right)}}+\frac{-e^{-i\left(\theta-\pi\right)}}{x-e^{-i\left(\theta-\pi\right)}}\right)\mathrm{d}x\\
=&\lim_{R\rightarrow\infty}\int_0^R\left(-\frac{e^{i\left(\theta-\pi\right)}}{x-e^{i\left(\theta-\pi\right)}}+\frac{e^{i\left(\theta-\pi\right)}}{x+e^{i\left(\theta-\pi\right)}}-\frac{e^{-i\left(\theta-\pi\right)}}{x-e^{-i\left(\theta-\pi\right)}}+\frac{e^{-i\left(\theta-\pi\right)}}{x+e^{-i\left(\theta-\pi\right)}}\right)\mathrm{d}x\\
=&2\pi\sin\left(\theta-\pi\right)\\
=&-2\pi\sin\theta\\
=&2\pi\left|\sin\theta\right|
\end{align*}
$\displaystyle\left(\mathrm{iii}\right)\exists m\in\Z\ \mathrm{s.t.}\ \theta=m\pi$のとき
$\displaystyle\forall x\in\left]0,\infty\right[,\ \ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)=\ln\left(1-\frac{2}{x^2}+\frac{1}{x^4}\right)=\ln\left(1-\frac{1}{x^2}\right)^2=\ln\left(\frac{x^2-1}{x^2}\right)^2=\ln\left(\frac{\left(x-1\right)\left(x+1\right)}{x^2}\right)^2=2\ln\left|x-1\right|+2\ln\left(x+1\right)-4\ln x$
であるため広義積分$\displaystyle\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x$は積分経路内に被積分関数が発散する点を含みますが,
\begin{align*}
&\int_0^1\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x\\
=&\int_0^1\left(2\ln\left|x-1\right|+2\ln\left(x+1\right)-4\ln x\right)\mathrm{d}x\\
=&\int_0^1\left(2\ln\left(1-x\right)+2\ln\left(x+1\right)-4\ln x\right)\mathrm{d}x\\
=&\left[-2\left(1-x\right)\left(\ln\left(1-x\right)-1\right)+2\left(x+1\right)\left(\ln\left(x+1\right)-1\right)-4x\left(\ln x-1\right)\right]_{x=0}^1\\
=&\left(-2\lim_{\varepsilon\rightarrow+0}\varepsilon\left(\ln\varepsilon-1\right)+2\cdot2\left(\ln2-1\right)-4\cdot1\left(\ln1-1\right)\right)-\left(-2\cdot1\left(\ln1-1\right)+2\cdot1\left(\ln1-1\right)-4\lim_{\varepsilon\rightarrow+0}\varepsilon\left(\ln\varepsilon-1\right)\right)\\
=&\left(-2\lim_{\varepsilon\rightarrow+0}\left(\varepsilon\ln\varepsilon-\varepsilon\right)+4\left(\ln2-1\right)+4\right)-\left(2-2-4\lim_{\varepsilon\rightarrow+0}\left(\varepsilon\ln\varepsilon-\varepsilon\right)\right)\\
=&\left(-2\left(0-0\right)+4\ln2\right)-\left(-4\left(0-0\right)\right)\\
=&4\ln2
\end{align*}
であり,
\begin{align*}
&\int_1^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x\\
=&\int_1^\infty\left(2\ln\left|x-1\right|+2\ln\left(x+1\right)-4\ln x\right)\mathrm{d}x\\
=&\int_1^\infty\left(2\ln\left(1-x\right)+2\ln\left(x+1\right)-4\ln x\right)\mathrm{d}x\\
=&\left[2\left(x-1\right)\left(\ln\left(x-1\right)-1\right)+2\left(x+1\right)\left(\ln\left(x+1\right)-1\right)-4x\left(\ln x-1\right)\right]_{x=1}^\infty\\
=&\lim_{R\rightarrow\infty}\left(2\left(R-1\right)\left(\ln\left(R-1\right)-1\right)+2\left(R+1\right)\left(\ln\left(R+1\right)-1\right)-4R\left(\ln R-1\right)\right)-\left(-2\lim_{\varepsilon\rightarrow+0}\varepsilon\left(\ln\varepsilon-1\right)+2\cdot2\left(\ln2-1\right)-4\cdot1\left(\ln1-1\right)\right)\\
=&\lim_{R\rightarrow\infty}\left(2R\ln\left(1-\frac{1}{R^2}\right)+2\ln\frac{R+1}{R-1}\right)-\left(-2\lim_{\varepsilon\rightarrow+0}\left(\varepsilon\ln\varepsilon-\varepsilon\right)+4\left(\ln2-1\right)+4\right)\\
=&\lim_{R\rightarrow\infty}\left(-2\frac{1}{R}+O\left(\frac{1}{R^3}\right)+2\ln\frac{R+1}{R-1}\right)-\left(-2\left(0-0\right)+4\ln2\right)\\
=&\left(-2\cdot0+0+2\ln1\right)-4\ln2\\
=&-4\ln2
\end{align*}
であるため広義積分$\displaystyle\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x$は収束し,
$\displaystyle\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x=\int_0^1\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x+\int_1^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x=4\ln2+\left(-4\ln2\right)=0=2\pi\left|\sin\theta\right|$
です.
以上$\left(\mathrm{i}\right)$,$\left(\mathrm{ii}\right)$,$\left(\mathrm{iii}\right)$より,$\displaystyle\int_0^\infty\ln\left(1-2\frac{\cos2\theta}{x^2}+\frac{1}{x^4}\right)\mathrm{d}x=2\pi\left|\sin\theta\right|$です.$\blacksquare$