12
12
Contains Enhancements by W. Schelter
13
13
Maxima 5.4 Tue Mar 21 14:14:45 CST 2000 (enhancements by W. Schelter)
14
14
Licensed under the GNU Public License (see file COPYING)
19
(%i2) expand((x+y)^6);
21
21
6 5 2 4 3 3 4 2 5 6
22
(D2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
22
(%o2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
26
(D3) (x - 1) (x + 1) (x - x + 1) (x + x + 1)
26
(%o3) (x - 1) (x + 1) (x - x + 1) (x + x + 1)
87
87
factors the polynomial exp over the Gaussian integers (i. e.
88
88
with SQRT(-1) = %I adjoined). This is like FACTOR(exp,A**2+1)
91
(D1) (X - 1) (X + 1) (X + %I) (X - %I)
90
(%i1) GFACTOR(X**4-1);
91
(%o1) (X - 1) (X + 1) (X + %I) (X - %I)
95
95
To use a result in later calculations, you can assign it to a variable or
97
97
refers to the most recent calculated result:
100
(C2) u:expand((x+y)^6);
100
(%i2) u:expand((x+y)^6);
102
102
6 5 2 4 3 3 4 2 5 6
103
(D2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
103
(%o2) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
107
(D3) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x
107
(%o3) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x
114
114
MAXIMA knows about complex numbers and numerical constants:
126
126
MAXIMA can do differential and integral calculus:
129
(C8) u:expand((x+y)^6);
129
(%i8) u:expand((x+y)^6);
131
131
6 5 2 4 3 3 4 2 5 6
132
(D8) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
132
(%o8) y + 6 x y + 15 x y + 20 x y + 15 x y + 6 x y + x
136
(D9) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x
137
(C10) integrate(1/(1+x^3),x);
136
(%o9) 6 y + 30 x y + 60 x y + 60 x y + 30 x y + 6 x
137
(%i10) integrate(1/(1+x^3),x);
141
141
LOG(x - x + 1) SQRT(3) LOG(x + 1)
142
(D10) - --------------- + ------------- + ----------
142
(%o10) - --------------- + ------------- + ----------
146
146
MAXIMA can solve linear systems and cubic equations:
149
(C11) linsolve( [ 3*x + 4*y = 7, 2*x + a*y = 13], [x,y]);
149
(%i11) linsolve( [ 3*x + 4*y = 7, 2*x + a*y = 13], [x,y]);
152
(D11) [x = --------, y = -------]
152
(%o11) [x = --------, y = -------]
154
(C12) solve( x^3 - 3*x^2 + 5*x = 15, x);
154
(%i12) solve( x^3 - 3*x^2 + 5*x = 15, x);
156
(D12) [x = - SQRT(5) %I, x = SQRT(5) %I, x = 3]
156
(%o12) [x = - SQRT(5) %I, x = SQRT(5) %I, x = 3]
159
159
MAXIMA can solve nonlinear sets of equations. Note that if you don't
164
(C13) eq1: x^2 + 3*x*y + y^2 = 0$
166
(C14) eq2: 3*x + y = 1$
168
(C15) solve([eq1, eq2]);
164
(%i13) eq1: x^2 + 3*x*y + y^2 = 0$
166
(%i14) eq2: 3*x + y = 1$
168
(%i15) solve([eq1, eq2]);
170
170
3 SQRT(5) + 7 SQRT(5) + 3
171
(D15) [[y = - -------------, x = -----------],
171
(%o15) [[y = - -------------, x = -----------],
174
174
3 SQRT(5) - 7 SQRT(5) - 3
183
(C13) plot2d(sin(x)/x,[x,-20,20]);
186
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
188
(C14) plot2d([atan(x), erf(x), tanh(x)], [x,-5,5]);
191
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
192
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
193
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
195
(C15) plot3d(sin(sqrt(x^2+y^2))/sqrt(x^2+y^2),[x,-12,12],[y,-12,12]);
183
(%i13) plot2d(sin(x)/x,[x,-20,20]);
186
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
188
(%i14) plot2d([atan(x), erf(x), tanh(x)], [x,-5,5]);
191
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
192
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
193
(YMIN -3.0 YMAX 3.0 0.29999999999999999)
195
(%i15) plot3d(sin(sqrt(x^2+y^2))/sqrt(x^2+y^2),[x,-12,12],[y,-12,12]);
200
200
Moving the cursor to the top left corner of the plot window will pop up