2. If $\displaystyle u=e^x$
Then $\displaystyle du=e^xdx$
$\displaystyle \int \frac{1}{1+u^2}du=\arctan u+C=\arctan e^x+c$