Solving $\int_0^{\frac{1}{2}}\frac{1}{x|\log(x)|^a}dx$ I have the following problem: For which values of a is the improper integral $\int_0^{\frac{1}{2}}\frac{1}{x|\log(x)|^a}dx$ finite?
My initial thoughts are that integration by parts will do, but I feel like there should be a nice trick with this integral and I do not see it. Intuitively, I would say that this does not happen for any a, because $\lim_{x\to 0}x|\log(x)|^a = 0$ because x will go to zero faster that $\log(x)$ will go to $+\,\, \text{or} -\infty$, so for any a $\lim_{x\to 0}\frac{1}{x|\log(x)|^a}=\infty$. Hence the integral is never finite, but this does not feel right either.
Is anything I proposed sound? How should one approach a question like this? Would it be the same approach if the integral was improper but $\int_1^{\infty}$?
Thanks in advance!
 A: Well, we are trying to solve:
$$\mathcal{I}_\text{n}:=\lim_{\text{k}\space\to\space0}\int\limits_\text{k}^\frac{1}{2}\frac{1}{x\left|\ln\left(x\right)\right|^\text{n}}\space\text{d}x\tag1$$
First of all, substitute $\text{u}=\ln\left(x\right)$:
$$\mathcal{I}_\text{n}=\lim_{\text{k}\space\to\space0}\int\limits_{\ln\left(\text{k}\right)}^{\ln\left(\frac{1}{2}\right)}\frac{1}{\left|\text{u}\right|^\text{n}}\space\text{du}=\lim_{\text{k}\space\to\space0}\int\limits_{\ln\left(\text{k}\right)}^{-\ln\left(2\right)}\frac{1}{\left|\text{u}\right|^\text{n}}\space\text{du}\tag2$$
Assuming that the $\ln\left(\text{k}\right)\leq\text{u}<-\ln\left(2\right)$, so:
\begin{equation}
\begin{split}
\mathcal{I}_\text{n}&=\lim_{\text{k}\space\to\space0}\int\limits_{\ln\left(\text{k}\right)}^{-\ln\left(2\right)}\frac{1}{\left(-\text{u}\right)^\text{n}}\space\text{du}\\
\\
&=\lim_{\text{k}\space\to\space0}\int\limits_{\ln\left(\text{k}\right)}^{-\ln\left(2\right)}\left(-\text{u}\right)^{-\text{n}}\space\text{du}\\
\\
&=\lim_{\text{k}\space\to\space0}\int\limits_{\ln\left(\text{k}\right)}^{-\ln\left(2\right)}\left(-1\right)^{-\text{n}}\cdot\text{u}^{-\text{n}}\space\text{du}\\
\\
&=\frac{1}{\left(-1\right)^\text{n}}\cdot\lim_{\text{k}\space\to\space0}\int\limits_{\ln\left(\text{k}\right)}^{-\ln\left(2\right)}\text{u}^{-\text{n}}\space\text{du}\\
\\
&=\frac{1}{\left(-1\right)^\text{n}}\cdot\lim_{\text{k}\space\to\space0}\left[\frac{\text{u}^{1-\text{n}}}{1-\text{n}}\right]_{\ln\left(\text{k}\right)}^{-\ln\left(2\right)}\\
\\
&=\frac{1}{\left(-1\right)^\text{n}}\cdot\lim_{\text{k}\space\to\space0}\left(\frac{-\ln^{1-\text{n}}\left(2\right)}{1-\text{n}}-\frac{\ln^{1-\text{n}}\left(\text{k}\right)}{1-\text{n}}\right)\\
\\
&=-\frac{1}{\left(1-\text{n}\right)\left(-1\right)^\text{n}}\cdot\lim_{\text{k}\space\to\space0}\left(\ln^{1-\text{n}}\left(2\right)+\ln^{1-\text{n}}\left(\text{k}\right)\right)\\
\\
&=-\frac{1}{\left(1-\text{n}\right)\left(-1\right)^\text{n}}\cdot\left(\ln^{1-\text{n}}\left(2\right)+\underbrace{\lim_{\text{k}\space\to\space0}\ln^{1-\text{n}}\left(\text{k}\right)}_{:=\space\mathscr{S}_\text{n}}\right)\\
\\
&=\frac{\ln^{1-\text{n}}\left(2\right)}{\left(\text{n}-1\right)\left(-1\right)^\text{n}}
\end{split}\tag3
\end{equation}
Now, if we take a look at the limit:
$$\mathscr{S}_\text{n}=\lim_{\text{k}\space\to\space0}\ln^{1-\text{n}}\left(\text{k}\right)\tag4$$
And we see that when $\text{n}>1$, we get:
$$\mathscr{S}_\text{n}=\lim_{\text{k}\space\to\space0}\ln^{1-\text{n}}\left(\text{k}\right)=0\tag5$$
And when $\text{n}=1$:
$$\mathscr{S}_1=\lim_{\text{k}\space\to\space0}\ln^{1-1}\left(\text{k}\right)=1\tag6$$

I'll let you figure out what happends when $\text{n}<1$.

