Solution (source code)

= Solution

The <derivative> of $\tan x$ is $1/\cos^2x$. The <fundamental theorem of calculus> gives
$$
\boxed{\int_0^{\pi/4}\frac{dx}{\cos^2x}=\tan(\pi/4)-\tan0=1.}
$$