Inspired by the post, $$\int_0^{\pi/2} \cot x \ln(\sec x) dx= \frac{\pi^2}{24}, $$ I want to generalise it as:
$$ \int_0^\theta \cot x \ln (\sec x) d x=-\frac{1}{8}\left(2\operatorname{Li_2}(-\tan^2 \theta)+ \ln^2 (\sec^2 \theta )\right) $$
$$ \begin{aligned} \int_0^\theta \cot x \ln (\sec x) d x = & \frac{1}{2} \int_0^{\tan \theta} \frac{\ln \left(1+t^2\right)}{t} \cdot \frac{d t}{1+t^2},\quad \textrm{ where } t=\tan x \\ = & \frac{1}{4} \int_0^{\tan^2 \theta} \frac{\ln (1+t)}{t(1+t)} d t \quad (\textrm{ Via } t^2 \to t)\\ = & \frac{1}{4}\left[\int_0^{\tan^2 \theta} \frac{\ln (t+1)}{t} d x-\int_0^{\tan^2\theta} \frac{\ln (t+1)}{t+1} d x\right] \\ = & \frac{1}{4}\left[-\operatorname{Li_2}(-t)-\frac{1}{2} \ln ^2(t+1)\right]_0^{\tan^2 \theta}\\=& -\frac{1}{8}\left(2\operatorname{Li_2}(-\tan^2\theta)+ \ln^2 (\sec^2 \theta )\right) \end{aligned} $$
My question:
Is there other method to tackle the integral? Your comments and alternative methods are highly appreciated>