-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaximaNotes.html
293 lines (223 loc) · 7.18 KB
/
MaximaNotes.html
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Maxima Notes</title>
<meta name="generator" content="emacs-wiki.el" />
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<link rel="made" href="mailto:cyberpsyche[AT]gmail.com" />
<link rel="home" href="WelcomePage.html" />
<link rel="index" href="WikiIndex.html" />
<link rel="stylesheet" type="text/css" href="main.css"><script type="text/javascript">
function showToolTip(machaine) {
if (machaine != "") {
document.getElementById('tooltip').innerHTML = machaine;
document.getElementById('tooltipbox').style.visibility = 'visible';
}
}
function hide() {
document.getElementById('tooltip').innerHTML = '';
document.getElementById('tooltipbox').style.visibility = 'hidden';
}
</script>
<div class="menu">
<div class="menuitem">
<a href="WelcomePage.html">Wiki</a>
</div>
<div class="menuitem">
<a href="">work</a>
</div>
</div><!-- menu ends here -->
<div id="tooltipbox">
<div id="tooltip"></div>
</div>
</head>
<body>
<h1 id="top">Maxima Notes</h1>
<!-- Page published by Emacs Wiki begins here -->
<hr />
<h4>General Notes</h4>
<p>
区分大小写,所有的build-in函数均小写,如sin()、cos()等。赋值用colon(:)。用semicolon(;)表示输入结束。
</p>
<p>
dollar($)表示结束输入,但不显示输出。
</p>
<p>
用%i1表示引用之前输入的命令内容。用%表示最近一次输出的结果,用%o1表第一次输出之结果。
</p>
<p>
执行之前输入的命令:
</p>
<pre class="example">''%i1;
</pre>
<p>
%e - natural log base; %i - square root of -1; %pi - 3.1415926;
</p>
<p>
结束Maxima Session用:
</p>
<pre class="example">quit()
</pre>
<p>
用可fpprec命令查看精度,一般默认为16,可以设定该值:
</p>
<pre class="example">fpprec : 100;
</pre>
<p>
展开表达式,以下为展开最后一次输出的表达式的方法:
</p>
<pre class="example">expand(%)
</pre>
<p>
表达式求值,以下为对最后一次输出的表达式求值的方法:
</p>
<pre class="example">%, number
</pre>
<p>
用5/z替换输出表达式中的x:
</p>
<pre class="example">%o2, x=5/z;
</pre>
<p>
将输出表达式写法简化:
</p>
<pre class="example">ratsimp(%);
</pre>
<p>
展开后的表达式写成精简的模式:
</p>
<pre class="example">factor(%);
</pre>
<h4>代数多项式求值,solve()函数</h4>
<pre class="example">(%i6) a + b*c = 1;
(%o6) b c + a = 1
(%i7) b - a*c = 0;
(%o7) b - a c = 0
(%i8) a + b = 5;
(%o8) b + a = 5
(%i9) solve ([%o6, %o7, %o8], [a, b, c]);
25 sqrt(79) %i + 25 5 sqrt(79) %i + 5
(%o9) [[a = -------------------, b = -----------------,
6 sqrt(79) %i - 34 sqrt(79) %i + 11
sqrt(79) %i + 1 25 sqrt(79) %i - 25
c = ---------------], [a = -------------------,
10 6 sqrt(79) %i + 34
5 sqrt(79) %i - 5 sqrt(79) %i - 1
b = -----------------, c = - ---------------]]
sqrt(79) %i - 11 10
</pre>
<h4>三角函数表达式展开</h4>
<pre class="example">trigexpand(%);
</pre>
<p>
trigreduce()函数将三角函数表达式转化成只含sin与cos的简单形式。
</p>
<pre class="example">trigreduce(%);
</pre>
<h4>复变函数</h4>
<p>
realpart与imagpart两函数分别用于取复变函数表式式值的实数部分与复数部分。
</p>
<h4>查看debugmode与设置debugmode</h4>
<p>
查看:
</p>
<pre class="example">debugmode;
</pre>
<p>
设置:
</p>
<pre class="example">debugmode(true);
</pre>
<h4>求导</h4>
<pre class="example">(%i1) f: x^3 * %e^(k*x) * sin(w*x);
3 k x
(%o1) x %e sin(w x)
(%i2) diff (f, x);
3 k x 2 k x
(%o2) k x %e sin(w x) + 3 x %e sin(w x)
3 k x
+ w x %e cos(w x)
</pre>
<h4>求积分</h4>
<pre class="example">(%i3) integrate (f, x);
6 3 4 5 2 7 3
(%o3) (((k w + 3 k w + 3 k w + k ) x
6 2 4 4 2 6 2
+ (3 w + 3 k w - 3 k w - 3 k ) x
4 3 2 5 4 2 2 4
+ (- 18 k w - 12 k w + 6 k ) x - 6 w + 36 k w - 6 k )
k x 7 2 5 4 3 6 3
%e sin(w x) + ((- w - 3 k w - 3 k w - k w) x
5 3 3 5 2
+ (6 k w + 12 k w + 6 k w) x
5 2 3 4 3 3 k x
+ (6 w - 12 k w - 18 k w) x - 24 k w + 24 k w) %e
8 2 6 4 4 6 2 8
cos(w x))/(w + 4 k w + 6 k w + 4 k w + k )
A slight change in syntax gives definite integrals:
(%i4) integrate (1/x^2, x, 1, inf);
(%o4) 1
</pre>
<h4>泰勒级数</h4>
<pre class="example">(%i6) g: f / sinh(k*x)^4;
3 k x
x %e sin(w x)
(%o6) -----------------
4
sinh (k x)
(%i7) taylor (g, x, 0, 3);
2 3 2 2 3 3
w w x (w k + w ) x (3 w k + w ) x
(%o7)/T/ -- + --- - -------------- - ---------------- + . . .
4 3 4 3
k k 6 k 6 k
</pre>
<h4>求极限</h4>
<pre class="example">(%i8) limit (g, x, 0);
w
(%o8) --
4
k
</pre>
<h4>矩阵点乘</h4>
<p>
矩阵点乘用.号
</p>
<p>
矩阵输入使用:
</p>
<pre class="example">m: entermatrix(3,3);
</pre><!-- Page published by Emacs Wiki ends here -->
<div class="navfoot">
<hr />
<table width="100%" border="0" summary="Footer navigation">
<col width="33%"/><col width="34%"/><col width="33%"/>
<tr>
<td align="left">Update : 2016-05-23
</td>
<td align="center">
<span class="foothome">
<a href="WelcomePage.html">Home</a> / <a href="WikiIndex.html">Index</a>
</span>
</td>
<td align="right">
cyberpsyche[AT]gmail.com
</td>
</tr>
</table>
<center>
Based on
<a href="http://www.debian.org"><img style="border: 0em none;" src="images/debianLogo.png" alt="Debian Logo" /></a>
<a href="http://www.debian.org"><img style="border: 0em none;" src="images/debian.png" alt="Debian Text Logo" /></a>
GNU/Linux and <a href="http://www.apple.com"><img style="border: 0em none;" src="images/MacLogo.jpg" alt="Mac Logo" /></a>OS X| Powered by
<a href="http://www.gnu.org/software/emacs"><img style="border: 0em none;" src="images/emacs.gif" alt="Emacs Logo" /></a> |
Best view with
<a href="http://www.getfirefox.com/"><img style="border: 0em none;" src="images/getFirefox.gif" alt="Firefox Logo" /></a>
</center>
</div>
</body>
</html>