When are the following multiple improper integrals convergent? This is a question from a past exam.  

For which $p, q\in \mathbb R$ do the following improper integrals converge?
  $$\begin{align*}I_1=\int_{D_1}\dfrac{dx}{(1-\cos(\|x\|_2))^p}\\I_2=\int_{D_2}\dfrac{dx}{\|x\|_2^q\ln(\|x\|_2)}\end{align*}$$, where $D_1=\{x\in \mathbb R^n|\|x\|_2\le1\}$, $D_2=\{x\in \mathbb R^n\mid\|x\|_2\ge\sqrt2\}$, and $\|x\|_2=\sqrt{\sum_1^nx_i^2}$.  

I have tried comparison test, but found no suitable comparison functions, and looked into my textbooks about improper integrals. But I found no useful information.
Further, noting that $\cos x$ is approximately $1-x^2/2+x^4/4!-+...$, I conjecture that $I_1$ is convergent exactly when $p\lt n/2$. But I have no idea how to prove this rigorously. Finally, I tried using similar ideas for $\ln$, at least to give an approximate estimate for $I_2$, but in vain, for I found no expansion for $\ln$ that comes in handy.
So any help or hint will be well appreciated.  
 A: For $I_1$, note that
\begin{align*}
I_1 & \propto \int_0^1 \frac{r^{n-1}dr}{(1 - \cos r)^p} \\
& \propto \int_0^1 \frac{r^{n-1}dr}{\sin^{2p}\left(\frac r2\right)}dr
\end{align*}
The problem is at $0$.
Intuitively, near $0$, $\sin^{2p}(r/2) \approx (r/2)^{2p}$, and that part of the integral will be convergent if $\int_0^1 \frac{r^{n-1}}{r^{2p}}dr$ is convergent. Since
$$
\int_0^1 r^{n-1-2p} dr = \frac1{n-2p}r^{n-2p}|_0^1
$$
is defined only when $n - 2p > 0$, i.e., $p < \frac n2$, this is the condition for the convergence of the integral. Note that the integration above is not even correct for the case $n = 2p$, but in that case, the antiderivative is $\log r$, and we still do not have the convergence because $\log 0$ is not defined.
(I believe this "intuitive" argument can be turned into a more rigorous one simply by appealing to Taylor's remainder theorem.)
For $I_2$, we have
\begin{align*}
I_2 & \propto \int_{\sqrt 2}^\infty\frac{r^{n-1}dr}{r^q\log r}
\end{align*}
The problem now is at $\infty$. By substituting $u = \log r$, we get $du = \frac 1r dr$, and so
\begin{align*}
I_2 & \propto \int_{\log\sqrt 2}^\infty \frac{e^{(n-q)u}}udu.
\end{align*}
If $n > q$, then $\frac 1ue^{(n-q)u} \to \infty$ as $u \to \infty$, so the integral does not converge. If $n = q$, the integral becomes $\int_{\log\sqrt 2}^\infty \frac 1u du$, which also does not converge. If $n < q$, we have
$$
\int_{\log\sqrt 2}^\infty \frac{e^{(n-q)}u}{u}du
\le \frac{1}{\log\sqrt 2}\int_{\log\sqrt 2}^\infty e^{(n-q)u}du
= \frac{(\sqrt 2)^{n-q}}{(q-n)\log\sqrt 2}.
$$
Therefore, $I_2$ converges if and only if $n < q$.
