# How to Integrate $\int^{\pi/2}_{0} x \ln(\cos x) \sqrt{\tan x}\,dx$

Evaluate

$$\displaystyle \int^{\frac{\pi}{2}}_{0} x \ln(\cos x) \sqrt{\tan x}dx$$

Unfortunately, I have no idea on how to integrate this and thus cannot provide any inputs on my own. The only thing I noticed was that suppose we just had to find $$\int_0^{\pi/2} \ln(\sin(x))\ln(\cos(x)) dx$$ we could have written $$I(a,b)=\int_0^{\pi/2}\sin^a(x)cos^b(x)dx$$ converted this into the Beta and then the Gamma Function, taken its partial derivatives with respect to $a$ and $b$, and finally plugged in $a=b=0$ to get our answer.  I would be truly grateful if somebody could please help me solve this Integral. Many thanks!

• Well, the fact that neither $\log{(\cos x)}$ or $\tan x$ is defined for $x=\dfrac{\pi}{2}$ is a problem, isn't it? – Martigan Jun 10 '15 at 12:14
• @Martigan: no, it isn't. – Jack D'Aurizio Jun 10 '15 at 12:18
• Sir, but since they are point discontinuities (I'm not sure about this), do they matter? It's just that @RolfHoyer Sir had told me that point discontinuities do not matter since the contribution of a point to an integral is 0. – Ishan Jun 10 '15 at 12:22
• Few ideas: 1) complex contour integration maybe; 2) $\ln(\cos x)$ is an integral of a tangent, so integration by parts could actually help. Or a $\tan$-related substitution at least. – orion Jun 10 '15 at 12:25
• you may find some ideas here: math.stackexchange.com/questions/1164183/… – tired Jun 10 '15 at 12:34

We may compute the Fourier series of $\sqrt{\left|\tan\frac{x}{2}\right|}$ and $\log\cos\frac{x}{2}$ over $I=(-\pi,\pi)$, for first.

We have: $$\frac{1}{\pi}\int_{0}^{\pi}\sqrt{\left|\tan\frac{x}{2}\right|}\,dx = \sqrt{2},$$ $$\frac{1}{\pi}\int_{-\pi}^{\pi}\cos(2mx)\sqrt{\left|\tan\frac{x}{2}\right|}\,dx=-\frac{1}{\pi}\int_{-\pi}^{\pi}\cos((2m+1)x)\sqrt{\left|\tan\frac{x}{2}\right|}\,dx=\frac{\sqrt{2}}{4^n}\binom{2m}{m}$$ from which:

$$\sqrt{\left|\tan\frac{x}{2}\right|} = \sum_{m\geq 0}\frac{\sqrt{2}}{4^m}\binom{2m}{m}\left[\cos(2mx)-\cos((2m+1)x)\right]\tag{1}$$

follows. On the other hand: $$\frac{1}{2\pi}\int_{-\pi}^{\pi}\log\cos\frac{x}{2}\,dx = -\log 2,$$ $$\frac{1}{\pi}\int_{-\pi}^{\pi}\log\left(\cos\frac{x}{2}\right)\cos(mx)\,dx = \frac{(-1)^{m+1}}{m},$$ hence:

$$\log\cos\frac{x}{2}=-\log 2-\sum_{m=1}^{+\infty}\frac{(-1)^{m}}{m}\cos(mx)\tag{2}$$

so by using

$$\int_{0}^{\pi} x\cos(nx)\cos(mx)\,dx = \frac{(-1)^{m+n}-1}{2}\left(\frac{1}{(m-n)^2}+\frac{1}{(m+n)^2}\right),\tag{3}$$ $$\int_{0}^{\pi} x\cos^2(nx)\,dx = \frac{\pi^2}{4}\tag{4}$$

we get that our integral equals a rather complicated series.

Update: I managed to prove, through differentiation under the integral sign and the residue theorem, that our integral depends only on the values of $\psi(z)$ and $\psi'(z)$ at $z=\frac{1}{4}$ (see this related question). Both values are not too difficult to compute, and $\psi'\left(\frac{1}{4}\right)=\pi^2+8K$ where $K$ is the Catalan constant.

• It's Nice idea,+1,find the last series is not hard,@Jack. – math110 Jun 10 '15 at 13:15
• @math110 Did you really upvote Jack's answer? The score is still 0 the moment I make this comment – Venus Jun 10 '15 at 15:26
• @Jack Sir, thanks very, very much for your help. – Ishan Jun 10 '15 at 18:02

$$I=-\frac{\pi}{8}\sqrt{2}({\pi}\ln2+4G+\frac{\pi^2}{3}+3\ln^22)$$ Where G is Catalan's constant.

• is this a mathematica result? – tired Jun 10 '15 at 14:00
• True, but where is the proof, or a sketch of it? – Jack D'Aurizio Jun 10 '15 at 15:27