Finding $\int_0^{\pi/4}\sqrt{1+\left( \tan x\right)^2}dx$ I would like to understand all the steps to find out this integral $$ \int_0^{\pi/4} \sqrt{1+\left( \tan x\right)^2} dx$$ Wolfram Alpha returns: $$ \frac12 \log(3+2 \sqrt2) = 0.881373587019543...$$ Why does it give this value? Thank you.

An alternative approach. By substituting $x=\arctan t$, we get:
$$ I = \int_{0}^{1}\frac{dt}{\sqrt{1+t^2}}=\operatorname{ArcSinh}(1) $$
hence the value of the integral is given by the solution of:
$$ e^{x}-e^{-x} = 2 $$
or by the logarithm of the positive solution of:
$$ y-\frac{1}{y}=2, $$
hence $I=\log(1+\sqrt{2})$ as wanted.
