$$\int_{0}^{\frac{\pi}{2}}\sqrt{\frac{\tan(x)}{x|x^x-1|}}\,dx$$
In a neighbourhood of $\frac{\pi}{2}$ the integrand behaves as $\sqrt{\tan(x)}$. How to handle it?
If it was $\tan(x)$ we had: $$\int_{0}^{\frac{\pi}{2}}\tan(x)\,dx\,\, = \,\, \lim_{M \to \frac{\pi}{2}}\int_{0}^{M}\frac{\sin(x)}{\cos(x)}\,dx\,\, = \,\, \lim_{M \to \frac{\pi}{2}}\left[-\log|\cos(x)|\right]\,\, = \,\, -\lim_{M \to \frac{\pi}{2}}\left(\log(\cos(M)\right)+\log(\cos(0))$$
The limit goes to $+\infty$, so, as $x \to \frac{\pi}{2}$ we have that $\tan(x) \sim \log(t)$ as $t \to +\infty$, which diverges.
What about the radical of the tangent?
Over $\left(0,\frac{\pi}{2}\right)\setminus\{1\}$ we have $$ \frac{1}{|1-x^x|}\leq 2\cdot\max\left(-\frac{1}{x\log x},\frac{1}{|1-x|}\right)$$ $$ \frac{\tan x}{x}\leq \max\left(1+\frac{x^2}{2},\frac{1}{\frac{\pi}{2}-x}\right)$$ and $\sqrt{-\frac{1}{x \log x}}$ is integrable over $\left(0,\frac{1}{2}\right)$, $\frac{1}{\sqrt{|1-x|}}$ is integrable over $\left(\frac{1}{2},\frac{5}{4}\right)$ and $\frac{1}{\sqrt{\frac{\pi}{2}-x}}$ is integrable over $\left(\frac{5}{4},\frac{\pi}{2}\right)$. A bit tedious but you just have to split the integration range into three components and apply suitable inequalities over such components.