## Thursday, 24 March 2011

### I've been missing.

Ok so since my university work has ramped up - I've had little time for blogging/let alone myself; thus the absence of interesting updates.

Hopefully, when my assignments are done I shall devote my time to making some more thought provoking posts.

But for now I'll leave you to ponder Russel's Paradox

Pre-reading: The following assumes that you are all familiar with a set, if not then put simply;
A set is a collection of objects.
Generally there will be a rule discerning whether an object is included in a set or not. for example;
A set of all shoe brands does not have colgate as a member (since colgate is a toothpaste brand).

The members of a set can also be sets themselves, for example;
The set of all forks is a member of the set of all cutlery.

Now make a proposal;
Let F be the set of all forks, F itself is not a fork therefore F does not contain itself as a member.
We can call F as a normal set.

Now suppose we have a set NF - this is the set of all things that are not forks. NF itself is not a fork, therefore it contains itself as a member. We can call NF an abnormal set.

Suppose we have a new set G - with all of its elements normal sets. Now, if G is normal then it should contain itself as a member - but the instant it contains itself, G becomes abnormal.

This is known as Russel's Paradox.

## Wednesday, 9 March 2011

### Integral of a Gaussian (continued)

Ok, so last post we derived (not so rigorously) that the integral of a standard Gaussian as;
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

and using a substitution of

$$x=\sqrt{a}y$$ and $$dx=\sqrt{a}dy$$
we obtain;$$\int_{-\infty}^{\infty} e^{-ax^2} dx = \sqrt{\frac{\pi}{a}}$$.

Now let's extend that to the more general form of;
$$I=\int_{-\infty}^{\infty} x^2 e^{-ax^2} dx$$ where a is some constant.

We can recognise (or at least be told to recognise) that the argument of the integral; $$x^2 e^{-ax^2}$$ is equal to
$$-\frac{\partial}{\partial a} e^{-ax^2}$$

Putting this together, we get;
$$I=\int_{-\infty}^{\infty}-\frac{\partial}{\partial a} e^{-ax^2} dx$$
We can swap the partial derivative and Integration sign (provided the variable we are integrating over is independent of a and the integrand is continuous)
We get; $$I= -\frac{\partial}{\partial a} \int_{-\infty}^{\infty} e^{-ax^2} dx = -\frac{\partial}{\partial a}\sqrt{\frac{\pi}{a}}$$
$$=\frac{1}{2a} \sqrt{\frac{\pi}{a}}$$
Therefore;  $$\int_{-\infty}^{\infty} x^2 e^{-ax^2} dx =\frac{1}{2a} \sqrt{\frac{\pi}{a}}$$

This technique can be extended for different powers of x - provided they are even.

## Tuesday, 8 March 2011

### Evaluating the integral of a Gaussian

Okay, so I thought I'd take a step back from the quite technical blog about finding the Volume of an n-sphere and look at some of the (often overlooked) techniques that were used.

First, is evaluating the following integral of a gaussian - which occurs very commonly in branches of physics and engineering;

$$I=\int_{-\infty}^{\infty} e^{-x^2} dx$$

Let's now have a look at what $$I^2$$ looks like;
$$I^2=\left(\int_{-\infty}^{\infty} e^{-x^2} dx\right)^2=\int_{-\infty}^{\infty} e^{-x^2}dx \cdot \int_{-\infty}^{\infty} e^{-x^2}dx$$
Now, using a dummy variable y in the second integral , we get;
$$I^2=\int_{-\infty}^{\infty} e^{-x^2}dx \cdot \int_{-\infty}^{\infty} e^{-y^2}dy$$
Note: We can use dummy variables since they are exactly that; a variable which is only used to integrate over and (presumably) does not appear in the evaluated integral.
We can bring the exponents together - the integrals are independent.
$$I^2=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2+y^2)}dxdy$$

Now we use a change of variable from cartesian coordinates to polar with;
$$x=rcos(\theta)$$ and
$$y=rsin(\theta)$$
With the determinant of the Jacobian matrix being $$r d\theta dr$$ and noting the change of terminals of integration.

Hence $$I^2=\int_{0}^{2\pi}\int_{0}^{\infty} e^{-r^2} r dr d\theta$$
Noting that nothing in the integrand depends on theta.
Now, letting $$u=r^2$$ we get $$\frac{du}{dr}=2r$$ so $$dr=\frac{du}{2r}$$
We get $$I^2= 2\pi \int_{u=0}^{u=\infty} e^{-u} r \frac{du}{2r}$$

Finally; $$I^2= \frac{2\pi}{2} \left[-e^{-u}\right]_{u=0}^{u=\infty}=\pi \left[-\left(e^{-\infty}-e^0\right)\right]=\pi$$

Hence $$I^2=\pi \rightarrow I=\sqrt{\pi}$$

Note: This isn't really a strict or rigorous derivation - as I just dealt with the Improper Integrals without taking limits and checking their convergence. This was intended just to get the general idea across.

To be continued...

## Monday, 7 March 2011

### The Volume of an n-sphere

Here I present a (fairly common) derivation for the volume of an n sphere.
Where an n-sphere is defined by
$S^n=\left\{x \epsilon \mathbb{R}^{n+1}: ||x||)=r\right\}$

We first start by calling on what we already know;

$V_{1}=2 \pi r$ for $S^0$ $V=\pi r^2$ for $S^{1}$ and $V=\frac{4}{3} \pi r^3$ for $S^2$ These can both be obtained most easily via usual methods of integrating in polar and spherical coordinates, respectively.

