Suppose that $p\geq 1.$ In this question, Robert answered that the following integral $$\int_0^\infty \frac{1}{x ((\ln x)^2+1)^p} dx$$ converges for any $p\geq 1.$
However, I am not able to show Robert's claim. Below is my attempt:
Use the substitution $u = \ln (x).$ Then we have
$$\int_0^\infty \frac{1}{x ((\ln x)^2+1)^p} dx = \int_{-\infty}^\infty \frac{1}{(u^2+1)^p} du.$$
Let $u = \tan\theta.$ Then we have
$$\int_{-\infty}^\infty \frac{1}{(u^2+1)^p} du = \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{1}{\sec^{2p}\theta} \cdot \sec^2\theta \, d\theta = \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \cos^{2p-2} \theta \, d\theta.$$
Then I stuck here.
Any hint would be appreciated.
EDIT: It seems that the last integral can be bounded easily since its power is non-negative. Now, I am curious on how to solve the last integral.