Definite integral $\int_0^\infty e^{-y}e^{-xy}y^2dy$ I successfully solved the following integral of $\int _0^\infty e^{-y}e^{-xy}y^2dy$ by using partial integration two times, which was pretty hell long, and since solving this integral was not the main issue in the exercise I was doing, I wondered if there's an easier way to integrate it. Is there?
Thanks!
(btw my result was $\frac{2}{(x+1)^3}$)
P.S I am not familiar with gamma functions or anything beyond "common B.SC calculus".
 A: \begin{align}
\int_0^\infty e^{-(1+x)y}y^2dy &= \frac{d^2}{dx^2}\int_0^\infty e^{-(1+x)y}dy 
\\
&= \frac{d^2}{dx^2}\frac{1}{(1+x)}e^{-(1+x)y}\bigg|_0^\infty 
\\
&= \frac{d^2}{dx^2}\frac{1}{(1+x)} 
\\
&= \frac{2}{(1+x)^3}
\end{align}
A: To prove by induction that $\int_0^\infty y^n e^{-zy}dy=\frac{n!}{y^{n+1}}$ (for $\Re z>0$), note that $$\int_0^\infty e^{-zy}dy=\frac{1}{z},\,\int_0^\infty y^{n+1} e^{-zy}dy=-\partial_z\int_0^\infty y^{n+1} e^{-zy}dy.$$For your stated problem, you only need to differentiate the base case twice; the induction is in case you want to generalise it.
A: Since your questions are related to random variables, this answer uses an exponential RV to compute the integral. Note that for an exponential RV, $Y$, with pdf
$$f(y) = \lambda e^{-\lambda y}, \quad \lambda,y>0,$$
we have
$$E[Y] = \frac{1}{\lambda},$$
$$var(Y) = \frac{1}{\lambda^2} \implies E[Y^2] = \frac{2}{\lambda^2}.$$
That is,
$$\lambda\int_0^{\infty} y^2 e^{-\lambda y} dy = \frac{2}{\lambda^2} \implies \int_0^{\infty} y^2 e^{-\lambda y} dy = \frac{2}{\lambda^3}.$$
Can you guess $\lambda$ in your problem?
A: Try separating the integral like this 
$$\int _0^\infty e^{-y(x+1)}y^2dy=\int _0^1 e^{-y(x+1)}y^2dy+\int _1^\infty e^{-y(x+1)}y^2dy$$
you can see that the first integral is a proper one hence the integral converges.
For the second one try taking the cases when $x+1 \lt0 $, $x+1 =0$  and $x+1 \gt0$ 
for $x+1 \gt0$  from $$\lim_{y\to \infty}\frac{e^{-y(x+1)}y^2}{\frac{1}{y2}}=0$$  this implies that $$\int _1^\infty e^{-y(x+1)}y^2dy\le\int _1^\infty \frac{1}{y^2}dy$$
the last integral converges, from the comparison test so will the integral  $\int _1^\infty e^{-y(x+1)}y^2dy$
Can you try the other cases?
A: $I(x) = \int_0^{\infty} e^{-y}e^{-xy}y^2 dy$
Integration under the integral
$I(x) = \frac {d}{dx} \int_0^{\infty} e^{-y}y^2(\int e^{-xy}\ dx) dy = \frac {d}{dx}\int_0^{\infty} e^{-y(1+x)}y\ dy$
And one more time.
$I(x) = \frac {d^2}{dx^2}\int_0^{\infty} e^{-y(1+x)} dy = \frac {d^2}{dx^2}\frac {1}{1+x} = \frac {1}{2(1+x)^3}$
