<s>[INST] How to show $\int_{0}^{\pi / 2} \ln\left(\tan x - \sqrt{2 \tan x} + 1\right){d}x = 0 $ Problem: Show that
$$\int_{0}^{\pi / 2} \ln\left(\tan x - \sqrt{2 \tan x} + 1\right)\,\mathrm{d}x = 0 $$
If possible, I would like to use regular single-variable calculus methods, with only substitutions, IBP, partial fractions and so on, which does not involve series manipulation.
Thanks.
 [/INST] Substitute $t^2=\tan x$, together with $t^4+1=(t^2-\sqrt2 t+1)(t^2+\sqrt2 t+1) $
\begin{align}
I=&\int_{0}^{\pi / 2} \ln\left(\tan x - \sqrt{2 \tan x} + 1\right)\,dx \\
=&\int_0^\infty \frac{2t\ln(t^2-\sqrt2 t+1)}{t^4+1}dt\\
=&\int_0^\infty \frac{t\ln(t^4+1)}{t^4+1}\overset{y=t^2}{dt}
 + \frac12\int_{-\infty}^\infty \underset{=J}{\frac{t\ln\frac{t^2-\sqrt2 t+1}{t^2+\sqrt2 t+1}}{t^4+1}}dt\tag1\\
\end{align}
Further decompose the integral $J$ as follows
\begin{align}
J=& \ \frac1{\sqrt2}\int_{-\infty}^\infty \overset{y=\sqrt2t-1}{\frac{\ln(t^2-\sqrt2t+1)}{t^2-\sqrt2t+1}}+ \overset{y=\sqrt2t+1}{ \frac{\ln(t^2+\sqrt2t+1)}{t^2+\sqrt2t+1}}-\overset{y=\frac{t-1/t}{\sqrt2}}{\frac{(1+t^2)\ln(t^4+1)}{t^4+1}}\ dt\\
=& \ 2\int_{-\infty}^\infty \frac{\ln \frac{y^2+1}2}{y^2+1}dy
 - \int_{-\infty}^\infty \frac{\ln (2(y^2+1))}{y^2+1}dy
 =2 \int_{0}^\infty \frac{\ln \frac{y^2+1}8}{y^2+1}dy
\end{align}
Plug $J$ into (1) to arrive at
\begin{align}
I =\frac12 \int_0^\infty \frac{\ln(y^2+1)}{y^2+1}dy
 + \int_{0}^\infty \frac{\ln \frac{y^2+1}8}{y^2+1}dy
 =\ \frac32 \int_0^\infty  \frac{\ln \frac{y^2+1}4}{y^2+1}dy=0
\end{align}
</s>