<s>[INST] Integral Solution Technique Could somebody explain the processes in the following integral solution?
$$\int_{0}^{\infty}f(x)dx, $$
$\text{ where } f(x) = \frac{x^{3}}{\theta^{2}}e^{-x^{2}/(2\theta^{2})}$
$$\int_{0}^{\infty}\frac{x^{3}}{\theta^{2}}e^{-x^{2}/(2\theta^{2})}dx \dots (1)$$
$$= \int_{0}^{\infty}x^{2}e^{-x^{2}/(2\theta^{2})}d\frac{x^{2}}{2\theta^{2}} \dots (2)$$
$$= 2\theta^{2}\int_{0}^{\infty}ye^{-y}dy \dots (3)$$
$$= 2\theta^{2}\Gamma(2) \dots (4)$$
$$= 2\theta^{2} \dots (5)$$
More specifically, whilst it seems that the substitution $y = x^{2}/2\theta^{2}$ is made in line 2 (and made further explicit in line 3), why does the $x^{3}$ term become $x^{2}$ and why does the $\theta^{2}$ term in the denominator vanish?
Finally, how does the integral in line 3 evaluate to the gamma function with an argument of 2?
 [/INST] Doesn't answer the question, but I'd do:
$$
\int_0^\infty x^3 e^{- x^2 / 2 \theta^2} dx
$$
As Caran-d'Ache says, try to simplify the exponent. Try $y = x^2 / 2 \theta^2$,
that is $x = \theta \sqrt{2 y}$. When $x = 0$, $y = 0$; $x = \infty$ gives $y = \infty$. So :
$$
\begin{align*}
d x
  &= \theta \sqrt{2} \frac{d y}{\sqrt{y}} \\
x^3 e^{- x^2 / 2 \theta^2} 
  &= \left( \theta \sqrt{2 y} \right)^3 e^{-y} \\
\int_0^\infty x^3 e^{- x^2 / 2 \theta^2} dx
  &= \int_0^\infty \left( \theta \sqrt{2 y} \right)^3 e^{-y} 
        \cdot \theta \sqrt{2} \frac{d y}{\sqrt{y}} \\
  &= 2 \theta \int_0^\infty y e^{-y} d y
\end{align*}
$$
For the remaining integral, use integration by parts, $u = y$, $d v = e^{-y} dy$, so $du = dy$, $v = - e^{-y}$:
$$
\int_0^\infty y e^{-y} dy 
   = \left. - y e^{-y} \right|_0^\infty + \int_0^\infty e^{-y} d y = 1
$$
And the final result is:
$$
\int_0^\infty x^3 e^{- x^2 / 2 \theta^2} dx
 = 2 \theta
$$
</s>