Note: this is a work-in-progress. Source code, when considered to be sufficiently stable, will be provided through the open-source Maxima project at maxima.sourceforge.net.
In 1919, Theodor Kaluza proposed an extension to general relativity: using an appropriately constructed fifth dimension, he was able to incorporate electromagnetism into Einstein's theory of gravity. Recently, I endeavored to replicate the most basic of Kaluza's results: the equation of motion for a particle in empty dive-dimensional space, as seen from a four-dimensional perspective.
Now that I am working with Maxima, the question arose: can the same result be reproduced using this computer algebra system?
The answer, surprisingly, is a yes. Well, sort of. Some minor modifications were needed to the itensor package, nothing Earth-shattering really, the changes are probably best described as bug fixes. (If you're a Maxima user, these changes are not yet in the CVS version. Soon...)
One of the key features of the itensor package is the ability to define components of a symbolic tensor in an algorithmic fashion. For instance, you could specify the covariant and contravariant components of the tensor G like this:
While this formalism allows you to define separate equations for different index patterns, it does not make it possible to define components depending in the index value. "Fortunately," the components feature was, until recently, broken. Why do I think that that is good news? Because it taught people an alternate method for defining tensor components, using Maxima's function formalism:
So if this works, why could one not use a function definition that also takes into account the values of the tensor components? Why not indeed. Here is the result of my work, a definition for the five-dimensional Kaluza-Klein metric as a function of the four-dimensional metric, the electromagnetic vector potential, and the scalar component:
These functions use a small set of helper functions. One is used to determine if a predicate can be evaluated (in order to avoid errors when it cannot); one constructs the argument list to a function; and one recursively computes the derivative of a tensor product without evaluation:
One of the conditions on the Kaluza-Klein metric is that the four-dimensional metric components and the electromagnetic vector potential are not dependent on the fifth dimension; i.e., their derivative with respect to the fifth coordinate is zero. This can be expressed through the following definitions:
Equipped with these tools, we can proceed. The first step is to define the metric and the contraction rules for the two metric tensors:
Next, we declare some indices to be 4-dimensional indices:
We may also want to do a DERIVABBREV:TRUE to display derivatives in a more compact format.
The equation of motion of a particle in empty five-dimensional space can be written up as:
The main "trick" is to break down the first component in this equation depending on whether the summation indices B and C are equal to five or are in the 1..4 range:
The resulting equation breaks down into two separate equations depending on the value of A. We're only interested in the case where A is a four dimensional index:
Before we evaluate the Christoffel symbols in the resulting equation, we need to do something to protect the one not containing any 5-indices, since we do not wish to have it expanded:
Now we can evaluate the remaining Christoffel symbols:
We now break this up into two parts depending on whether %1=5:
Now is the time to factor out G55 in order to be able to apply a substitution rule that will match the electromagnetic field tensor:
We're almost done. What remains is contracting the equation, restoring the Christoffel symbol that we protected earlier, and moving one term to the right to recover the usual format:
which is the equation we sought. Except for a little bit of cheating, that is: The Christoffel-symbol in this apparently 4-dimensional equation is, in fact, the 5-dimensional Christoffel symbol. But is that really a surprise? The presence of an electromagnetic field does more than just produce an apparent force on a test particle. It also contains energy, which means it bends spacetime; which should manifest itself in our equation as a change in the Christoffel-symbol. Without further ado, here's the analysis:
I don't know for sure but I'm pretty certain that this is the correct value for the contribution of the electromagnetic field to the metric.