Improper integral of $\int_{0}^{\infty} \frac{x^p}{1+x}dx$ with$ -1I have a question, I need to solve the following equation:
$\int \limits_0^\infty \frac{x^p}{1+x}dx$
I can see that $x^p$ can be rewritten using $q\equiv -p$:
$\int \limits_0^\infty \frac{1}{x^q(1+x)}dx, 0<q<1$
There are two singularities, at $z=0$ and $z=-1$. Only $z=0$ is on the path, but what would be the best way to tackle this problem? I am stuck from here on...

Let rewrite the integral as
$$
\int_0^\infty\frac {x^{-p}}{1+x}dx,
$$
where $p$ is a real number. The integral converges if and only if $0<p<1$.
Now consider the following transformations:
$$\begin{align}
\int_0^\infty\frac {x^{-p}}{1+x}dx&=\int_0^1+\int_1^\infty\frac {x^{-p}}{1+x}dx\tag1\\
&=\int_0^1\frac {x^{-p}+x^{p-1}}{1+x}dx\tag2\\
&=\int_0^1(x^{-p}+x^{p-1})\left(\sum_{n\ge0}(-x)^n\right)dx\tag3 \\
&=\sum_{n\ge0}(-1)^n\int_0^1(x^{-p+n}+x^{p-1+n})dx\tag4\\
&=\sum_{n\ge0}(-1)^n\left[\frac1{-p+n+1}+\frac1{p+n}\right]\tag5\\
&=\sum_{n\ge0}\left[\frac{(-1)^{-n-1}}{p-n-1}+\frac{(-1)^n}{p+n}\right]\tag6\\
&=\sum_{n=-\infty}^\infty\frac{(-1)^n}{p+n}.\tag7
\end{align}$$
It can be proved in various ways that:
$$
\sum_{n=-\infty}^\infty\frac{(-1)^n}{p+n}=\frac\pi{\sin\pi p}.\tag8
$$
The simplest way is probably to use the Mittag-Leffler's theorem. Indeed both expressions in $(8)$ considered as functions of $p$ have the same set of simple poles at $p=n$ with residues $(-1)^n$.

Explanations:
$(1)\to(2)$: substitution $x\mapsto\frac1x$ into the second integral.
$(2)\to(3)$: geometric series expansion of $\frac1{1+x}$ $(0<x<1)$.
$(3)\to(4)$: the order of integration and summation are interchanged.
$(4)\to(5)$: powers are integrated (observe that both $-p+n+1$ and $p+n$ are positive for $n\ge0$).
$(5)\to(6)$: the factor $(-1)^n$ is moved to fractions. the numerator and denominator of first fraction are then negated.
$(6)\to(7)$: reindexing.

