TITLE: Integral with arctan(sinx)
QUESTION [5 upvotes]: For those who cannot see the picture;
$$ \int^{\frac{5\pi}{2}}_{\frac{\pi}{2}} \frac{e^{\tan^{-1}(\sin(x))}}{e^{\tan^{-1}(\cos(x))} + e^{\tan^{-1}(\sin(x))}} ~dx = \pi$$
The problem is that the standard way of computing it by transforming $x \rightarrow 3\pi-x$ is not working.How to prove that the integral will come as $\pi$?

REPLY [3 votes]: Let $$f(u, v) = \frac{e^{\tan^{-1}u}}{e^{\tan^{-1}u} + e^{\tan^{-1}v}}\tag{1}$$ and we can see that $$f(u, v) + f(v, u) = 1\tag{2}$$ Also note that by the periodicity of $\sin x, \cos x$ it follows that $f(\sin x, \cos x)$ is periodic with period $2\pi$. The integral $I$ to be evaluated is $$I = \int_{\pi/2}^{5\pi/2}f(\sin x, \cos x)\,dx\tag{3}$$ Since the integrand is periodic with period $2\pi$ and length of interval of integration is also $2\pi$, it follows that the interval of integration can be replaced by any interval of length $2\pi$. Thus we have $$I = \int_{0}^{2\pi}f(\sin x, \cos x)\,dx\tag{4}$$ Putting $x = (\pi/2) - t$ in $(3)$ we get $$I = \int_{-2\pi}^{0}f(\cos t, \sin t)\,dt = \int_{0}^{2\pi}f(\cos x, \sin x)\,dx\tag{5}$$ Adding $(4)$ and $(5)$ (and noting $(2)$) we get $$2I = \int_{0}^{2\pi}1\,dx = 2\pi$$ and hence $I = \pi$.