-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcliffordan.dem
67 lines (49 loc) · 1.54 KB
/
cliffordan.dem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* Copyright (C) 2016 Dimiter Prodanov
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* clffordan demo
*/
if get('clifford,'version)=false then load("clifford")$
if get('cliffordan,'version)=false then load("cliffordan")$
"Clifford implements Clifford algebra for Maxima."$
"Geometric calculus in G(3)"$
clifford(e,3);
("initialize variables")$
dependsv(F,[t,x,y,z]);
r:cvect([x,y,z]);
("the vector derivative is")$
mvectdiff(F,r);
("the Laplacian is")$
mvectdiff(F,r,2);
("the simplest vector derivative")$
mvectdiff(r,r);
("exponent")$
mvectdiff(exp(r),r);
("logarithm")$
mvectdiff(log(r),r),factor;
("square")$
mvectdiff((-cnorm(r)),r),factor;
("inverse vector")$
mvectdiff(r/(-cnorm(r)),r);
("unit vector")$
mvectdiff(r/sqrt(-cnorm(r)),r);
declare(k, scalar);
("k-power")$
mvectdiff((-cnorm(r))^k/2,r),factor;
("more complicated examples",
derivabbrev:true)$
dependsv(A, [x,y,z]);
P:celem(A,[[],x,y,z]);
mvectdiff(log(cnorm2(P))/2,r);
mvectdiff(log(cnorm2(F))/2,r);
derivabbrev:false$
/* End of demo -- comment line needed by MAXIMA to resume demo menu */