14

$$ I:=\int_0^{\infty} \frac{\ln \cos^2 x}{x^2}\text{d}x=-\pi. $$ Using $2\cos^2 x=1+\cos 2x$ failed me because I ran into two divergent integrals after using $\ln(ab)=\ln a + \ln b$ since I obtained $\int_0^\infty x^{-2}\text{d}x$ and $\int_0^\infty (1+\cos^2 x)\text{d}x $ which both diverge. Perhaps we should try a complex analysis approach? I also tried writing $$ I(\alpha)=\int_0^\infty \frac{\ln \cos^2 \alpha \,x}{x^2}\text{d}x $$ and obtained $$ -\frac{dI(\alpha)}{d\alpha}=2\int_0^\infty \frac{\tan \alpha x}{x}\text{d}x=\int_{-\infty}^\infty\frac{\tan \alpha x}{x}\text{d}x. $$ Taking a second derivative $$ I''(\alpha)=\int_{-\infty}^\infty {\sec^2 (\alpha x)}\, \text{d}x $$ Random Variable pointed out how to continue from the integral after the 1st derivative, but is it possible to work with this integral $\sec^2 \alpha x$? Thanks

Falrach
  • 4,102
Jeff Faraci
  • 9,878
  • Where did you get the $-\pi$ from? – Jika Apr 30 '14 at 15:10
  • 1
    @Jika THat is the closed form result..... – Jeff Faraci Apr 30 '14 at 15:11
  • I know but from where? I tried with Mathematica but I did not get the result. – Jika Apr 30 '14 at 15:16
  • @Jika NIntegrate[Log[Cos[x]^2]/x^2, {x, 0, Infinity}] NIntegrate obtained -3.13331 and 0.00860742 for the integral and
    error estimates. As you can see Mathematica has trouble computing it but it gives its exact within its error bound. But this is in many Integral Tables book. One example is Gradshteyn and Ryzhik
    – Jeff Faraci Apr 30 '14 at 15:27
  • Thanks. I tried to do it using integrate by parts by I think it is a wrong approach here. – Jika Apr 30 '14 at 15:44
  • @Jika No problem. Yes I have tried a few things but keep getting stuck too. – Jeff Faraci Apr 30 '14 at 16:18
  • 3
    Extend the interval of integration to the entire real line and then consider the Cauchy principal value of the integral. Then since $\text{PV} \int_{-\infty}^{\infty} \frac{\tan ax}{x} \ dx= \pi \ (a >0)$, your second approach gives you the answer fairly quickly. – Random Variable Apr 30 '14 at 17:27
  • @RandomVariable That is very helpful thank you! But how do you show the principle value of $\int_{-\infty}^\infty \frac{\tan(\alpha x)}{x} dx=\pi?$ – Jeff Faraci Apr 30 '14 at 17:31
  • 1
    For what it's worth, I get the answer is $\pi(1-\sqrt{2})$. I'll check again my calculation, but not now. I have to sleep since it's already morning here. :) – Tunk-Fey Apr 30 '14 at 21:42
  • 1
    @Tunk-Fey Thank you. Goodnight – Jeff Faraci Apr 30 '14 at 21:45

4 Answers4

26

Let the desired integral be denoted by $I$. Note that $$\eqalign{ 2I&=\int_{-\infty}^\infty\frac{\ln(\cos^2x)}{x^2}dx= \sum_{n=-\infty}^{+\infty}\left(\int_{n\pi}^{(n+1)\pi}\frac{\ln(\cos^2x)}{x^2}dx\right)\cr &=\sum_{n=-\infty}^{+\infty}\left(\int_{0}^{\pi}\frac{\ln(\cos^2x)}{(x+n\pi)^2}dx\right) \cr &=\int_{0}^{\pi}\left(\sum_{n=-\infty}^{+\infty} \frac{1}{(x+n\pi)^2}\right)\ln(\cos^2x)dx \cr &=\int_{0}^{\pi}\frac{\ln(\cos^2x)}{\sin^2x}dx \cr } $$ where the interchange of the signs of integration and summation is justified by the fact that the integrands are all negative, and we used the well-known expansion: $$ \sum_{n=-\infty}^{+\infty} \frac{1}{(x+n\pi)^2}=\frac{1}{\sin^2x}.\tag{1} $$ Now using the symmetry of the integrand arround the line $x=\pi/2$, we conclude that $$\eqalign{ I&=\int_{0}^{\pi/2}\frac{\ln(\cos^2x)}{\sin^2x}dx\cr &=\Big[-\cot(x)\ln(\cos^2x)\Big]_{0}^{\pi/2}+\int_0^{\pi/2}\cot(x)\frac{-2\cos x\sin x}{\cos^2x}dx\cr &=0-2\int_0^{\pi/2}dx=-\pi. } $$ and the announced conclusion follows.$\qquad\square$

