Suppose that $p\geq 1.$ This post shows that the following integral $$\int_0^\infty \frac{1}{x ((\ln x)^2+1)^p} dx$$ converges for $p.$
Question: Suppose that $q\geq 1$ such that $q \neq p.$ Is it true that $$\int_0^\infty \left|\frac{1}{x^{1/p} ((\ln x)^2+1)}\right|^q dx$$ is divergent?
I am aiming to obtain a function $g$ such that $$g(x) \leq \frac{1}{x^{q/p}((\ln x)^2+1)^q}$$ and $\int_0^\infty g(x)\,dx=\infty.$ However, I fail to obtain such $g.$
Any hint would be appreciated.
Partial answer:
Taking $\ln x=u$, $$I=\int_0^\infty \left|\frac{1}{x^{1/p}(1+(\ln x)^2)}\right|^q dx=\int_{-\infty}^\infty\frac{e^{(1-q/p)u}}{(1+u^2)^q}du=\int_{-\pi/2}^{\pi/2}e^{r\tan\theta} \cos^{2q-2}\theta d\theta\\=2\int_{0}^{\pi/2}\cosh(r\tan \theta)\cos^{2q-2}\theta d\theta $$ where $r=1-p/q$. One way to proceed now is to expand the $\cosh$ term in series and then use the $\Gamma$ function formulas.