Could someone help me out with this question? I'm studying for my exam and I'm stuck.
Question: Let $p,q \in (-\infty, \infty).$ Find all $(p,q)$ such that the improper integral $ \int_2^\infty \frac{1}{x^q(\ln x)^p} dx $ converges.
I know how to solve the problem if it were $ \int_2^\infty \frac{1}{x(\ln x)^p} dx $ and I were to find $p$, but I'm not sure what to do with two unknown values... I can't really integrate it because of $q$, so what should I do??
Hint: for $q>1$ use (for $x\to +\infty$) $$\frac{1}{x^q\log^p x}\leq \frac{1}{x^{(q+1)/2}};$$ for $q<1$ use (for $x\to +\infty$) $$\frac{1}{x^q\log^p x}\geq \frac{1}{x}.$$