\[
\int\dfrac{e^{x}}{\left(e^{x}\right)^{2}+1}\;\mathrm{d}x=\left|\begin{array}{c}
e^{x}=t\\
x=\ln t\\
\mathrm{d}x=\dfrac{1}{t}\end{array}\right|=\int\dfrac{t}{t^{2}+1}\cdot\dfrac{1}{t}\;\mathrm{d}t=\int\dfrac{1}{t^{2}+1}\;\mathrm{d}t=\arctan t=\arctan\left(e^{x}\right)\]