1 /* Copyright (C) 2019 Viktor T. Toth <https://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 * Deriving the field equations from the action for Brans-Dicke cosmology
16 ("The Killing equations" )$
17 if get('ctensor,'version)=false then load(ctensor);
18 if get('itensor,'version)=false then load(itensor);
19 ("The first step is to derive the Killing equations in generic form.")$
21 ("Conversion to ctensor code is needed to solve them in a specific metric.")$
22 KE:ic_convert(N([i,j])=covdiff(x([i]),j)+covdiff(x([j]),i));
23 ("We choose the Schwarzschild metric in this example.")$
24 ct_coordsys(exteriorschwarzschild);
25 ("We expect the Killing field to have the same symmetries as the metric and depend only on the radial coordinate..")$
29 ("We preinitialize the matrix N that will hold the LHS of the Killing equations.")$
32 ("The LHS of the Killing equations takes this form:")$
34 ("Studying these terms, we can easily eliminate three of the vector components and solve for the fourth:")$
35 factor(ode2(ev(N,solve(N[4,4],x[3]),solve(N[4,3],x[4]),solve(N[3,3],x[2]))[1,2],x[1],r));
36 /* End of demo -- comment line needed by MAXIMA to resume demo menu */