Alright, here is the first part of the solution to ##I = \int_0^{\pi/2} \cos^{-1}\left(\frac{\cos(x)}{1+2\cos(x)}\right)dx##. I will give people the chance to complete the solution. I will post the second half on monday.
Fist, notice that the double-angle formula from trigonometry say that for any ##\theta##, we have ##\cos(2\theta) = 2\cos^2(\theta)-1##. Call this ##(*)##.
If we write ##u=\cos(\theta)## - and so ##\theta = \cos^{-1}(u)## - then ##(*)## says that ##\cos(2\theta) = 2u^2 - 1##, from which immediately follows that
\cos^{-1}(2 u ^2 - 1) = \cos^{-1}(\cos(2\theta)) = 2\theta = 2\cos^{-1}(u)
So, since ##u## is simply an arbitrary variable, we can write
\cos^{-1}(2\theta^2 - 1) = 2\cos^{-1}(\theta)
Next, we write ##\alpha = 2\theta^2 - 1##, which means that ##\theta = \sqrt{\frac{1+\alpha}{2}}##. It follows that
\cos^{-1}(\alpha) = 2\cos^{-1}\left(\sqrt{\frac{1+\alpha}{2}}\right)
We write ##\alpha = \frac{\cos(x)}{1+2\cos(x)}##, to get
\cos^{-1}\left(\frac{\cos(x)}{1 + 2\cos(x)}\right) = 2\cos^{-1}\left(\sqrt{ \frac{1 + \frac{\cos(x)}{1 + 2\cos(x)}}{2}}\right) = 2\cos^{-1}\left(\sqrt{\frac{1 + 3\cos(x)}{2 + 4\cos(x)}}\right).
Applying the Pythagorean theorem to a right triangle with acute angle whose cosine is ##\sqrt{\frac{1 + 3\cos(x)}{2 + 4\cos(x)}}##, yu'll see that the tangent of that same angle is ##\sqrt{\frac{1 + \cos(x)}{1 + 3\cos(x)}}##. Thus
\cos^{-1}\left(\frac{\cos(x)}{1 + 2\cos(x)}\right) = 2\tan^{-1}\left(\sqrt{\frac{1+\cos(x)}{1 + 3\cos(x)}}\right)
And so we have
I = 2\int_0^{\pi/2} \tan^{-1}\left(\sqrt{\frac{1 + \cos(x)}{1 + 3\cos(x)}}\right)dx
Make the chance of variable ##x = 2y##, so ##dx = 2dy##, to get
I = 4\int_0^{\pi/4} \tan^{-1}\left(\sqrt{\frac{1 + \cos(2y)}{1 + 3 \cos(2y)}}\right)dy
Using ##(*)## again, we can find
\sqrt{\frac{1 + \cos(2y)}{1 + 3\cos(2y)}} = \frac{\cos(y)}{\sqrt{2 - 3\sin^2(y)}}
And so
I = 4\int_0^{\pi/4} \tan^{-1}\left(\frac{\cos(y)}{\sqrt{2 - 3\sin^2(y)}} \right)dy
Notice that
\int_0^1 \frac{1}{1 + \left(\frac{\cos^2(y)}{2 - 3\sin^2(y)}\right)t^2}dt
is of the form
\int_0^1 \frac{1}{1 + b^2t^2}dt = \frac{1}{b^2}\int_0^1 \frac{1}{\frac{1}{b^2} + t^2}dt = \frac{1}{b^2} [b\tan^{-1}(bt)]_0^1 = \frac{1}{b} \tan^{-1}(b),
where ## b = \frac{\cos(y)}{\sqrt{2 - 3\sin^2(y)}}##.
Thus
\int_0^1 \frac{1}{1 + \left(\frac{\cos^2(y)}{2 - 3\sin^2(y)}\right)t^2 } dt = \frac{\sqrt{2 - 3\sin^2(y)}}{\cos(y)} = \tan^{-1}\left(\frac{\cos(y)}{\sqrt{2 - 3\sin^2(y)}}\right)
That is,
<br />
\begin{eqnarray*}<br />
I & = & 4\int_0^{\pi/4} \frac{\cos(y)}{\sqrt{ 2 - 3\sin^2(y)}} \left(\int_0^1 \frac{1}{1 + \left(\frac{\cos^2(y)}{2 - 3\sin^2(y)}\right)t^2}\right)dy\\<br />
& = & \int_0^{\pi/4} \int_0^1 \frac{4\cos(y)(2 - 3\sin^2(y))}{\sqrt{2 - 3\sin^2(y)}(2 - 3\sin^2(y) + t^2\cos^2(y))}dt dy\\<br />
& = & \int_0^{\pi/4} \int_0^1 \frac{4\cos(y)\sqrt{ 2 - 3\sin^2(y)}}{2 - 3\sin^2(y) + t^2 - t^2\sin^2(y)}dt dy\\<br />
& = & \int_0^{\pi/4} \int_0^1 \frac{4\cos(y) \sqrt{2 - 3\sin^2(y)} }{(t^2 + 2) - (t^2 + 3)\sin^2(y)}dt dy<br />
\end{eqnarray*}<br />
Next, we change the variables ##\sin(y) = \sqrt{\frac{2}{3}} \sin(w)##, and so ##dy = \sqrt{\frac{2}{3}} \frac{\cos(w)}{\cos(y)}dw##. We have ##w=0## when ##y=0##, and when ##y = \pi/4##, we have ##\sin(\pi/4) = \frac{1}{\sqrt{2}}##. And so ##\sin(w) = \sqrt{\frac{3}{2}}\frac{1}{\sqrt{2}} = \frac{\sqrt{3}}{2}##, which says ##w = \pi/3##. So
<br />
\begin{eqnarray*}<br />
I<br />
& = & \int_0^{\pi/3} \int_0^1 \frac{4\cos(y) \sqrt{2 - 3\frac{2}{3}\sin^2(w)}}{(t^2 + 2) - (t^2 + 3) \frac{2}{3} \sin^2(w)}dt \frac{\cos(w)}{\cos(y)} dw \sqrt{\frac{2}{3}}\\<br />
& = & \int_0^{\pi/3} \int_0^1 \frac{4 \sqrt{2 - 2( 1 - \cos^2(w))}}{(t^2 + 2) - (t^2 + 3) \frac{2}{3} ( 1 - \cos^2(w))} dt \cos(w) dw \sqrt{\frac{2}{3}}\\<br />
& = & \int_0^{\pi/3} \int_0^1\frac{4 \sqrt{2} \cos(w) \sqrt{2} \cos(w) }{(t^2 + 2) - (t^2 + 3) \frac{2}{3} ( 1 - \cos^2(w)} dt \frac{1}{\sqrt{3}} dw\\<br />
& = & \int_0^{\pi/3} \int_0^1 \frac{8\sqrt{3}\cos^2(w)}{t^2 + (2t^2 + 6)cos^2(w)} dt dw<br />
\end{eqnarray*}<br />
Our next step is another change of variable to ##s = \tan(w)##. Thus as ##\tan(w) = \frac{\sin(w)}{\cos(w)}##, we have
\frac{ds}{dw} = \frac{1}{\cos^2(w)}
and so ##dw = \cos^2(w) ds##. Since
1 + s^2 = 1 + \tan^2(w) = \frac{1}{\cos^2(w)}
we have
\frac{1}{1 + s^2} = \cos^2(w)
and so
dw = \frac{ds}{ 1+ s^2}
Therefore, since ##s=0## when ##w=0## and ##s= \sqrt{3}##, when ##w = \pi/3##, we have
<br />
\begin{eqnarray*}<br />
I<br />
& = & \int_0^{\sqrt{3}} \int_0^1 \frac{8\sqrt{3} \frac{1}{1 + s^2}}{t^2 + (2t^2 + 6) \frac{1}{1 + s^2}} dt \frac{ds}{1 + s^2}\\<br />
& = & \int_0^{\sqrt{3}} \int_0^1 \frac{8\sqrt{3}}{t^2(1 + s^2)^2 + (2t^2 + 6)(1 + s^2)} dt ds\\<br />
& = & \int_0^{\sqrt{3}} \int_0^1 \frac{8\sqrt{3}}{(1 + s^2)(t^2s^2 + 3t^2 + 6)} dt ds<br />
\end{eqnarray*}<br />
Let's make a partial fraction expansion:
\frac{1}{(1+ s^2)(t^2 s^2 + 3t^2 + 6)} = \frac{A}{1+s^2} + \frac{B}{t^2 s^2 + 3t^2 + 6}
where it is easy to confirm that
A = \frac{1}{2t^2 + 6}~~\text{and}~~ B = - \frac{t^2}{2t^2 + 6}
and so
<br />
\begin{eqnarray*}<br />
I<br />
& = & \int_0^{\sqrt{3}} \int_0^1 8\sqrt{3} \left(\frac{\frac{1}{2t^2 + 6}}{1 + s^2} - \frac{\frac{t^2}{2t^2 + 6}}{t^2 + 3t^2 + 6}\right)dt ds\\<br />
& = & \int_0^1 \frac{4\sqrt{3}}{t^2 + 3}\left(\int_0^{\sqrt{3}} \frac{ds}{1+s^2} - \int_0^{\sqrt{3}} \frac{ds}{s^2 + 3 + \frac{6}{t^2}}\right) dt<br />
\end{eqnarray*}<br />
The first inner intergral on the right is easy:
[\tan^{-1}(s)]_0^{\sqrt{3}} = \tan^{-1}(\sqrt{3}) = \frac{\pi}{3}
The second inner integral is almost as easy and equals
<br />
\begin{eqnarray*}<br />
\int_0^{\sqrt{3}} \frac{ds}{s^2 + \left(\sqrt{3 + \frac{6}{t^2}}\right)^2}<br />
& = & \frac{1}{\sqrt{3 + \frac{6}{t^2}}} \left. \left(\tan^{-1}\left(\frac{s}{\sqrt{3 + \frac{6}{t^2}}}\right)\right)\right|_0^{\sqrt{3}}\\<br />
& = & \frac{t}{\sqrt{3}\sqrt{t^2 + 2}} \tan^{-1}\left.\left(\frac{st}{\sqrt{3}\sqrt{t^2 + 2}}\right)\right|_0^{\sqrt{3}}\\<br />
& = & \frac{t}{\sqrt{3}\sqrt{t^2 + 2}} \tan^{-1}\left(\frac{t}{\sqrt{t^2 + 2}}\right)<br />
\end{eqnarray*}<br />
Thus
<br />
\begin{eqnarray*}<br />
I<br />
& = & \int_0^1 \frac{4\sqrt{3}}{t^2 + 3}\left(\frac{\pi}{3} - \frac{t}{\sqrt{3}\sqrt{t^2 + 2}} \tan^{-1}\left(\frac{t}{\sqrt{t^2 + 2}}\right)\right)dt\\<br />
& = & \frac{4\sqrt{3}\pi}{3}\int_0^1 \frac{dt}{t^2 + (\sqrt{3})^2} - 4\int_0^1 \frac{t}{(t^2 + 3)\sqrt{t^2 + 2}} \tan^{-1}\left(\frac{t}{\sqrt{t^2 + 2}}\right) dt\\<br />
& = & \frac{4\sqrt{3}\pi}{3}\left.\left(\frac{1}{\sqrt{3}} \tan^{-1}\left(\frac{t}{\sqrt{3}}\right)\right)\right|_0^1 - 4\int_0^1 \frac{t}{(t^2 + 3)\sqrt{t^2 + 2}} \tan^{-1}\left(\frac{t}{\sqrt{t^2 + 2}}\right) dt<br />
\end{eqnarray*}<br />
Since
\frac{4\sqrt{3}\pi}{3}\left.\left(\frac{1}{\sqrt{3}} \tan^{-1}\left(\frac{t}{\sqrt{3}}\right)\right)\right|_0^1 = \frac{4\pi}{3}\tan^{-1}\left(\frac{1}{\sqrt{3}}\right) = \frac{2\pi^2}{9}
we have
I = \frac{2\pi^2}{9} - 4\int_0^1 \frac{t}{(t^2 + 3)\sqrt{t^2 + 2}} \tan^{-1}\left(\frac{t}{\sqrt{t^2 + 2}}\right) dt
We can do this by parts, let
u = \tan^{-1}\left(\frac{t}{\sqrt{t^2 + 2}}\right)
and
dv = \frac{t}{(t^2 + 3)\sqrt{t^2 + 2}} dt
Then
\frac{du}{dt} = \frac{1}{(t^2 + 1)\sqrt{t^2 + 2}}
and you can verify that
v = \tan^{-1}(\sqrt{t^2 + 2})
by simply sifferentiating this ##v## and observing we get the above ##dv## back. So, plugging all this into the integration by parts formula, we have
<br />
\begin{eqnarray*}<br />
I<br />
& = & \frac{2\pi^2}{9} - 4\left(\left.\left(\tan^{-1}\left(\frac{1}{\sqrt{t^2 + 2}}\right)\tan^{-1}(\sqrt{t^2 + 2})\right)\right|_0^1 - \int_0^1 \frac{\tan^{-1}(\sqrt{t^2 + 2})}{(t^2 + 1)\sqrt{t^2 + 2}}dt\right)\\<br />
& = & \frac{2\pi^2}{9} - 4\left(\tan^{-1}\left(\frac{1}{\sqrt{3}}\right)\tan^{-1}(\sqrt{3}) - \int_0^1 \frac{\tan^{-1}(\sqrt{t^2 + 2})}{(t^2 + 1)\sqrt{t^2 + 2}}dt\right)\\<br />
& = & \frac{2\pi^2}{9} - 4\left(\frac{\pi}{6}\frac{\pi}{3} - \int_0^1 \frac{\tan^{-1}(\sqrt{t^2 + 2})}{(t^2 + 1)\sqrt{t^2 + 2}}dt\right)\\<br />
& = & \frac{2\pi^2}{9} - \frac{2\pi^2}{9} + 4\int_0^1 \frac{\tan^{-1}(\sqrt{t^2 + 2})}{(t^2 + 1)\sqrt{t^2 + 2}}dt<br />
\end{eqnarray*}<br />
And so
I = 4\int_0^1 \frac{\tan^{-1}(\sqrt{t^2 + 2})}{(t^2 + 1)\sqrt{t^2 + 2}}dt
This is the first part. I leave the second part up to you. I will post the solution monday unless somebody doesn't want me to