Thursday, October 30, 2014

Clever integration tricks

Today I want to talk about a clever integration trick I learned from Achim Kempf at DICE2014. Any mathematical physicist learns clever integration tricks and one of my personal favorite is how to compute:

\(I = \int_{-\infty}^{+ \infty} e^{-x^2} dx \) 

because there is no elementary primitive function since the integral comes from the Gaussian (normal) distribution. However one can still compute the integral above quite easily by going to a 2-dimensional plane and considering the \( y \) integral as well: \(\int_{-\infty}^{+ \infty} e^{-y^2} dy \) which is \( I\) again .


\(I ^2 = \int_{-\infty}^{+ \infty}\int_{-\infty}^{+ \infty} e^{-x^2} e^{-y^2} dx dy  = \int_{-\infty}^{+ \infty}\int_{-\infty}^{+ \infty} e^{-(x^2 + y^2)} dx dy \)

and the trick is to change this to polar coordinates:

\( x^2 + y^2 = r^2\) and \( dx dy = rdr d\theta\)

integration by \( \theta\) is a trivial \( 2 \pi\), and the additional \( r \) allows you to find the primitive and integrate from \(0 \) to \( \infty\).

But how about not having to find a primitive at all? Then one can try Achim's formula:

\( \int_{\infty}^{\infty} f(x) dx = 2 \pi f(-i\partial_x ) \delta (x) |_{x=0}\)

It's a bit scary looking

Happy Halloween!

but let's first prove it:

\( 2 \pi f(-i \partial_x) \delta(x) |_{x = 0} = f(-i \partial_x)  \int_{-\infty}^{+\infty} e^{ixy} dy |_{x = 0}\)

due to a representation of \( \delta (x)\):

\( \delta (x) = \frac{1}{2 \pi} \int_{-\infty}^{+\infty} e^{ixy} dy \)

Moving \( f(-i \partial_x) \) inside the integral makes this \( \int_{-\infty}^{+\infty} f(y) e^{ixy} dy |_{x = 0} \). Why? Expand \( f \) in Taylor series and apply the powers of \( -i \partial_x \) on \( e^{ixy} \) resulting into the powers of \( y \). Then recombine the Taylor series terms in \(f(y) \). Finally compute this for \( x = 0 \) which kills the exponential term and you are left only with \( \int_{-\infty}^{+\infty} f(y) dy\) and the formula is proved.

So now let's see this formula in action. Let's compute this:\( \int_{-\infty }^{+\infty} \frac{sin x}{x} dx\):

\( \int_{-\infty }^{+\infty} \frac{sin x}{x} dx = 2 \pi sin(-i \partial_x) \frac{1}{-i\partial_x} \delta(x) |_{x = 0} = \)
\( = \frac{2 \pi}{-i} \frac{1}{2i} (e^{\partial_x} - e^{-\partial_x}) (\theta(x) + \epsilon) |_{x = 0}\)

Now we can use Taylor to prove that \( e^{a \partial_x} f(x) = f(x+a) \) and from this the integral becomes:

\( = \pi (\theta(x+1) - \theta(x-1) +c - c)|_{x=0} = \pi (1 - 0 + 0) = \pi\)

So what is really going on in this formula? If we start with another representation for the Dirac delta:

\( \delta(x) = \lim_{\sigma \rightarrow 0^{+}} \frac{1}{\sqrt{\pi \sigma}} e^{-\frac{x^2}{\sigma}}\)


\(\int_{-\infty}^{+\infty} f(x) dx = \lim_{\sigma \rightarrow 0^{+}} 2 \sqrt{\frac{\pi}{\sigma}} e^{\frac{{\partial_x}^2}{\sigma}} f(x) |_{x=0}\)

The exponential term is a Gaussian blurring which flattens \( f(x) \), and is in fact a heat kernel because a heat equation is actually a convolution with a Gaussian. Also the limit sigma goes to zero or equivalently one over square root of sigma goes to infinity would physically correspond to the temperature going to zero. 

However something does look fishy in the formula. How can the integral of a function which includes the values over the entire domain be identical with a a formula containing only the value of \( f\) in only one point \( x = 0\) ? It does not! This is because \( e^{\frac{\partial_{x}^{2}}{\sigma}}\) acts nonlocally because \( e^{\frac{\partial_{x}^{2}}{\sigma}}f(x) \) is a convolution! 

More can be said, but it is a pain to typeset the equations and the interested reader should read Enjoy.

No comments:

Post a Comment