$$\int_0^\infty {x^2}{ e^{-3x}}\,dx$$
What I attempted was integration by parts twice, but I end with $-\frac{2}{27}$. That's obviously wrong, should be positive. I am also unsure whether or not $$\lim_{t\to \infty} \frac{t^2}{e^{3t}}$$ converges to 0 or not.
Given $$\int_0^\infty x^2e^{-3x}\ dx$$
First compute without boundaries.
By applying u-substitution: $u=-3x$, we get $$=-\dfrac{1}{27}\int e^uu^2\ du$$ By applying Integration by parts $u=u^2,v^{\prime}=e^u$, we get $$-\dfrac{1}{27}(u^2e^u-\int2ue^u\ du)=-\dfrac{1}{27}(9e^{-3x}x^2+6e^{-3x}+2e^{-3x})$$ Now apply the boundaries $$\left[-\dfrac{1}{27}(9e^{-3x}x^2+6e^{-3x}+2e^{-3x})\right]_0^\infty=0-\left(-\dfrac{2}{27}\right)=\dfrac{2}{27}$$ By L hospitals rule $\lim_{x \to \infty} e^{-3x}x^2 = \lim\frac{x^2}{e^3} =\lim\frac{2x}{3e^3}= \lim\frac{2}{9e^3}=0$