I was interested in calculating $E\left(\dfrac{1}{1-X}\right)$ where $X\sim$ Gamma ($n,\lambda$), but I wasn't able to solve the associated integral using standard integration techniques.
$$E\left(\dfrac{1}{1-X}\right)=\frac{\lambda^n}{\Gamma(n)}\int_{0}^{\infty}\frac{1}{1-x}x^{n-1}e^{-\lambda x}\,dx.$$
I know $\int_0^\infty x^{n-1}e^{-\lambda x}\,dx=\frac{\Gamma(n)}{\lambda^n}$ but the $\frac{1}{1-x}$ term throws me off.
How can I calculate this expected value?