Find the Values of $p$ and $q$ Such that the Improper Integral Converges I have a partial solution only so far.  The integral is $$\int_0^{1/2} x^p(-\ln x)^q dx$$
With the substitution $-\ln x = y$, then $u = (p+1)y$, we get something like the gamma function:
$$(1+p)^{–q-1} \int_{(1+p)\ln 2}^{\infty} e^{-u}u^{\space q} du$$
If $p > \space –1$, then the integral converges for all values of $q$.  Suppose that I am doing this via comparison, what can I compare to?
If $q ≤ 0$, $(–\ln x)^q ≤ 1$ for all $x \in (0, \frac{1}{e})$.  Then, since $\int_0^{1/e} x^p dx $ converges, our original integral converges. I am stuck with the case where $q > 0$.  What can I compare $ x^p(-\ln x)^q$ to?
 A: My thoughts don't constitute a full answer, but may help to get something out.
$\newcommand{\dx}{\,\mathbb d x}$
\begin{align*} \int x^p \left( -\log x \right)^q \dx &= \frac1{p+1} x^{p+1}\left( -\log x \right)^q - \frac{q}{p+1}\int x^{p+1}\left( -\log x \right)^{q-1}\frac{-1}{x}\dx \\ &= \frac1{p+1} x^{p+1-q}\left( -x\log x \right)^q + \frac{q}{p+1}\int x^p\left( -\log x \right)^{q-1}\dx \end{align*}
Since $$\lim_{x \to 0}x \log x = 0$$all the $\log 0$ terms disappear (assuming $p,q \in \mathbb N$) when $p+1 \ge q$ and $p \ne -1$.
A: If you already learnt the incomplete $\Gamma$ function, you could be able to show that $$\int x^p(-\ln x)^q dx=\log (x) (-\log (x))^q ((-p-1) \log (x))^{-q-1} (-\Gamma (q+1,(-p-1) \log (x)))$$ which can simplify to  $$\int x^p(-\ln x)^q dx=(-\log (x))^{q+1} E_{-q}((-p-1) \log (x)) $$ so $$\int_0^{1/2} x^p(-\ln x)^q dx=\log ^{q+1}(2) E_{-q}((p+1) \log (2))$$ provided that $\Re(p)>-1$ This integral seems to converge for any value of $q$.
A: To answer your first question, suppose that p>-1, and q>0. Then, we know that 
$$
\lim_{ x \to 0 } | \log x|^qx^\delta=0, \text{ for every }\delta>0.
$$
That is, there is a $C_\delta >0$ such that $| \log x |^q \leq C_\delta x^{-\delta}$, for every $x \in (0,1/2)$. Choose $\delta = ( p + 1 )/2 > 0$, and note that in this case $$
x^p | \log x |^q \leq C_\delta x^{ p - \delta }=C_\delta x^{ (p - 1)/2}.
$$
Since $p>-1, (p-1)/2 > -1 $, and the integral converges. 
As you point out, when $p<-1$, the integral diverges for every value of $q$. For $p = -1$, the integral diverges (again by comparison) if $q >= 0$. So, lets consider the case $p=-1, q<0$, and let $r = - q>0$. In that case, 
$$
\int_0^{1/2}\frac{1}{x|\log x|^r}dx = \int_{\log 2}^\infty\frac{1}{x^r}dx,
$$
which is convergent when $r \in (0,1)$. 
So the integral converges when $p>-1$, or when $p=-1$ and $q \in (-1,0)$.
