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
 A: 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$$

A: Hint
$\cos(x) = -\cos(\pi-x)$. The function is thus point symmetric about the midpoint $x=\frac\pi2$. What can you conclude?
A: \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.
A: $$I=\int_0^\pi\arctan(\cos x)dx$$
Substitute $x\rightarrow\frac{\pi}{2}-x$
$$I=\int_{-\frac{\pi}{2}}^\frac{\pi}{2}\arctan(\sin x)dx$$
Use odd properties (the integrand is odd)
$$I=0$$
