Show that $\int_0^\infty\frac{1}{x ((\ln x)^2+1)^p}dx$ converges for any $p\geq 1$ and find its value. 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. 
 A: Hint: Note that $\cos$ is an even function and  $$2\int_0^{\pi/2}\sin^{2m-1}\theta\cos^{2n-1}\theta d\theta=\frac{\Gamma(m)\Gamma(n)}{\Gamma(m+n)}$$
A: If you have a look here, you will see a nice answer for the reduction formula for $$I_n=\int \cos^n(x)\, dx$$
$$I_n =\frac{ \sin( x) \ \cos^{n-1} (x)}n + \frac{n-1}n I_{n-2}$$ So, applied to your case $$J_n=\int_{-\frac \pi 2}^ {\frac \pi 2}\cos^n(x)\, dx$$ it just reduces to $$J_n=\frac{n-1}n J_{n-2} \qquad \text{with}\qquad  J_0=\pi  \qquad \text{and}\qquad J_1=2$$ leading finally to $$J_n=\sqrt{\pi }\frac{\Gamma \left(\frac{n}{2}+\frac{1}{2}\right)}{\Gamma
   \left(\frac{n}{2}+1\right)}$$ 
A: By enforcing the substitution $x=e^t$ we have
$$ I(p)=\int_{0}^{+\infty}\frac{dx}{x(1+\log^2 x)^p} = \int_{-\infty}^{+\infty}\frac{dt}{(t^2+1)^p}\tag{1}$$
and the last integral is clearly convergent for any $\color{red}{p>\frac{1}{2}}$, since the integrand function is positive, bounded by $1$ in a neighbourhood of the origin and behaves like $\frac{1}{|t|^{2p}}$ far from the origin.
By exploiting symmetry and enforcing the substitution $\frac{1}{t^2+1}=u$ we have
$$ \color{red}{I(p)} = \int_{0}^{1} u^{p-3/2}(1-u)^{-1/2}\,du = B\left(p-\tfrac{1}{2},\tfrac{1}{2}\right) = \color{red}{\frac{\Gamma\left(p-\tfrac{1}{2}\right)\sqrt{\pi}}{\Gamma(p)}} \tag{2}$$
by the properties of Euler's Beta function. If $p\in\mathbb{N}^+$ the RHS of $(2)$ simplifies as follows:
$$ I(p) = \color{red}{\frac{\pi}{4^{p-1}}\binom{2p-2}{p-1}}.\tag{3} $$
The last identity can also be proved by differentiation under the integral sign. For any $a>0$ we have $\int_{-\infty}^{+\infty}\frac{dt}{t^2+a}=\frac{\pi}{\sqrt{a}}$ and it is enough to apply $\frac{d^{p-1}}{da^{p-1}}$ to both sides, then evaluate at $a=1$.
