Solution (source code)

= Solution

Since the <derivative> of $\ln\cos x$ is $-\tan x$ on this interval,
$$
\int_0^{\pi/4}\tan x\,dx
=\big[-\ln\cos x\big]_0^{\pi/4}
=-\ln\frac1{\sqrt2}=\boxed{\frac12\ln2}.
$$