<s>[INST] Proving $\int_0^\infty \log\left (1-2\frac{\cos 2\theta}{x^2}+\frac{1}{x^4} \right)dx =2\pi \sin \theta$ 
Prove $$\int_0^\infty \log \left(1-2\frac{\cos 2\theta}{x^2}+\frac{1}{x^4} \right)dx =2\pi \sin \theta$$where $\theta\in[0,\pi]$.

I've met another similar problem,
$$ \int_0^{2\pi} \log(1-2r\cos \theta +r^2) d\theta=2\pi \log^+(r^2) $$
I am curious whether there is any relationship between them.
And I got stuck on the proposition in the title. I found that
$$1-2\frac{\cos 2\theta}{x^2}+\frac{1}{x^4} =\left(\frac{1}{x}-e^{i\theta}\right)\left(\frac{1}{x}+e^{i\theta}\right)\left(\frac{1}{x}-e^{-i\theta}\right)\left(\frac{1}{x}+e^{-i\theta}\right)$$
But I couldn't move on.
Any hints? Thanks in advance.
 [/INST] Assume that $\theta \in (0, \pi).$
Then
$$\begin{align}\int_{0}^{\infty} \log \left(1 -\frac{2 \cos (2\theta)}{x^{2}} +\frac{1}{x^{4}} \right) \, \mathrm dx &= \int_{0}^{\infty} \frac{ \log \left(1- 2 \cos(2 \theta) u^{2} +u^{4}\right)}{u^{2}} \, \mathrm du \\ &= 2\, \Re \int_{0}^{\infty} \frac{ \log \left( 1-u^{2}e^{2 i \theta} \right)}{u^{2}} \, \mathrm du \\ &= -4 \, \Re \int_{0}^{\infty} \frac{e^{2 i \theta}}{1-u^{2}e^{2i \theta}} \, \mathrm du \tag{1}\\ &= -4 \, \Re \left(  e^{i \theta} \operatorname{artanh} \left(ue^{i \theta} \right) \Big|_{0}^{\infty} \right) \\ &=-4 \, \Re \left(e^{i \theta} \, \frac{i \pi}{2} \right) \tag{2} \\ &= 2 \pi \sin(\theta). \end{align}$$

$(1)$ Integrate by parts.
$(2)$ If $ \theta \in (0, \pi )$, then $$\lim_{u \to +\infty} \operatorname{artanh}(ue^{i \theta})=\lim_{u \to +\infty}\frac{1}{2} \, \log \left( \frac{1 +ue^{i \theta}}{1-ue^{i \theta}} \right)   =  \lim_{u \to +\infty}\frac{1}{2} \, \log \left( \frac{\frac{1}{u} +e^{i \theta}}{\frac{1}{u}-e^{i \theta}} \right)  = \frac{i\pi}{2}$$ because the expression inside the $\log$ is approaching $-1$ from above the branch cut.
</s>