Showing posts with label rectangular coordinates. Show all posts
Showing posts with label rectangular coordinates. Show all posts

Thursday, 2 March 2017

The Gaussian Integral

By way of revising some earlier topics that I've covered and of practising my LaTeX skills, I'm covering the evaluation of the Gaussian Integral: $$ \int_{-\infty}^\infty e^{-x^2} \mathrm{d}x$$ $$ \text{Let } I= \int_{-\infty}^\infty e^{-x^2} \mathrm{d}x \,
\text{ and }  \,I= \int_{-\infty}^\infty e^{-y^2} \mathrm{d}y$$ $$ \text{Then } I^2=\displaystyle \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-(x^2+y^2)} \mathrm{d}x \,\mathrm{d}y$$ Changing to polar coordinates requires use of the Jacobian \(r\), treated after the evaluation of the integral: $$I^2= \int_0^\infty re^{-r^2} \mathrm{d}r \int_0^{2 \pi} \mathrm{d}\theta$$ $$I^2= 2\pi\int_0^\infty  r \, e^{-r^2} \mathrm{d}r$$ $$I^2= 2 \pi\, \left[ - \frac{1}{2} \, e^{-r^2} \right ]_0 ^ \infty=\pi $$ $$ \text{Therefore }I=\sqrt{\pi} \, \text{ and } \, \int_{-\infty}^\infty e^{-x^2} \mathrm{d}x=\sqrt{\pi}$$Now, about the Jacobian, let's suppose that \( x \) and \( y \) are functions of both \(u\) and \(v \), that is \( x=g(u,v) \) and \( y=h(u,v) \). The Jacobian is defined as: $$
\begin{equation}
\frac{\partial (x,y)}{\partial (u,v)} =
\left|
\begin{array}{cc}
\dfrac{\partial x}{\partial u}& \dfrac{\partial x}{\partial v} \\
\dfrac{\partial y}{\partial u}& \dfrac{\partial y}{\partial v} \\
\end{array}
\right|
\end{equation}$$ Let's work with the specific change from rectangular to polar coordinates that is used in the solution to the Gaussian Integral.

We have \(x=r \cos \theta \) and \(y=r \sin \theta\)

This means that \( \dfrac{\partial x}{\partial r}=\cos \theta \) and \( \dfrac{\partial x}{\partial \theta}=-r \sin \theta \)
Also \( \dfrac{\partial y}{\partial r}=\sin \theta \) and \( \dfrac{\partial y}{\partial \theta}=r \cos \theta \). Thus: $$
\begin{equation}
\frac{\partial (x,y)}{\partial (r,\theta)} =
\left|
\begin{array}{cc}
\cos \theta & -r \sin \theta \\
\sin \theta  &r \cos \theta\\
\end{array}
\right|
\end{equation}$$ The determinant evaluates to \(r \cos^2 \theta + r \sin^2 \theta=r \) (the value of the Jacobian).

The Gaussian Integral is closely connected with the normal distribution via the probability density function \( \phi (x)=\dfrac{1}{\sqrt{2 \pi}}e^{-\frac{1}{2}x^2} \), where $$\int_{-\infty} ^\infty \phi(x) \mathrm{d}x=\dfrac{1}{\sqrt{2 \pi}}\int_{-\infty} ^\infty e^{-\frac{1}{2}x^2} \mathrm{d}x =1$$ Wikipedia states that "in statistics one often uses the related error function, or \( \text{erf}(x) \), defined as the probability of a random variable with normal distribution of mean 0 and variance 1/2 falling in the range \( [-x,x] \)"; that is: $$\text{erf}(x)=\dfrac{1}{\sqrt{\pi}}\int_{-x}^x e^{-t^2} \mathrm{d}t$$Here is an informative video which explains why \( \pi \) appears as the evaluation of the integral. It also explains how the double integral used to evaluate the integral is two dimensional and is finding the volume under a surface. By using the shell method to evaluate the integral, the need for the Jacobian is avoided:

Saturday, 29 October 2016

Gaussian Integral, the Jacobian and the Gamma Function

To evaluate the Gaussian Integral requires the use of double integrals and the Jacobian for the change of variables from rectangular to polar coordinates. The following YouTube video gives a clear account of how this integral is evaluated:



The following video deals with the gamma function for value 1/2 (=1/2!) and the use of the above integral technique to evaluate it.



The final video is by the author of the second video and is an introduction to the gamma function. I'm just skimming the surface of things here but it's a start.