# On $\int_0^\pi\arctan(1+\cos x)\,\mathrm{d}x\overset{?}{=}\pi\operatorname{arccot}\sqrt{\phi}$

$$\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.

• This may be helpful. Commented Feb 7 at 15:07
• It's possibly just a coincidence, but the value of the memorable integral in this highly upvoted post is a nonzero integer multiple of the one in this post, i.e., $\pi \operatorname{arccot} \sqrt\pi$: math.stackexchange.com/questions/562694/… Commented Mar 14 at 2:50
• Numerical investigation suggests that we also have $\int_0^\pi\arctan(1+\sec x)\mathrm dx=\pi\operatorname{arccot}\left(\phi+\sqrt{\phi}\right)$.
– Dan
Commented Mar 16 at 14:21

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)$$

• Related result Commented Feb 7 at 15:52
• This question was proposed by me for the bee, and this was my exact solution. Nice! Commented Feb 8 at 2:06

Let $$I(a)= \int_0^{\pi/2} \tan^{-1}(\sinh a \cos^2x)dx$$ \begin{align} I’(a)=&\int_0^{\pi/2}\frac{\cosh a \cos^2x}{1+\sinh^2a\cos^4x}dx\\ = &\int_0^{\pi/2}\frac{\cosh a \sec^2x}{(1+\tan^2x)^2+\sinh^2a}dx=\frac\pi4\text{sech}\frac a2 \end{align} Then \begin{align} &\int_0^\pi\tan^{-1}(1+\cos x)dx\\ = &\ 2I(\sinh^{-1}2)=2\int_0^{\sinh^{-1}2}I’(a)da = \frac\pi2 \int_0^{\sinh^{-1}2}\text{sech}\frac a2\ da\\ =&\ \pi \cot^{-1}\left( \text{csch}\frac a2\right)\bigg|_0^{\sinh^{-1}2} =\pi \cot^{-1}\sqrt{\phi} \end{align}

• How would you evaluate $I’(a)$? Commented Feb 7 at 16:04
• Mysterious (but supremely elegant as always). Mind explaining why you tried an integrating factor of $\sinh a$? Commented Feb 7 at 16:05
• @FShrike - I tried a simple parameter $a$ to begin with and got a complicated $I’(a)$, which simplifies to $\text{sech}\frac a2$ under $a\to \sinh a$. Commented Feb 7 at 16:15
• @ТymaGaidash - with the substitution $t=\tan x$ Commented Feb 7 at 16:16
• Wow this is a really nice solution! Commented Feb 8 at 2:08