Does $\int_{0}^{\pi/2}\ln^k\left(\tan^2{x\over 2}\right)\mathrm dx=\int_{0}^{\pi/2}\ln^k\left(\tan^2{x}\right)\mathrm dx$ hold only for even $k$? Why is it that apparently only for even $k$,
$$
\int_{0}^{\pi/2}\ln^k\left(\tan^2{x\over 2}\right)\mathrm dx=\int_{0}^{\pi/2}\ln^k\left(\tan^2{x}\right)\mathrm dx$$
Specificallly, for all $k$,
$$\text{LHS}=-(-2)^{k+1}k!\,\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^{k+1}}$$
But for odd $k$,
$$\text{RHS}=0$$
The case of $k=2$ for the $\text{LHS}$ is discussed in this post, while the $\text{RHS}$ is in this post.

Since $$\tan^2 \left(\tfrac{\pi}{2} - x\right) = \cot^2 x = \frac{1}{\tan^2 x},$$  it follows that $$\log^k \tan^2 \left(\tfrac{\pi}{2} - x\right) = (-1)^k \log^k \tan^2 x,$$ hence when $k$ is positive odd, the integrand is antisymmetric about $x = \pi/4$.  When $k$ is positive even, the integrand is symmetric about $x = \pi/4$.
