Is there a better solution than $\int_{1}^{\ln 2} \frac{e^x\,dx}{1 +e^{2x}} = \arctan(2) - \arctan(e)$ I was told there must be a non trigonometrical answer. 
I can only apply
$$\int\ \frac{e^x\,dx}{1 +e^{2x}} = \arctan(e^x) + C$$
Am I wrong somewhere?
 A: Instead of trigonometric functions you may use complex numbers.
$$\int\frac{e^x}{1+e^{2x}}\,dx=\int\frac{1}{1+t^2}\,dt$$
Where $t=e^x$. Now factor $t^2+1$ and use partial fraction decomposition:
$$\int\frac{1}{(t-i)(t+i)}\,dt=\int\left(\frac{i}{2(t+i)}-\frac{i}{2(t-i)}\right)\,dt=\frac{i}{2}\ln(t+i)-\frac{i}{2}\ln(t-i)+C$$
Plug in $t=e^x$ and your bounds to get
$$\int_1^{\ln 2}\frac{e^x}{1+e^{2x}}\,dx=
\frac{i}{2}\left(\ln(2+i)-\ln(2-i)
-\ln(e+i)+\ln(e-i)\right)$$
Which may be simplified to
$$\frac{i}{2}\left(\ln\frac{2+i}{2-i}
-\ln\frac{e+i}{e-i}\right)=
\frac{i}{2}\ln\frac{(2+i)(e-i)}{(2-i)(e+i)}$$
A: $$\int \frac{e^x}{1+e^{2x}}dx$$
Apply Integral Substitution:$\color{green}{u=e^x\quad \:du=udx}$
$$=\int \frac{1}{e^{2\ln \left(u\right)}+1}du=\int \frac{1}{u^2+1}du$$
So:
$$\int \frac{e^x}{1+e^{2x}}dx{=\arctan \left(e^x\right)+C}$$
$$\int _2^{\ln \left(2\right)}\frac{e^x}{1+e^{2x}}dx=\color{red}{\arctan \left(2\right)-\arctan \left(e^2\right)}$$
A: Notice:
$$\int_{1}^{\ln(2)}\frac{e^x}{1+e^{2x}}\space\text{d}x=$$

Substitute $u=e^x$ and $\text{d}u=e^x\space\text{d}x$.
This gives a new lower bound $u=e^{1}=e$ and upperbound $u=e^{\ln(2))}=2$:

$$\int_{e}^{2}\frac{1}{1+u^2}\space\text{d}u=\left[\arctan(u)\right]_{e}^{2}=\arctan(2)-\arctan(e)$$
A: If I understand you correctly, you don't want to see anything related with trigonometry. For this case it is possible to use Taylor expansion of your function inside an integral. This will give you a polynomial which is very easily integratable. But note that there will be infinite number of terms.
If you expand your function $f(x) = \cfrac{e^x}{1+e^{2x}}$ around $x_0=0$ you would get the following polynomial:
\begin{equation}
f(x) = \cfrac{1}{2} - \cfrac{x^2}{4} +\cfrac{5x^4}{48} + \dots
\end{equation}
Integrating this function will give us:
\begin{equation}
\int f(x) dx = \cfrac{x}{2} - \cfrac{x^3}{12} +\cfrac{x^5}{48} + \dots + C
\end{equation}
So, taking the limits:
\begin{equation}
F(\ln 2)-F(1) = \cfrac{\ln 2 - 1}{2} - \cfrac{(\ln 2 - 1)^3}{12} +\cfrac{(\ln 2 - 1)^5}{48} + \dots
\end{equation}
A: Just for the love of math, I'll provide you an alternative derivation of that result, by series.
$$\int\frac{e^x}{1 + 2e^x}\ \text{d}x = \int\frac{e^x}{e^{2x}(1 + e^{-2x})}\ \text{d}x$$
Given that, we simplify and use a small trick about signs, obtaining
$$\int\frac{e^{-x}}{1 - (-e^{-2x})}\ \text{d}x$$
Now, because of the geometric series, we can write (knowing that in our range $e^{-2x} < 1$ holds, 
$$\int e^{-x}\sum_{k = 0}^{+\infty} (-e^{-2x})^k\ \text{d}x$$
thus
$$\sum_{k = 0}^{+\infty}\int e^{-x} e^{-2kx}\ \text{d}x = \sum_{k = 0}^{+\infty}\int e^{-x(1+2k)}$$
and solving the trivial integral you obtain
$$\boxed{\sum_{k = 0}^{+\infty} \frac{(-1)^k}{1+2k}e^{-x(1+2k)}}$$
This is a convergent series, whose sum is nothing but the arctangent function you got above:
$$\sum_{k = 0}^{+\infty} \frac{(-1)^k}{1+2k}e^{-x(1+2k)} = \text{arcTan}(e^x)$$
Little Plus
$$\text{arcTan}(e^x) = \text{arcCot}(e^x)$$
Thence your result by integrating with given extrema.
A: you are definitely right, also the answer could be $-\arctan(e^{-x})+C$
