# On the beauty of Parametric Integration and the Gamma function

Parametric integration is one such technique that once you are made aware of it, you will never for the love of god forget it. Let me demonstrate :

Now this integral might seem familiar to many of you and to evaluate it is rather simple as well.

$\int\limits_0^{\infty} e^{-sx} dx = \frac{1}{s}$

Knowing this you can do lots of crazy stuff. Lets differentiate this expression wrt to the parameter in the integral – s (Hence the name parametric integration ). i.e

$\frac{d}{ds}\int\limits_0^{\infty} e^{-sx} dx = \frac{d}{ds}\left(\frac{1}{s}\right)$

$\int\limits_0^{\infty} x e^{-sx} dx = \frac{1}{s^2}$

Look at that, by simple differentiation we have obtained the expression for another integral. How cool is that! It gets even better.
Lets differentiate it once more:

$\int\limits_0^{\infty} x^2 e^{-sx} dx = \frac{2*1}{s^3}$

$\int\limits_0^{\infty} x^3 e^{-sx} dx = \frac{3*2*1}{s^4}$

$\vdots$

If you keep on differentiating the expression n times, one gets this :

$\int\limits_0^{\infty} x^n e^{-sx} dx = \frac{n!}{s^{n+1}}$

Now substituting the value of s to be 1, we obtain the following integral expression for the factorial. This is known as the gamma function.

$\int\limits_0^{\infty} x^n e^{-x} dx = n! = \Gamma(n+1)$

There are lots of ways to derive the above expression for the gamma function, but parametric integration is in my opinion the most subtle way to arrive at it. 😀