# Evaluate $\int_0^\pi \arctan(\cos x)\,\mathrm dx$

I need to Evaluate $$\int_0^\pi \arctan(\cos x)\,\mathrm dx$$ . I tried to make an exchage $t=\cos x$ and then take the integral by parts

• is this a multiplication or a composition of functions ? – user162343 Dec 9 '14 at 14:37
• What is arctg? Do you mean $\arctan$? You need to learn to use latex meta.math.stackexchange.com/questions/5020/… – mattos Dec 9 '14 at 14:37
• But why is she using integration by parts? – user162343 Dec 9 '14 at 14:38
• Try the substitution $x=u+\frac\pi 2$ and note that $\arctan \circ \sin$ is odd. – Git Gud Dec 9 '14 at 14:41
• @GitGud Or equivalently see $\cos(x) = -\cos(\pi-x)$ so the original function is point symmetric about $x=\frac\pi2$ – AlexR Dec 9 '14 at 14:49

Let $$I=\int_0^\pi \arctan(\cos x)\,\mathrm dx\tag{1}$$ then by using using

\begin{align}\int_a^bf(x)\,\mathrm dx&=\int_a^bf(a+b-x)\,\mathrm dx\\ I&=\int_0^\pi \arctan(\cos (\pi-x))\,\mathrm dx\tag{2}\\ &=\int_0^\pi \arctan(-\cos x)\,\mathrm dx\tag{3}\\ &=\int_0^\pi -\arctan(\cos x)\,\mathrm dx\tag{4}\\ \end{align}

Adding $(1)$ and $(4)$

\begin{align} 2I&=\int_0^\pi \arctan(\cos x)\,\mathrm dx-\int_0^\pi \arctan(\cos x)\,\mathrm dx\\ &=0\\ \end{align}

$$\int_0^\pi \arctan(\cos x)\,\mathrm dx=0$$

• You could also consider $\cos x = -\cos (\pi-x)$ trivially ;) – AlexR Dec 9 '14 at 14:51

Hint
$\cos(x) = -\cos(\pi-x)$. The function is thus point symmetric about the midpoint $x=\frac\pi2$. What can you conclude?

\begin{align} \int_0^\pi \arctan(\cos x)\,\mathrm dx&=\int_0^{\pi/2} \arctan(\cos x)\,\mathrm dx+\underbrace{\int_{\pi/2}^{\pi} \arctan(\cos x)\,\mathrm dx}_{\Large\color{red}{ x\,\mapsto \,x-\frac{\pi}{2}}}\tag1\\ &=\underbrace{\int_{0}^{\pi/2} \arctan(\cos x)\,\mathrm dx}_{\Large\color{blue}{ x\,\mapsto \,\frac{\pi}{2}-x}}-\int_{0}^{\pi/2} \arctan(\sin x)\,\mathrm dx\tag2\\ &=\int_{0}^{\pi/2} \arctan(\sin x)\,\mathrm dx-\int_{0}^{\pi/2} \arctan(\sin x)\,\mathrm dx\\ &=0 \end{align}

Explanation :

$(1)\;$ Use substitution $\;\displaystyle x\,\mapsto \,x-\frac{\pi}{2}$ and use the fact that $\cos x$ in second quadrant is negative.

$(2)\;$ Use substitution $\;\displaystyle x\,\mapsto \,\frac{\pi}{2}-x$ and use the fact that $\sin x$ in first quadrant is positive.