By inspection - and intuition - we should think that the volume is proportional to $r^{n+1}$ i.e some constant times r to the power of the dimension we are in.
Therefore we should expect that the formula for the volume of a sphere in m-dimensions looks a little like
$V_{m}=\nu_{m} r^m$
where $\nu_{m}$ is the constant of proportionality that we are after.
Hence the volume element (in m-dimensions and spherical coordinates) is given by; $dV_{m}= m \nu_{m} r^{m-1} dr$

Now this seems like a leap of faith, or unjustified - but let's take a look at some Gaussian Integrals;

$$I_m=\int \! e^{-\left(x_{1}^2+...+x_m^{2}\right)} dx_1....dx_m=$$ where the integral is over all of  $\mathbb{R}^m$
From our knowledge of a standard Gaussian Integral;
$I=\int_{- \infty}^{\infty} \! e^{-x^2} dx=\sqrt{\pi}$
and recognising the fact that the $x_i$ are independent, we can factorise the integral;
$$I_m=\int \! e^{-x_1^2} dx_1...\int \! e^{-x_m^2} dx_m = I^m$$
Therefore $$I_m=\sqrt{\pi}^m = \pi^\frac{m}{2}$$

Now, transforming into m-dimensional spherical coordinates so that;
$$x_1^2+....+x_m^2=r^2$$
Which gives $$I_m=\int \! e^{-r^2} dV_{m}$$
and using our definition for the spherical volume element we got before;
$$\int_{0}^{\infty} \! e^{-r^2} m\nu_m r^{m-1} dr=\pi^\frac{m}{2}$$
Taking out the variables which aren't dependent on r from the integrand we get;
$$I_m=m\nu_m \int_{0}^{\infty} \! e^{-r^2} r^{m-1} dr =\pi^\frac{m}{2}$$

You math geeks out there should recognise the form of the integral as somewhat close to the gamma function;
$$\Gamma(z+1)= \int_{0}^{\infty} u^{z}e^{-u} du$$
Now, substituting $$u=r^2$$ then $$\frac{du}{dr}=2r$$ or in terms of u; $$\frac{du}{dr}=2\sqrt{u}$$
$$V_m=\nu_m m \int_{0}^{\infty} e^{-u}\left(\sqrt{u}\right)^{m-1}\frac{1}{2\sqrt{u}} du$$

$$\pi^{\frac{m}{2}}=\frac{\nu_m m}{2} \int_{0}^{\infty}e^{-u} \left(\sqrt{u}\right)^{m-2} du$$
$$=\frac{\nu_m m}{2} \int_{0}^{\infty}e^{-u} u^{\frac{m}{2}-1} du$$
Which we can almost assimilate with the above form of the Gamma function;

A simple substitution provides us with;
$$\frac{m}{2}-1=z \rightarrow \frac{m}{2}=z+1$$
Hence $$\Gamma(z+1)= \int_{0}^{\infty} u^{z}e^{-u} du$$ becomes;
$$\Gamma(\frac{m}{2})=\int_{0}^{\infty} u^{\frac{m}{2}-1} e^{-u} du$$

Therefore; $$\pi^{\frac{m}{2}}=\frac{ \nu_m m \Gamma(\frac{m}{2}) }{2}$$

So putting it all together, we recover our unknown coefficient $\nu_m$;
$$\nu_m= \frac{\pi^\frac{m}{2}}{\frac{m}{2}\Gamma(\frac{m}{2})}$$

Or you can obtain an equivalent formula by looking at $$\Gamma(\frac{m}{2}+1)= \int_{0}^{\infty} u^{\frac{n}{2}} e^{-u} du$$ and integrating by parts to recognise that;
$$\Gamma(\frac{m}{2}+1)=\frac{m}{2}\Gamma(\frac{m}{2})$$
Hence putting it all together, we recover the Volume of an n-dimensional sphere of radius r as;

$$V_m=\frac{\pi^{\frac{m}{2}} r^m}{\frac{m}{2} \Gamma(\frac{m}{2})}$$

= $$\frac{\pi^\frac{m}{2} r^m}{\Gamma(\frac{m}{2}+1)}$$

Having done all that, it could be an interesting idea to see how the volume of the unit n-sphere changes as we increase the number of dimensions;
In dimension 2; $$V=\pi$$
In dimension 3; $$V=\frac{4}{3}\pi$$
.
.
.
and so on.
Below is a plot of volume vs dimension for the unit sphere - constructed using the volume formula we obtained above;

I find it quite amazing that there is a maximum! That is that there is a point (around n=5) that when you start adding dimensions to the sphere; its volume decreases!

Final Word:
It may not seem like there are any real world applications for the use of n-dimensional spheres, but there actually are! In statistical mechanics, a system of N independent particles may be confined to the surface or within a volume of an N dimensional sphere in phase space (due to energy considerations)- where here we don't think of N as spatial dimensions, but degrees of freedom. So when N becomes large (as it does in the thermodynamic limit) we are required to use the above formula and it is just as well that the volume decreases to zero as N becomes large, otherwise it would be indicating that the thermodynamic properties (which in general depend on the statistical behaviour of the particles) of our ensemble have would become infinite - which is an indication that something has gone wrong in the math!

## Friday, 4 March 2011

### Introduction to the blog world

This is my first ever blog! Hello!

I am currently enrolled in a Masters of Mathematics and Statistics - Majoring in Applied Maths and I intend to use this as a place where I can use $\LaTeX$
and write up some notes/workings outs from any problems that I'm working on.

This blog will also serve as a place to document some incoherent ramblings that fill my head from time to time.

But currently it will mostly be a playground for me to get familiar with $$\LaTeX$$.

For Example;
$$\Gamma(z)=\int_{0}^{\infty}t^{z-1}e^{-t}dt$$