Evaluate $\int_{0}^{\frac{\pi}{4}} \ln(\sec x)dx$ Evaluate $$P=\int_{0}^{\frac{\pi}{4}} \ln(\sec x)dx$$
My try: I tried using its complimentary integral:
Let $$Q=\int_{0}^{\frac{\pi}{4}} \ln(\csc x)dx$$
Adding both we get:
$$P+Q=\int_{0}^{\frac{\pi}{4}}\ln(\sec x\csc x)dx$$ $\implies$
$$2P+2Q=\int_{0}^{\frac{\pi}{4}}\ln(\sec^2 x\csc^2 x)dx=\int_{0}^{\frac{\pi}{4}}\ln\left(\frac{4}{4\sin^2 x\cos^2 x}\right)dx$$ $\implies$
$$2P+2Q=\frac{\pi}{4}\ln 4-\int_{0}^{\frac{\pi}{4}}\ln\left(\sin^2 2x\right)dx$$
$$2P+2Q=\frac{\pi}{2}\ln 2-2 \int_{0}^{\frac{\pi}{4}}\ln(\sin 2x)dx$$
Using the substitution $2x=t$ we get
$$2P+2Q=\frac{\pi}{2}\ln 2- \int_{0}^{\frac{\pi}{2}}\ln(\sin t)dt$$
Using the formula:
$$\int_{0}^{\frac{\pi}{2}}\ln(\sin t)dt=\frac{-\pi}{2}\ln 2$$ we get
$$2P+2Q=\pi \ln 2$$
$$P+Q=\frac{\pi}{2}\ln 2$$
Is there any way to find $P-Q$

In fact
\begin{eqnarray*}
P-Q&=&\int_0^{\frac{\pi}{4}}\ln(\tan t)dt\\
&=&\int_0^1\frac{\ln u}{1+u^2}du\\
&=&\int_0^1\ln u\sum_{n=0}^\infty(-1)^nu^{2n}du\\
&=&\sum_{n=0}^\infty(-1)^n\int_0^1u^{2n}\ln udu\\
&=&-\sum_{n=0}^\infty(-1)^n\frac{1}{(2n+1)^2}\\
&=&-C
\end{eqnarray*}
where $C$ is the Catalan constant.
