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 * Demonstrate the use of Taylor series in CTENSOR
17 ("Define a metric that is a perturbation of the Minkowski metric")$
18 if get('ctensor,'version)=false then load(ctensor);
21 ct_coords:[t,r,theta,phi];
22 lg:matrix([-1,0,0,0],[0,1,0,0],[0,0,r^2,0],[0,0,0,r^2*sin(theta)^2]);
23 h:matrix([h11,0,0,0],[0,h22,0,0],[0,0,h33,0],[0,0,0,h44]);
24 ("Spherically symmetric metric depends on the scalar field l")$
27 ("First, we compute the Einstein tensor")$
29 ("Be patient, this will take a while...")$
31 ("And it has far too many terms")$
33 ("Now let's drop terms higher order in l")$
38 ("We now explicitly recompute the Christoffel symbols and the Ricci tensor")$
41 ("So that we can recompute the Einstein tensor")$
43 ("Which now has far fewer terms:")$
45 ("The truncated terms are small enough for display")$
46 for i thru dim do (ein[i,i]:ratsimp(ein[i,i]),ldisplay(ein[i,i]));
48 /* End of demo -- comment line needed by MAXIMA to resume demo menu */