# 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.

• Maybe you can complete a square and make a substitution afterwards. Mar 11, 2019 at 10:30
• I am not sure about a relationship between them, but both of them can be solved by similar tehniques (Feynman's trick). Mar 11, 2019 at 11:11

We start off by some $$x\rightarrow \frac{1}{x}$$ substitutions while derivating under the integral sign: $$I(\theta)=\int_0^\infty \log \left(1-2\frac{\cos 2\theta}{x^2}+\frac{1}{x^4} \right)dx\overset{x\rightarrow \frac{1}{x}}=\int_0^\infty \frac{\ln(1- 2\cos(2\theta) x^2 +x^4)}{x^2}dx$$ $$I'(\theta)=4\int_0^\infty \frac{\sin(2\theta)}{x^4-2\cos(2\theta)x^2+1}dx\overset{x\rightarrow \frac{1}{x}}=4\int_0^\infty \frac{\sin(2\theta)x^2}{x^4-2\cos(2\theta)x^2+1}dx$$ Now summing up the two integrals from above gives us: $$\Rightarrow 2I'(\theta)=4\int_0^\infty \frac{\sin(2\theta)(1+x^2)}{x^4-2\cos(2\theta)x^2+1}dx=4\int_0^\infty \frac{\sin(2\theta)\left(\frac{1}{x^2}+1\right)}{x^2+\frac{1}{x^2}-2\cos(2\theta)}dx$$ $$\Rightarrow I'(\theta)=2\int_0^\infty \frac{\sin(2\theta)\left(x-\frac{1}{x}\right)'}{\left(x-\frac{1}{x}\right)^2 +2(1-\cos(2\theta))}dx\overset{\large x- \frac{1}{x}=t}=2\int_{-\infty}^\infty \frac{\sin(2\theta)}{t^2 +4\sin^2 (\theta)}dt$$ $$=2 \frac{\sin(2\theta)}{2\sin(\theta)}\arctan\left(\frac{t}{2\sin(\theta)}\right)\bigg|_{-\infty}^\infty=2\cos(\theta) \cdot \pi$$ $$\Rightarrow I(\theta) = 2\pi \int \cos(\theta) d\theta =2\pi \sin \theta +C$$ But $$I(0)=0$$ (see J.G. answer), thus:$$I(0)=0+C\Rightarrow C=0 \Rightarrow \boxed{I(\theta)=2\pi\sin(\theta)}$$

• Nice idea! But how to deal with $I'(0)$? Mar 11, 2019 at 12:50
• Well, just plugg $\theta =0$ here: $$4\int_0^\infty \frac{\sin(2\theta)}{x^4-2\cos(2\theta)x^2+1}dx$$ Mar 11, 2019 at 13:02
• Sorry, I didn't understand. I thought if $\theta=0$, it equals to $4\int_0^\infty \frac{0}{(x^2-1)^2}dx$ , which is not integrable. Did I miss something? Mar 12, 2019 at 0:27
• Wait, why doesn't it vanish after plugging $\theta=0$? Mar 12, 2019 at 12:24
• Well, I found a method to avoid this problem. It's certain that $I'(\theta)=2\pi \cos\theta$ for $\theta \in (0,2\pi)$. Thus $I(\theta)=2 \pi \sin \theta+C$ for $\theta \in (0,2\pi)$. Considering that $I(\theta)$ is a continuous function on $[0,2\pi]$, thus $I(\theta)=2 \pi \sin \theta+C$ for $\theta \in [0,2\pi]$. Then from $I(0)=0$ we can arrive at the conclusion. I didn't understand what "plugging" means, maybe all I said is an obvious thing. Mar 15, 2019 at 8:20

For $$\theta \in [0;\pi]$$, \begin{align} J(\theta)&=\int_0^\infty \ln\left(1-\frac{2\cos(2\theta)}{x^2}+\frac{1}{x^4}\right) \,dx \end{align} Perform the change of variable $$y=\dfrac{1}{x}$$,

