## Archive for the ‘**Mathematics**’ Category

## Fun with Homology

There is a theorem (currently being attributed to Wikipedia, but I’m sure I can do better given more time) which states that

*All closed surfaces can be produced by gluing the sides of some polygon and all even-sided polygons (2n-gons) can be glued to make different manifolds.*

*Conversely, a closed surface with non-zero classes can be cut into a 2n-gon.*

Two interesting cases of this are:

- Gluing opposite sides of a hexagon produces a torus .
- Gluing opposite sides of an octagon produces a surface with two holes, topologically equivalent to a torus with two holes.

I had trouble visualizing this on a piece of paper, so I found two videos which are fascinating and instructive, respectively.

**The two-torus from a hexagon**

**The genus-2 Riemann surface from an octagon**

I would like to figure out how one can make such animations, and generalizations of these, using Mathematica or Sagemath.

There are a bunch of other very cool examples on the Youtube channels of these users. Kudos to them for making such instructive videos!

PS – I see that $\LaTeX$ on WordPress has become (or is still?) very sloppy! 😦

## Why V(x) = -1/x^2 has no bound state

Here we present a scaling-based argument to show that the attractive potential

(), has no bound states (i.e. states with energy E < 0). Consider the Time Independent Schrodinger equation for this potential, which is the eigenvalue equation for the corresponding Hamiltonian,

This can be rearranged as

Now, it is easy to see that the quantity

is **dimensionless**. So, this problem has no independent scale, even though naively one might think that specifies a scale for this problem. We claim that for such a system, there can be no bound state. This is proved below.

Suppose we perform the scale transformation where is some nonzero real number, we see from the equation above that if is an eigenvalue, then so is .

Suppose now that a bound ground state exists, with energy . By definition . Then scale invariance implies that must also be the energy of some bound state. But

as multiplying the negative ground state energy by a positive number only makes it more negative. This contradicts the fact that the ground state has energy . In fact, we can make a stronger statement, viz. the ground state energy can be made as small as we want. Therefore, there is no finite energy ground state for this system, and consequently there can be no bound states.

Note that there is no such problem with *scattering states*, i.e. states with positive energy. One can take an arbitrarily small positive energy scattering state and from it obtain valid energies of the continuum of higher energy scattering states by performing a scale transformation.

Incidentally, this is why potentials like and also have no bound states.

## Evaluation of Complex Error Functions erf(z) using GSL/C

For a small QFT calculation, I needed to numerically evaluate the imaginary error function erfi(x) = erf(i x). But it turns out that GSL (and most other numerical recipe code I could find) can only deal with erf(x), where x is real. Here’s a poor man’s implementation of erf(z) through a standard Taylor expansion,

The catch here is to deal with propagation of errors in the *complex* Taylor series, and to also somehow benchmark the results. Well, I haven’t been able to think about this yet, but I was able to confirm that for **real** arguments, my Taylor series code is about as good as the GSL error function gsl_sf_erf(x).

I am working on a CUDA implementation of this now, because in my project, I need to perform a numerical integration over the error function, which is quite intensive even for Mathematica. For now, I’m just sharing the serial implementation. (**Hint**: if you can write wrapper for each of the gsl functions inside my Taylor series calculating method, you can embed them within a __global__ kernel call through a struct. Alternatively — and less fun — you can just parallelize the for loop.)

/* Function to compute erf(z) using a Taylor series expansion /* Author: Vivek Saxena /* Last updated: January 28, 2011 21:11 hrs */ #include <gsl/gsl_complex_math.h> #include <gsl/gsl_sf_erf.h> #include <gsl/gsl_sf_pow_int.h> #include <gsl/gsl_sf_gamma.h> #include <stdio.h> #define PI 3.1415926543 double cz = 2/sqrt(PI); const int TERMS = 10; // no of terms to use in the Taylor series gsl_complex erfTaylor( gsl_complex z, int trunc ){ gsl_complex res = gsl_complex_rect(0,0), num = gsl_complex_rect(0,0), den = gsl_complex_rect(1,0), snum = gsl_complex_rect(1,0), temp = gsl_complex_rect(0,0); for(int i = 0; i < trunc; i++){ snum = gsl_complex_rect( cz * gsl_sf_pow_int(-1, i), 0 ); num = gsl_complex_mul(snum, gsl_complex_pow_real(z, 2*i+1)); den = gsl_complex_rect((2*i + 1)*gsl_sf_fact(i),0); temp = gsl_complex_div(num, den); res = gsl_complex_add(res, temp); } return res; } int main ( void ){ printf( "Real error function\n\n"); for ( float i = 0; i <= 1; i += 0.01 ){ float gslerror = gsl_sf_erf(i); float taylor = GSL_REAL( erfTaylor( gsl_complex_rect(i, 0), 10 ) ); printf("erf(%f): gsl = %f, taylor = %f, mag error = %f\n", i, gslerror, taylor, abs(gslerror-taylor)); } gsl_complex t, arg; printf( "\n\nImaginary error function\n\n"); for (float i = 0; i <= 1; i += 0.01 ){ /* this would be your generic argument z in erf(z). * so if z = x + iy, then * arg = gsl_complex_rect(x, y); */ arg = gsl_complex_rect(0, i); t = erfTaylor( arg, TERMS ); printf("erf(%f + i %f) = %f + i %f\n", GSL_REAL(arg), GSL_IMAG(arg), GSL_REAL(t), GSL_IMAG(t)); } return 0; }

