Integration – Evaluating Integral of arctan(1+cos x) from 0 to ?

definite integralsintegration

$\newcommand{\d}{\,\mathrm{d}}\newcommand{\arccot}{\operatorname{arccot}}$I recently took part in a UK university integration bee (which is over, so, there is no issue posting about it). My team did pretty well but of course there were a few we didn't get; I find this one interesting in particular.

$$J:=\int_0^\pi\arctan(1+\cos x)\d x=\pi\arccot(\sqrt{\phi})$$Where appears the golden ratio.

(well, we don't actually know what the real answer is but according to numerical reverse engineering software it checks out to $\pi\arccot(\sqrt{\phi})$ and this is just plausible enough)

Using elementary symmetries you can realise $J=\int_0^{\pi/2}\arctan(2\csc^2(x))\d x=\int_0^{\pi/2}\arctan(2\sec^2(x))\d x$ or that $J=\int_0^{\pi}\arctan(2\cos^2(x/2))\d x$. No apparent reduction in complexity. We tried differentiation under the integral sign with:

  • $\int_0^\pi\arctan(\alpha(1+\cos x))\d x$
  • $\int_0^\pi\arctan(\alpha+\cos x)\d x$
  • $\int_0^\pi\arctan(1+\alpha\cos x)\d x$
  • $\int_0^\pi\arctan(1+\cos(\alpha x))\d x$

None seemed to give anything we could work with. The only real trick up my sleeve – contour integration – is almost certainly inapplicable here.

Does anyone have any ideas? There's probably an easy way that we missed.

Best Answer

Expand $\tan^{-1}(y)$ via its logarithm definition:

$$\int_0^\pi\arctan(1+\cos x)dx=\frac i2\int_0^\pi\ln\left(1+\frac{1-i}2\cos(x)\right)-\ln\left(1+\frac{1+i}2\cos(x)\right)-\frac{\pi i}2dx$$

Now apply:

Verification of the integral identity $\displaystyle\int_0^\pi \ln(1+\alpha\cos(x))dx=\pi\ln\left(\frac{1+\sqrt{1-\alpha^2}}{2}\right)$.

and the principal logarithm:

$$\frac i2\int_0^\pi\ln\left(1+\frac{1-i}2\cos(x)\right)-\ln\left(1+\frac{1+i}2\cos(x)\right)-\frac{\pi i }2dx=\frac{\pi i}2\ln(-i)+\frac{\pi i}2\ln\left(\frac{\sqrt{4+2i}+2}{\sqrt{4-2i}+2}\right)=\frac{\pi i} 2\ln\left(\sqrt5–2-2\sqrt{\sqrt5-2}i\right)$$

We rationalized to get the last expression. Finally use $\frac i2\ln(x)=\cot^{-1}(i\frac{x+1}{1-x})$ and rationalize again to get:

$$\int_0^\pi\arctan(1+\cos x)dx=\pi\cot^{-1}\left(\sqrt{\frac{\sqrt5+1}2}\right)=\pi\cot^{-1}(\sqrt\phi)$$