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?

The main idea is to change the variable $x$ in such a way to simplify the integral. In this case it will be succeeded if the exponent has the simplest power. So in step $(1)$ variable $x^3$ is split into $x^2$ (which you see in step $(2)$) and $x$ which is carried under the differential sign to get $x^2$ under it, because $\,{\rm d}{x^2}=2x\,{\rm d}x$. $\theta$ is a constant, so it goes under the differential sign too. Then the change of variable is performed: $y=\frac{x^2}{2\theta}$ (for the new variable the integration bounds do not change). In step $(3)$ we see the definition of the Gamma function: $\Gamma(z) = \int_0^\infty y^{z-1} e^{-y}\,{\rm d}y$ with $z=2$. So the answer is $\Gamma(2)$.
• Right, but a messy way of doing it. Just say you want to do $y = x^2 / 2 \theta^2$, carry out the variable change. And why the useless detour though $\Gamma$, the last integral is easy enough to integrate by parts. I'd go looking for a clearer text... – vonbrand Mar 31 '13 at 15:58
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$$