I solved this interesting integral online: $$I = \int\limits_{-1}^{1} \arctan(e^x)dx $$ Now I tried the substitution $u=e^x$ but it lead me nowhere. I was looking at the following post which was solved in a beautiful way Integrate $\int_0^{\pi/2} \frac{1}{1+\tan^\alpha{x}}\,\mathrm{d}x$. From there I found this very interesting article http://www.maa.org/sites/default/files/pdf/mathdl/CMJ/Nelsen39-41.pdf which has the integral I posted at the end as a question to the reader.
Looking at the graph of $\arctan(e^x)dx$ on the interval $-1 \leq x \leq 1$ I conjectured that $I=\frac{\pi}{2}$. I used the following method to prove it: \begin{eqnarray} -e^{-x}&=&\frac{-1}{e^x}\\&=& \frac{-1}{\tan\{ \arctan(e^x) \} }\\&=&-\cot\{ \arctan(e^x) \}\\ &=& \tan \left\{\arctan(e^x)-\frac{\pi}{2} \right\}\\ \end{eqnarray} For the last equality I used the fact that $\cot(\theta) =-\tan\left(\theta -\frac{\pi}{2}\right) $. Now we take the arctan of both sides to obtain: $$\arctan(-e^{-x}) = \arctan(e^x)-\frac{\pi}{2}$$
Finally I use the fact that $\arctan(-\theta)=-\arctan(\theta)$ and add $\frac{\pi}{4}$ to both sides of the last equation to obtain: $$-\arctan(e^{-x}) +\frac{\pi}{4}= \arctan(e^x)-\frac{\pi}{4} $$ So it is established that the function $f(x) = \arctan(e^x)-\frac{\pi}{4}$ is an odd function. Thus $$I_2 = \int\limits_{-1}^{1} \left[ \arctan(e^x)-\frac{\pi}{4} \right]dx = 0 $$ Now $$I = \int\limits_{-1}^{1} \arctan(e^x)dx = I_2 + \int\limits_{-1}^{1} \frac{\pi}{4}dx =\frac{\pi}{2} $$ I thought this integral was really interesting and I was wondering if anyone else has any different ways of solving it, possibly with a clever substitution. I was especially amazed at how easily it could be solved because integrals with arctan usually give me a lot of trouble.
Also, I think we can extend this to a broader result where we replace $x$ by any arbitrary odd function $g(x)$ and show that $$I = \int\limits_{-a}^{a} \arctan(e^{g(x)})dx = \frac{a \pi}{2}$$ for any odd function $f(x): (-a,a) \to\Bbb R$. Essentially the proof for this would follow the exact same reason as above right?
So if anyone has another method of computing the original integral I am definitely interested in reading your solutions! Thanks in advance for any input and ideas! Also thanks to Ron Gordon for his nice answer on the question I linked, the answer given there inspired me to look for different ways of trying to solve this integral that I normally would have given up on.