# Find the Values of $p$ and $q$ such that $\int_0^{\infty} x^p\ln(1+x)^q dx$ Converges or Diverges.

The question is to find the value values of $$p$$ and $$q$$ such that the improper integral converges or diverges. My friend indeed found some values of $$p$$ and $$q$$ such that it converges, but after many trials, I am still getting divergent for all values. Via L'Hospital, we have the following:

$$\lim_{x \to 0} x^c\ln(1+x)^q = \infty \space \text{when} \space c < 0$$ $$\lim_{x \to 0} x^c\ln(1+x)^q = 0 \space \text{when} \space c > 0$$ $$\lim_{x \to \infty} x^c\ln(1+x)^q = \infty \space \text{when} \space c > 0$$ $$\lim_{x \to \infty} x^c\ln(1+x)^q = 0 \space \text{when} \space c < 0$$

Thus, $$\int_1^{\infty} x^p\ln(1+x)^q dx = \int_1^{\infty} x^{p-c}x^c\ln(1+x)^q dx > \int_1^{\infty} x^{p-c} dx$$ which diverges when $$p > -1$$. Here, we set $$c = \frac{1}{2}(p+1) > 0$$. On the other hand, $$\int_0^1 x^p\ln(1+x)^q dx = \int_0^1 x^{p-c}x^c\ln(1+x)^q dx > \int_0^1 x^{p-c} dx$$ which diverges when $$p < -1$$. Here, we set $$c = \frac{1}{2}(p+1) < 0$$. Thus, the integral diverges whenever $$p \ne –1$$. Then, let $$p = -1$$.

$$\int_0^{\infty} \frac{1}{x}\ln(1+x)^q dx = \int_0^1 \frac{1}{x}\ln(1+x)^q dx + \int_1^{\infty} \frac{1}{x}\ln(1+x)^q dx$$ $$\ge \int_0^1 \frac{1}{x+1}\ln(1+x)^q dx + \int_1^{\infty} \frac{1}{x+1}\ln(1+x)^q dx$$

The first summand diverges when $$q < -1$$ and the second diverges when $$q > -1$$. Finally, let $$p = -1$$ and $$q = -1$$. The integral $$\int_0^{\infty} \frac{1}{x\ln(1+x)} dx ≥ \int_0^{\infty} \frac{1}{(x+1)\ln(1+x)} dx$$ diverges on both ends. Did I make a mistake?

The result seems correct, but check the limits for $x\to 0$.
$\int_1^{+\infty} x^p \log^q (1+x)dx$ diverges if $p>-1$, $\int_0^{1} x^p \log^q (1+x)dx$ diverges if $p<-1$, independently of $q$.
It remains $p=-1$.
$\int_1^{+\infty} x^{-1}\log^q (1+x)dx$ diverges if $q\geq -1$. Note that for small $x$ the behavior of $\log(1+x)\sim x$, hence
$$\int_0^{1} x^{-1}\log^q (1+x)dx\sim \int_0^{1} x^{-1}x^q dx,$$ which diverges for any $q\leq 0$.