Residue theorem and incomplete Gamma functions I am trying to compute the following integral:
$$I=\int_0^\infty dx \frac{x^m\, b^x}{x-p}\,$$
where $m\in\mathbb{N}\,,b\in (0,1),\,p<0$. At first, I tried to perform it as a contour integral and using residue theorem and expect to find $b^p p^m$, and if I have additional (possibly higher order) poles, to get a sum of the form$\frac{b^{p_i}p_i^m}{(p_i-p_j)^{n_i}}$ ($n_i$ the order of the pole at $p_i$). But when I check in Mathematica, it returns that the result is, up to a factor, an incomplete Gamma function
$$I\propto \Gamma(m+1,p\log[b])\,.$$
I while I see that the numerator can be put in the form of a $\Gamma$-function via a change of variable, I fail how the presence of the denominator allows one to put it in this form.
Moreover, sticking with the residue theorem, I would expect rather complete $\Gamma$-function to appear, using the contour to be the upper-half disk (i.e integration from 0 to infinity).
Is there a simple way to see the result from Mathematica? And can it be generalised to an arbitrary number of poles?
 A: I was reading a bit more about the residue theorem, and I don't think I can apply it here, or at least not in a straightforward manner, as the poles are on the negative real line, and therefore on the integration contour. Moreover the integrand is not even, so I can't just integrate on a half-circle and obtain what I wanted.
I however found a workaround that I post here for those who might be interested.
The integral above, even in the case of higher poles, can be written in terms of the the confluent hypergeometric function, $U(a,b,z)$:
$$\int_0^\infty dx \frac{b^x\, x^m}{(x-p)^n}=(-\log b)^{n-m-1}\,\Gamma(m+1)\,U(n,-m+n,p\log b)\,,$$
This result is obtained by using its integral representation and a change of variable. In the case $n=1$ we recover the incomplete $\Gamma$-function. If one considers additional poles, one can perform a partial fraction decomposition to get a linear composition of the formula above. The residues (without using complex analysis) are still useful to get the coefficients of the linear combination.