\begin{align} J(\theta)&=\int_0^\infty \frac{\ln\left(1-2\cos(2\theta)x^2+x^4\right)}{x^2} \,dx \end{align}

For $$a\geq -1$$, define the function $$F$$ by, \begin{align}F(a)&=\int_0^\infty \frac{\ln\left(1+2ax^2+x^4\right)}{x^2} \,dx\\ &=\left[-\frac{\ln\left(1+2ax^2+x^4\right)}{x}\right]_0^\infty+\int_0^\infty \frac{4\left(x^2+a\right)}{1+2ax^2+x^4}\,dx\\ &=\int_0^\infty \frac{4\left(x^2+a\right)}{1+2ax^2+x^4}\,dx\\ \end{align} Perform the change of variable $$y=\dfrac{1}{x}$$, \begin{align}F(a)&=\int_0^\infty \frac{4\left( \frac{1}{x^2}+a\right) }{x^2\left(1+\frac{2a}{x^2}+\frac{1}{x^4}\right) } \,dx\\ &=\int_0^\infty \frac{4\left( 1+ax^2\right) }{x^4+2ax^2+1 } \,dx\\ \end{align} Therefore, \begin{align}F(a)&=\int_0^\infty \frac{2(a+1)\left( 1+x^2\right) }{x^4+2ax^2+1 } \,dx\\ &=2(a+1)\int_0^\infty \frac{\left(1+\frac{1}{x^2}\right)}{x^2+\frac{1}{x^2}+2a } \,dx\\ &=2(a+1)\int_0^\infty \frac{\left(1+\frac{1}{x^2}\right)}{\left(x-\frac{1}{x}\right)^2+2(a+1) } \,dx\\ \end{align} Perform the change of variable $$y=x-\dfrac{1}{x}$$, \begin{align}F(a)&= 2(a+1)\int_{-\infty}^{+\infty}\frac{1}{x^2+2(a+1)}\,dx\\ &=4(a+1)\int_{0}^{+\infty}\frac{1}{x^2+2(a+1)}\,dx\\ &=\left[2\sqrt{2(a+1)}\arctan\left( \frac{x}{\sqrt{2(a+1)}} \right)\right]_0^\infty\\ &=\boxed{\pi\sqrt{2(1+a)}} \end{align}

Observe that, $$J(\theta)=F\big(-\cos(2\theta)\big)$$.

\begin{align} 2(1-\cos(2\theta))&=2(1-\cos^2(\theta)+\sin^2 (\theta))\\ &=2\times 2\sin^2 (\theta)\\ &=4\times \sin^2 (\theta)\\ \end{align} Since, for $$\theta \in [0;\pi],\sin(\theta)\geq 0$$ then $$\sqrt{2(1-\cos(2\theta))}=2\sin(\theta)$$

Therefore, \begin{align}\boxed{J(\theta)=2\pi \sin(\theta)}\end{align}

To complement Zacky's answer I'll add a proof that $$I(0)=0$$. Applying $$x\mapsto\frac{1}{x}$$ for $$x\ge 1$$ gives $$I(x)=2\int_0^\infty\ln|1-x^{-2}|dx=2\int_0^1\left[(1+\frac{1}{x^2})\ln(1-x^2)-2\ln x\right]\\=-2\int_0^1\left[(1+x^2)\sum_{n\ge 0}\frac{x^{2n}}{n+1}+2\ln x\right]dx=-2\int_0^1\left[\sum_{n\ge 0}\left(\frac{x^{2n}}{n+1}+\frac{x^{2n+2}}{n+1}\right)+2\ln x\right]dx\\=-2\left[\sum_{n\ge 0}\left(\frac{x^{2n+1}}{(n+1)(2n+1)}+\frac{x^{2n+3}}{(n+1)(2n+3)}\right)+2x\ln x-2x\right]_0^1\\=-2\left[\sum_{n\ge 0}\left(\frac{4}{(2n+1)(2n+3)}\right)-2\right],$$which vanishes by partial fractions.

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.