# Evaluate $\int_0^{\pi/2} \frac{\arctan{\left(\frac{2\sin{x}}{2\cos{x}-1}\right)}\sin{\left(\frac{x}{2}\right)}}{\sqrt{\cos{x}}} \, \mathrm{d}x$

Evaluate: $$\int_0^{\frac{\pi}{2}} \frac{\arctan{\left(\frac{2\sin{x}}{2\cos{x}-1}\right)}\sin{\left(\frac{x}{2}\right)}}{\sqrt{\cos{x}}} \, \mathrm{d}x$$

I believe there is a "nice" closed form solution but Wolfram is too weak. These arctan integrals are so tricky! I sense a substitution like $$\sin{\frac{x}{2}}$$ because of arctan argument and $$\sqrt{\cos{x}}$$ but I just cant get it. Any ideas or tips please.

Source: https://tieba.baidu.com/p/4794735082 (Exercise 3.1.22).

• Why do you believe there is a "nice" closed-form solution for this integral? – an4s Aug 3 at 14:28
• @an4s It's from a website and almost all other integral there have a "nice" closed form. It might not be elementary like it could involve dilogarithm, zeta function, maybe hypergeometric – user801111 Aug 3 at 14:36
• Care to share this website that you're referring to? – GohP.iHan Aug 3 at 15:09
• Are you sure that the denominator of the argument of the arctangent function is correct? – Mark Viola Aug 3 at 15:18
• @GohP.iHan tieba.baidu.com/p/4794735082 – user801111 Aug 3 at 16:20

$$\boxed{I=\int_0^\frac{\pi}{2}\arctan\left(\frac{2\sin x}{2\cos x -1}\right)\frac{\sin\left(\frac{x}{2}\right)}{\sqrt{\cos x}}dx=\sqrt 2 \pi \ln\varphi-\frac{\pi}{\sqrt 2}\ln(2+\sqrt 3),\ \varphi =\frac{1+\sqrt 5}{2}}$$ To show this result, we'll do some substitutions until it's clear how to simplify that $$\arctan$$ term. $$I\ \,\overset{\cos x=t}=\frac1{\sqrt 2}\int_0^1 \arctan \left(\frac{2\sqrt{1-t^2}}{2t-1}\right)\frac{dt}{\sqrt t\sqrt{1+t}}\overset{\large t=\frac{1-x}{1+x}}=\int_0^1 \frac{\arctan\left(\frac{4\sqrt x}{1-3x}\right)}{\sqrt{1-x}(1+x)}dx$$ $$=\int_0^1\frac{\arctan (\sqrt x)+\arctan(3\sqrt x)}{\sqrt{1-x}(1+x)}dx-\int_\frac13^1\frac{\pi}{\sqrt{1-x}(1+x)}dx=\mathcal J-\frac{\pi}{\sqrt2}\ln(2+\sqrt 3)$$ The second integral appears since for $$x>\frac13$$ we have $$\sqrt x \cdot 3\sqrt x>1$$.
Now in order to show $$\mathcal J=\sqrt 2\pi\ln \varphi$$ we can differentiate under the integral sign, considering: $$\mathcal J(a)=\int_0^1\frac{\arctan(a\sqrt x)+\arctan(3\sqrt x)}{\sqrt{1-x}(1+x)}dx$$ $$\Rightarrow \mathcal J'(a)=\int_0^1 \frac{\sqrt x}{\sqrt{1-x}(1+x)(1+a^2 x)}dx\overset{\frac{1-x}{x}=t}=\int_0^\infty \frac{dt}{\sqrt t(2+t)(1+a^2+t)}$$ $$\overset{t=x^2}=\frac{2}{1-a^2}\int_0^\infty \left(\frac{1}{1+a^2+x^2}-\frac{1}{2+x^2}\right)dx=\frac{\pi}{1-a^2}\left(\frac{1}{\sqrt{1+a^2}}-\frac{1}{\sqrt 2}\right)$$ We are looking to find $$\mathcal J(1)=\mathcal J$$, but $$\mathcal J(-3)=0$$ therefore our integral is: $$\mathcal J=\int_{-3}^1 \frac{\pi}{1-a^2}\left(\frac{1}{\sqrt{1+a^2}}-\frac{1}{\sqrt 2}\right)da\overset{-a=\frac{1-x}{1+x}}=\frac{\pi}{2\sqrt 2}\int_0^2\frac{1}{x}\left(1-\frac{1-x}{\sqrt{1+x^2}}\right)dx$$ $$=\frac{\pi}{2\sqrt 2}\left(\ln\left(x+\sqrt{1+x^2}\right)+\ln\left(1+\sqrt{1+x^2}\right)\right)\bigg|_0^2=\sqrt 2 \pi \ln \varphi$$
• Amazing work! How do you think of substitutions like $\frac{1-x}{1+x}$? – user801111 Aug 4 at 13:36
• @MoQabar This is harder to answer than the integral itself. Perhaps as a start take a look here. For $\mathcal J$ I knew that the substitution will simplify stuff, as applying the substitution to $\frac{2}{1-a^2}$ produces $\frac{1}{x}$ and in the same time $\frac{1}{\sqrt{1+a^2}}$ produces a $\frac{1}{\sqrt 2}$ factor too. Also for the arctan term I just tried the substitution because I "felt" like it would simplify that fraction (and it often does so it's worth to try when having such an ugly term) - even though I wasn't totally sure. – Zacky Aug 4 at 14:28