## Cadabra – a Computer Algebra System for field theory

This seems very exciting:

Cadabra is a computer algebra system (CAS) designed specifically for the solution of problems encountered in field theory. It has extensive functionality for tensor computer algebra, tensor polynomial simplification including multi-term symmetries, fermions and anti-commuting variables, Clifford algebras and Fierz transformations, implicit coordinate dependence, multiple index types and many more. The input format is a subset of TeX. Both a command-line and a graphical interface are available.

Source: http://cadabra.phi-sci.com/

There are two interesting papers on this. The first is a semi-technical overview, and the other (hep-th/0701238) is a more comprehensive one geared towards an audience familiar with various problems in modern field theory. The abstract of the second paper reads:

## Introducing Cadabra: a symbolic computer algebra system for field theory problems

Authors: Kasper Peeters(Submitted on 25 Jan 2007 (v1), last revised 14 Jun 2007 (this version, v2))Abstract: Cadabra is a new computer algebra system designed specifically for the solution of problems encountered in field theory. It has extensive functionality for tensor polynomial simplification taking care of Bianchi and Schouten identities, for fermions and anti-commuting variables, Clifford algebras and Fierz transformations, implicit coordinate dependence, multiple index types and many other field theory related concepts. The input format is a subset of TeX and thus easy to learn. Both a command-line and a graphical interface are available. The present paper is an introduction to the program using several concrete problems from gravity, supergravity and quantum field theory.

Source = http://arxiv.org/abs/hep-th/0701238

## Gaussian Integrals and Wick Contractions

**Theorem 1: **For nonzero real ,

**Theorem 2**: For a real symmetric matrix , a real vector and a real vector , we have

**Proof:**

Define to be the real orthogonal matrix which diagonalizes to its diagonal form . That is,

where . Further, let us choose to be a special orthogonal matrix, so that . Also, define . Now,

The argument of the exponential is

which equals

The first term is

Let (that is, ). So the second term is

So the argument of the exponential becomes

which can be written as

The integrand becomes

Hence the quantity to be evaluated is

The quantity in curly brackets involves definite Gaussian integrals, the term of which is

using the identity .

So the continued product is

whereas the exponential factor sticking outside is

This completes the proof.

**Theorem 3**:

**Proof**: If is the number of terms in , differentiate the identity proved in Theorem 2 above times with respect to each of .

As an example, differentiate the RHS of the identity in Theorem 2 with respect to . The derivative is

the prefactor of the exponential is

which becomes

using the fact that is symmetric. Repeating this exercise, we see that bringing down involves differentiating with respect to , and effectively introduces a matrix element of . It is obvious by induction that the sum must run over all possible permutations of matrix indices of . That is, the sum must run over every possible permutation of pairing the indices . This completes the “proof”.

## A lemma on a rather frequently encountered set of Hermitian matrices

I’m documenting a small ‘lemma’ that I think is worth mentioning. Suppose are 4 Hermitian matrices () satisfying

where denotes the identity matrix. Then these matrices have eigenvalues , are traceless and are necessarily of even dimension.

For , the anticommutator above gives . So, for any eigenvector and eigenvalue , we have

or equivalently .

Traceless-ness has a neat proof:

Suppose . Then

where the last equality follows from . But , so

.

Finally, suppose the numbers of +1 eigenvalues and -1 eigenvalues are and respectively. The dimension of the matrix is then . Since the trace equals the sum of eigenvalues, we have

So, the dimension is , which is clearly always an even number.

## Group Theory II – SU(2)

In a previous post, I cursorily touched upon the standard orthogonal and unitary groups. It turns out that in quantum mechanics, the operators of principal interest are either Hermitian or unitary. So it is only natural that we should be interested in transformations from the Special Unitary Group . In particular, we dwell on the case.

First of all, has 3 independent parameters, something that is obvious if one demands that a matrix ,

be unitary, that is

and have a determinant equal to . It follows that any such matrix can be written as

in which there are three independent parameters. If is expanded about the identity, i.e.

then unitarity of demands that be Hermitian, and also **traceless**. For a finite transformation, this generalizes to

That is more generally, implies that for . So, is a traceless matrix.

We can write

From nonrelativistic quantum mechanics, we know that the effect of a rotation through an angle on a spin-1/2 particle about an axis is given by the unitary matrix,

where is the Pauli spin matrix “vector” given by,

Clearly, in this development, we can identify for as the **generators** of the group. The commutation relation for the generators is

This is called the * fundamental representation of *. An -dimensional representation of consists of unitary matrices satisfying such commutation relations.