Remark: Here is a proof of $(1)$ that does not use residue theorem. Consider $\alpha\in(0,1)$, and let $f_\alpha$ be the $2\pi$-periodic function that coincides with $x\mapsto e^{i\alpha x}$ on the interval $(-\pi,\pi)$. It is easy to check that the exponential Fourier coefficients of $f_\alpha$ are given by $$ C_n(f_\alpha)=\frac{1}{2\pi}\int_{-\pi}^{\pi}f_\alpha(x)e^{-inx}dx=\sin(\alpha\pi)\frac{(-1)^n}{\alpha \pi-n\pi} $$ So, by Parseval's formula we have $$ \sum_{n\in\Bbb{Z}}\vert C_n(f_\alpha)\vert^2=\frac{1}{2\pi}\int_{-\pi}^\pi\vert f_\alpha(x)\vert^2dx $$ That is $$ \sin^2(\pi\alpha) \sum_{n\in\Bbb{Z}}\frac{1}{(\alpha\pi-n\pi)^2}=1 $$ and we get $(1)$ by setting $x=\alpha\pi\in(0,\pi)$.

Felix Klein
  • 1,871
Omran Kouba
  • 28,772
6

There is a wonderful solution: By Lobachevsky Integral Formula:If f(x) meet $$f(x\pm\pi)=f(x)$$ then $$\int_0^\infty f(x)\cdot\Big(\frac{\sin x}{x}\Big)^2dx=\int_0^\frac{\pi}{2}f(x)dx$$ So back to this problem. $$I=\int_0^\infty\frac{\ln^2\cos x}{x^2}dx=\int_0^\infty\frac{\ln^2\cos x}{\sin^2x}\cdot\Big(\frac{\sin x}{x}\Big)^2dx=\int_0^\frac{\pi}{2}\frac{\ln^2\cos x}{\sin^2x}dx$$ $$=2\int_0^\frac{\pi}{2}\ln\cos xd\cot x=2\Big(\cot x\ln\cos x\Big|_0^\frac{\pi}{2}-\int_0^\frac{\pi}{2}\cot x\cdot\tan xdx\Big)$$ Notice $$\lim_{x\to\frac{\pi}{2}}\cot x\ln\cos x=\lim_{x\to\frac{\pi}{2}}\frac{\cos x\ln\cos x}{\sin x}=0$$ and $$\lim_{x\to0}\cot x\ln\cos x=\lim_{x\to0}\frac{\cos x\ln(1-2\sin^2\frac{x}{2})}{\sin x}=\lim_{x\to0}\frac{\cos x(-2\sin^2\frac{x}{2})}{x}=0$$ so $$I=-2\int_0^\frac{\pi}{2}\cot x\cdot \tan xdx=-2\int_0^\frac{\pi}{2}dx=-\pi$$

2

Complete the steps for the method attempted in the original problem.

$$I(\alpha)=\int_0^\infty \frac{\ln(\cos^2(\alpha x))}{x^2} dx$$ $$\frac{d}{d\alpha}I(\alpha)=-2\int_0^\infty \frac{\tan(\alpha x)}{x}dx$$

Subsitution: $t=\alpha x$

$$\frac{d}{d\alpha}I(\alpha)=-2\int_{0}^\infty \frac{\tan(t)}{t}dt=-\int_{-\infty}^\infty \frac{\tan(t)}{t}dt=-\sum_{n=-\infty}^\infty \int_{-\frac{\pi}{2}+n\pi}^{\frac{\pi}{2}+n\pi} \frac{\tan(t)}{t}dt$$

Substitution: $z=t-n\pi$ and note that, $\tan(z+n\pi)=\tan(z)$

$$\frac{d}{d\alpha}I(\alpha)=-\sum_{n=-\infty}^\infty \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\tan(z)}{n\pi+z}dz=-\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sum_{n=-\infty}^\infty \frac{\tan(z)}{n\pi+z}dz=-\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \tan(z)\sum_{n=-\infty}^\infty \frac{1}{n\pi+z}dz$$

Note, $$\sum_{n=-\infty}^\infty \frac{1}{n\pi+z}=\cot(z)$$

So we have,

$$\frac{d}{d\alpha}I(\alpha)=-\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \tan(z)\cot(z)dz=-\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} 1dz=-\pi$$

Integrate on $\alpha$, and use initial condition, $I(0)=0$

$$I(\alpha)=-\pi\alpha+C, ~~~C=0$$

Final answer:

$$\int_0^\infty \frac{\ln(\cos^2(x))}{x^2} dx=I(1)=-\pi$$

MathFail
  • 21,128
0

By Lobachevsky Integral Formula, we have $$ \begin{aligned} & I=\int_0^{\infty} \frac{\ln \left(\cos ^2 x\right)}{\sin ^2 x} d x \\ & =\int_0^{\infty} \ln \left(\cos ^2 x\right) d(\cot x) \\ & =\int_0^{\infty} \ln \left(\frac{u^2}{1+u^2}\right) d u \text {, where } u=\cot x \\ & =\left[u \ln \left(\frac{u^2}{u^2+1}\right)\right]_0^{\infty}-\int_0^{\infty} u \cdot \frac{2}{u\left(1+u^2\right)} d u \\ & =-2\left[\tan ^{-1} u\right]_0^{\infty}\\&=-\pi \\ & \end{aligned} $$

EDIT: fixed typo $d x$ to $d u$ during the step $u=\cot x $.

MathArt
  • 1,053
Lai
  • 20,421