Calculating integral I am having a problem calculating the following integral.
$$\int_{0}^{1}\frac{\arctan(e^x)}{e^x}dx$$
I tried substituting $u=e^x$ and then use integration by parts, but was unable to continue. 
Thank you in advance
 A: I think it's easier if you substitute $u=e^{-x}$. Then you get
$$
\int \frac{\arctan(e^x)}{e^x}\,dx=-\int\arctan(\frac1u)\,du=-\left[u\arctan(\frac1u)-\int u\frac1{1+\frac1{u^2}}\,\left(\frac{-1}{u^2}\right) \right]=-\left[u\arctan(\frac1u)+\int\frac{u}{1+u^2}\,du \right]=-\left[u\arctan(\frac1u)+\frac12\,\log(1+u^2)\right]=-\left[e^{-x}\arctan(e^x)+\frac12\,\log(1+e^{-2x})\right]
$$
So
$$
\int_0^1\frac{\arctan(e^x)}{e^x}\,dx=-\frac1e\arctan e-\frac12\log(1+e^2)+\frac\pi4\frac12\log2
$$
A: Your first two steps are reasonable.  After the change of variables, you should have
$$ \int_1^e \dfrac{\arctan(u)}{u^2}\ du$$
Integrate by parts (differentiating the arctan) to get
$$ \frac{\pi}{4} - \frac{\arctan(e)}{e} + \int_1^e \frac{du}{u+u^3}$$
Next comes partial fractions.
A: I will use integration by parts set u=e^-x and v=arctan(e^x).Thus:
int(e^-x arctan(e^x))=-e^-x arctan(e^x) - int( -e^-x e^x/(1+e^2x) )=
-e^-x arctan(e^x) + int(1/1+e^2x)=
-e^-x arctan(e^x) + int(1- e^2x/1+e^2x)=
-e^-x arctan(e^x) +x - 0.5 ln(1+e^2x) +C
