TITLE: Finding $\int_0^{\pi/4}\sqrt{1+\left( \tan x\right)^2}dx$
QUESTION [7 upvotes]: 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.

REPLY [3 votes]: Using $1+\tan^{2}x=\sec^{2}x$ gives 
$\int_0^{\frac{\pi}{4}}\sqrt{1+\tan^{2}x}\,dx=\int_0^{\frac{\pi}{4}}\sec x\,dx=\big[\ln(\sec x+\tan x)\big]_0^{\frac{\pi}{4}}=\ln(\sqrt{2}+1)-\ln 1=\ln(\sqrt{2}+1)$