# Integrate this expression involving exponential and polynomial $\int_0^\infty\frac{\lambda^{n}e^{-\lambda}}{(\lambda + b)^2}\, \text{d}\lambda$

I tried a few ways (integral by parts, expanding), but I'm unable to compute this integral.

$$\int_0^\infty\frac{\lambda^{n}e^{-\lambda}}{(\lambda + b)^2}\, \text{d}\lambda$$

$n \geq 0, b \geq 0$

• Whether it is helpful or not, I see the $\lambda^ne^{-\lambda}$ and think Gamma function. – Ethan Hunt Apr 19 '16 at 14:56
• What are $b$, $n$? – Yuriy S Apr 19 '16 at 15:15
• Basically I am trying to find the marginal likelihood of poisson (rate parameter) with the prior $(\lambda +b)^{-2}$. n is the number of events observed. – akashrajkn Apr 19 '16 at 15:46

If $n$ is a non-negative integer you can put $\mu = \lambda + b$ so that the integral becomes $$e^b \int_b^{\infty} \frac{(\mu-b)^n e^{-\mu}}{\mu^2} d\mu = e^b \sum_{k=0}^n \binom{n}{k}(-b)^{n-k} \int_b^{\infty} \mu^{k-2} e^{-\mu} d\mu$$ Then, except for when $k=0$ or $1$, the integrals in the sum can be solved using integration by parts whereas $$\int_b^{\infty} \frac{e^{-\mu}}{\mu}d\mu = -\text{Ei}(-b) \,\,\,,\,\,\, \int_b^{\infty} \frac{e^{-\mu}}{\mu^2}d\mu = \text{Ei}(-b) + \frac{e^{-b}}{b}$$
• The integrals in the sum represent the Incomplete Gamma functon, namely $$\int_b^{\infty} \mu^{k-2} e^{-\mu} ~d \mu=\Gamma(k-1,b)$$ – Yuriy S May 5 '16 at 14:21
Even for $n=0$, the integral requires special functions, see Wolfram Alpha, so there probably is no simple way of computing it.
For $n=0$, the result is $$-e^b \text{Ei}(-b-\lambda )-\frac{e^{-\lambda }}{b+\lambda }$$