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 * ITENSOR frames, torsion, and nonmetricity demo
16 if get('itensor,'version)=false then load(itensor);
18 ("Partial differentiation with respect to a coordinate")$
19 ishow(idiff(f([],[]),k))$
20 ishow(idiff(v([i],[]),k))$
21 ishow(idiff(a([i],[j]),k))$
22 ("Partial differentiation is a commutative operation")$
23 ishow(idiff(idiff(v([i],[]),k),l)-idiff(idiff(v([i],[]),l),k))$
24 ("Unless a frame base is used")$
26 ishow(idiff(idiff(v([i],[]),k),l)-idiff(idiff(v([i],[]),l),k))$
28 ("To undo a partial differentation, use the undiff function")$
31 ("Use rediff to evaluate all occurrences of idiff() again")$
33 ("These are useful for tensors that cannot be evaluated in derivative form")$
34 exp:ishow('icurvature([i,j,k],[m],n))$
35 ("Evaluation of this expression causes an error")$
36 errcatch(ev(exp,nouns));
37 ("Here is when undiff, ev, rediff helps, which is what evundiff does")$
40 /* End of demo -- comment line needed by MAXIMA to resume demo menu */