File: demo

package info (click to toggle)
jacal 1b7-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 808 kB
  • ctags: 884
  • sloc: lisp: 5,842; makefile: 316; sh: 104
file content (82 lines) | stat: -rw-r--r-- 1,444 bytes parent folder | download | duplicates (6)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
set echogrammar standard;
/*
Running demo, a test batch file.

Entering a simple formula: */a-b;
/*
generating a simple radical

*/
rad:%^(1/2);
/*
Now that the simple radical has been defined, it will split any
radicals of which it is a factor

*/
rad2:(a^2-b^2)^(1/2);
/*
The total differential is:

*/
%';
/*
The derivative with respect to b is:

*/
diff(rad2,b);
/*
lets try generating a 3rd order field extension

*/
foo3:{a|a^3+a*x+y};
/*
does the original formula extinguish the extension?

*/
verify(%^3+%*x+y,0);
/*
now, lets see what the derivative
in terms of the field extension is

*/
foo3';
/*
The derivative with respect to x is:

*/
diff(foo3,x);
/*
 Non-commutative partials example from Tom M. Apostol, Mathematical
Analysis, Addison-Wesley Publishing Co., 1957

*/
Af(x,y) : x*y*(x^2-y^2)/(x^2+y^2);
Df1 : partial(Af,1);
Df2 : partial(Af,2);
verify(-y,Df1(0,y));
verify(x,Df2(x,0));
verify(partial(Df1(0,@2),@2),-1);
verify(partial(Df2(@1,0),@1),1);

verify([[1,0],[-2,1]],[[1,0],[-1,1]]^^2);
mp:[2*x-(a-1)*y=5*b,a*x+b*y+c=0];
coefmatrix(mp,[x,y]);
d2:augcoefmatrix(mp,[x,y]);
/*
echelon(d2);
  triangularize(d2);*/
rank(d2);
amatrix:[[3,1],[2,4]];
charpoly(amatrix,lam);
/*
variables can be eliminated from expressions and equations, even
involving radicals and functions.

*/
eliminate([a^2/c+a^(1/2)+f(a,b,c),a=b/c],a);
verify(%,(b^2 + f(b/c, b, c) * c^3 + c^2 * b^(1/2) * c^(1/2))/c^3);
/*
done

*/
set echogrammar null;