1 /* Copyright (C) 2004 Viktor T. Toth <http://www.vttoth.com/>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be
9 * useful, but WITHOUT ANY WARRANTY; without even the implied
10 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * MAXIMA CTENSOR demo: Proving that the Reissner-Nordstrom metric
14 * is that of a point charge.
20 Verify that the Reissner-Nordstrom metric is that of a point charge.
21 First, we load ctensor...")$
22 if get('ctensor,'version)=false then load(ctensor);
23 ("We also need NCHRPL that contains the MATTRACE function:")$
25 ("Now we set up the metric with (+,-,-,-) signature:")$
28 lg:matrix([(r^2+4*%pi*q^2-2*m*r)/r^2,0,0,0],[0,r^2/(2*m*r-r^2-4*%pi*q^2),0,0],[0,0,-r^2,0],[0,0,0,-r^2*sin(o)^2]);
29 ug:ratsimp(invert(lg));
30 ("Next, we compute the Christoffel-symbols:")$
32 ("Predefine Ricci & Einstein tensors as matrices for later use:")$
37 ("Part II: we set up the electromagnetic 4-potential:")$
39 ("From which we compute the covariant electromagnetic field tensor:")$
41 for i thru dim do for j thru dim do fl[i,j]:diff(a[i],ct_coords[j])-diff(a[j],ct_coords[i]);
42 ("We can now obtain the mixed and contravariant EM field tensors:")$
45 ("And now we can compute the stress-energy tensor (times 8*%pi).")$
46 t:ratsimp(8*%pi*(fl.fm-lg*mattrace(fl.fu)/4));
47 ("This and the covariant Einstein tensor should be identical:")$
50 /* End of demo -- comment line needed by MAXIMA to resume demo menu */