$ \int_0^\frac{\pi}{2}\ln^n\left(\tan(x)\right)\:dx$

$$\begin{split} I_{2k} &= \int_0^\infty\frac{\ln^{2k}u}{u^2 + 1}du \\ &= \int_0^1\frac{\ln^{2k}u}{u^2 + 1}du +\int_1^{+\infty}\frac{\ln^{2k}\left(u\right)}{u^2 + 1}du \\ &=\int_0^1\frac{\ln^{2k}u}{u^2 + 1}du +\int_0^{1}\frac{\ln^{2k}t}{t^2 + 1}dt \,\,\,\left(\text{by } u\rightarrow \frac 1 t\right)\\ &=2\int_0^1\frac{\ln^{2k}u}{u^2 + 1}du\\ &=2\sum_{n\in\mathbb N}(-1)^n\int_0^1u^{2n}\ln^{2k} (u) du \end{split}$$ Now, let $$J_{p,q}=\int_0^1u^p\ln^q (u)du$$ If $q\geq 1$, by integration by parts, $$J_{p, q}=\left. \frac{u^{p+1}}{p+1}\ln^q u\right]_0^1-\int_0^1\frac{u^{p+1}}{p+1}q\ln^{q-1}(u)\frac{du}u=-\frac q{p+1}J_{p,q-1}$$ Consequently, if $q\geq 1$, $$J_{p,q} = (-1)^{q}\frac{q!}{(p+1)^{q+1}}$$ We conclude that $$I_{2k}=2\cdot (2k)!\sum_{n\in\mathbb N}\frac{(-1)^n}{(2n+1)^{2k+1}}$$ Following Zachy's suggestion, the last sum is known as the Dirichlet Beta function $$I_{2k}=2\cdot (2k)!\beta(2k+1)$$ Finally, values of $\beta$ at odd numbers are known in terms of Euler's numbers and we get $$\boxed{I_{2k}=2\frac{(-1)^kE_{2k}\pi^{2k+1}}{4^{k+1}}}$$


Slightly different way - use well known results

$$\int_0^{\frac{\pi}{2}}\tan^ay\;dy=\frac{\pi}{2}\frac{1}{\sin \frac{\pi}2(a+1) } $$

( this integral is considered in this site probably many times.) $$\frac{1}{\sin x}=\frac{1}{x}+\sum _{n=1}^\infty (-1)^n\left ( \frac{1}{x-n\pi}+ \frac{1}{x+n\pi}\right )$$

and differentiate with respect to $a$ as much as necessary.


Make an exponential generating function with $I_k$, $$I_k: = \frac{1}{2} (1 + (-1)^k) \int_0^\infty \frac{ \log^{k}(u) }{u^2+1} du $$ Then $$I(x)=\sum_{k=0}^\infty I_k\,\frac{x^k}{k!} = \frac{1}{2}\int_0^\infty \frac{ u^x + u^{-x} }{u^2+1} du $$ where an interchange of $\sum$ and $\int$ has been made. The integral can be solved in closed form, $I(x) = \pi/2 \cdot \sec{(\pi x/2)}.$ Expanding the sec in a power series will give the last answer that Stafan Lafon gave, in terms of Euler numbers.