Feynmann's technique for Gamma-like integrals


In mathematical statistics and probability theory, integration of the form that resembles gamma function arises time to time if not frequently:

$\Gamma(k;\theta):=\int_0^\infty x^{k-1}e^{-\theta x}dx,~ k\in\mathbb N.$

If $\theta=1,$ then it is the gamma function. The notation $\Gamma(k;\theta)$ is not a standard one. I wanted to make relationship with gamma function clear.

I recently encountered this form (with $k=3$) when trying to compute variance of standard logistic distribution. Without second thoughts, I applied integration by parts to solve it1. Although integration by parts solved the problem, unfolding the integral revealed its recurring form, which means it can be computed in much easier way1. However, trying to derive the general form for any values of $k$ using integration by parts was a lot of labor.

It turns out, the famous Feynmann’s integral trick can be applied (and proved) to this form without a hassle.

First, let the integral of exponential part as a function in $\theta.$ That is, denote integral by

$I(\theta) = \int_0^\infty e^{-\theta x}dx = \left[-\frac1\theta e^{-\theta x}\right]_0^\infty = \frac1\theta. \label{1}\tag{1}$

Second, observe that differentiating $I(\theta)$ multiple times with respect to $\theta$ yields the integral we wants to solve. This is because the integrand and its derivative is continuous in both $\theta$ and $x$ so that by the Leibniz rule we can interchange integration and differentiation.

\begin{aligned} \frac{\partial^{k-1}}{\partial\theta^{k-1}}I(\theta) &= \int_0^\infty \frac{\partial^{k-1}}{\partial^{k-1} \theta} e^{-\theta x} dx \\ &= \int_0^\infty (-1)^{k-1} x^{k-1} e^{-\theta x}dx \\ &=\begin{cases} \Gamma(k;\theta),& \text{k is odd} \\ -\Gamma(k;\theta),& \text{k is even} \end{cases} \end{aligned}

Finally, link this with the fact $\eqref{1}.$ We can easilly achieve the following.

$\Gamma(k;\theta) = (k-1)!\frac{1}{\theta^k}.$
1. In fact, it is so much easier to solve it using integration by substitution. Substitute $y=\theta x$ then we can evaluate the integral as $\Gamma(k)/\theta^k$​ which is the same as from the Feynmann’s trick. It is just over by that.. but hey, at least we get another solution to the problem that does not require knowledge of the form of gamma function!  2