Table Of ContentMuPAD User's Manual
MuPAD User's Manual
Multi-Processing Algebra Data Tool
MuPAD Version 1.2.2
Springer Fachmedien Wiesbaden GmbH
MuPAD Copyright© Springer Fachmedien Wieshaden 1996
Originally puhlished by Wiley-Teubner in 1996
AII rights reserved
No part ofthis book may be reproduced by any means,
or transmitted, or translated into a macltine language
without the written permission ofthe publisher.
Designations used by companies to distinguish their products are often claimed
as lrademarks. In ali instances where John Wiley & Sons Ud and 8.0. Teubner
are aware of a claim, the product names appear in initial capital or ali capitalletters.
Readers, however, should contact the appropriate companies for more complete
information regarding trademarks and registration.
AXIOM is a trademark ofthe NAG, Lld; HyTEX. ~ N. Kllckler, University ofPaderbom. Gennany;
Maple is a trademark ofWaterloo Maple Software; Macintosh is a trademark of Apple Computer, lnc.;
Macsyma is a trademark ofMacsyma, lnc.; Mathematica is a trademark ofWolfram Research, Inc.;
Netpbm, ~ by J. Poskanzer; PARI, CI by C. Batut. D. Bernardi, H. Cohen and M. Olivier; PostScript
is a trademark of Adobe Systems, lnc.; TEX is a trademark ofthe American Mathematical Society;
UNIX is a trademark of AT&T; X-Window is a trademark of MIT
The authors accept no responsibility for this manual or the programs described in il The authors
ofthis manual and the crevelopers ofMuPAD assume no responsibility for director indirect damages
for losses. costs. claims for loss of profits or charges and expenses of any kind.
Brilish Library Catalog11ing in Publicalwn Data
A catalogue record for this book is available from the British Library
ISBN 978-3-322-96650-6 ISBN 978-3-322-96649-0 (eBook)
DOI 10.1007/978-3-322-96649-0
Produced from camera-ready copy supplied by the aulhors
This book is printed on acid-free paper responsibly manufactured from sustainable forestation,
for which atleast two trees are planted for each one used for paper production.
Contents
1 Introduction 1
1.1 MuPAD: An Overview ......... . 1
1.1.1 What makes MuPAD different? . 1
1.1.2 History of MuPAD ....... . 2
1.1.3 What does this Book contain? . 2
1.1.4 Other Documentation about MuPAD 3
1.1.5 Acknowledgements . 4
1.1.6 How to get MuPAD 4
1.2 Getting started . . . . . 6
1.2.1 A bit of Calculus .. 6
1.2.2 Getting Help . . . . 7
1.2.3 Nothing but Numbers 8
1.2.4 Have a Look . . 10
1.2.5 Programming . . 10
1.2.6 Abstract Types . 11
2 The Language and its Functionality 15
2.1 Introduction .......... . 15
2.1.1 Interactive Input ... . 16
2.1.2 The History Mechanism 17
2.1.3 System Initialization 17
2.1.4 Language Elements . 18
2.2 Details of Evaluation ... . 19
2.2.1 Expressions .... . 19
2.2.2 Evaluation of Expressions 19
2.2.3 Evaluation of Statements 20
2.2.4 Controlling Substitution 21
2.2.5 Influencing Evaluation 24
2.3 Basic Types . . . . . . . 26
2.3.1 Numerical Types .. 28
v
vi CONTENTS
2.3.2 Identifiers . . . . . 28
2.3.3 Character Strings . 29
2.3.4 NIL ..... . 30
2.3.5 FAIL ....... . 31
2.3.6 Empty Objects .. 31
2.3.7 Boolean Constants 32
2.3.8 Numerical Constants . 32
2.3.9 Lists . 32
2.3.10 Sets .. 35
2.3.11 Tables . 35
2.3.12 Arrays . 38
2.3.13 Polynomials . 42
2.3.14 Graphical Primitives 46
2.3.15 Expressions ..... 48
2.3.16 Function Environments 52
2.3.17 Directly Executable Objects . 55
2.3.18 Domains . . . . . . 60
2.3.19 Domain Elements . . . . . 63
2.4 Operators . . . . . . . . . . . . . 71
2.4.1 Mathematical Operators . 72
2.4.2 The Operators mod and di v 73
2.4.3 Relational Operators . 7 4
2.4.4 Logical Operators . . 75
2.4.5 Ranges and Sequences 76
2.4.6 Self-defined Operators 78
2.4.7 Set Operators . . . . . 80
2.4.8 The Concatenation Operator for Identifiers and Char-
acter Strings . . . . . . . . . . . . . . . . . 80
2.4.9 The Concatenation Operator for Functions 82
2.4.10 Operations on Functions . . . . . . . . . . . 83
2.4.11 The Index Operator . . . . . . . . . . . . . 85
2.4.12 Priority of the Unary and Binary Operators . 87
2.5 Statements . . . . . . . . . . 88
2.5.1 Statement Sequences . 88
2.5.2 Assignments . . . . 89
2.5.3 The if Statement 91
2.5.4 The case Statement 93
2.5.5 The for Loop . . . 94
2.5.6 The while Loop 97
2.5.7 The repeat Loop. 98
CoNTENTS vii
2.5.8 The Commands next and break 98
2.5.9 The quit Statement . . .. 99
2.5.10 Statements as Expressions . 99
2.6 Procedures ......... . 102
2.6.1 The Procedure Body .. . 105
2.6.2 Parameter Passing . . .. 107
2.6.3 Local Variables - Scoping 109
2.6.4 Environment Variables . 110
2.6.5 Options ......... . 112
2.6.6 The Procedure Name .. 116
2.6.7 The Operands of a Procedure Definition 118
2.6.8 Assignments to Function Calls 119
2. 7 Pure Functions . . . . . . . . . . . . . 120
2.7.1 The Function Body ..... . 121
2.7.2 Parameters of a Pure Function 121
2.7.3 Operands of a Pure Function . 122
2. 7.4 Assignments to a Pure Function 123
2.8 Parallelism . . . . . . . . 123
2.8.1 Micro-Parallelism ........ . 124
2.8.2 Macro-Parallelism ....... . 130
2.9 Direct Use of Internal System Functions 136
2.10 Manipulation of Objects ........ . 139
2.10.1 Types and Expression Types .. 140
2.10.2 The Functions type, domtype and testtype 140
2.10.3 The Functions nops and op .. . 143
2.10.4 The Function subsop ........... . 148
2.10.5 The Functions subs and subsex ..... . 152
2.10.6 Manipulation of Statements and Programs 156
2.11 The History Mechanism .............. . 158
3 Debugging 163
3.1 Introduction . 163
3.2 Interaction between the User and the Debugger 165
3.3 mdx: The X-Frontend of the Debugger . 166
3.3.1 Description of the Commands . 168
3.3.2 Command Syntax . . . . . . . . 171
4 Graphics 173
4.1 Introduction . 173
4.2 Plot Options 179
4.3 Graphical Primitives 188
viii CONTENTS
4.4 VCam - The Graphics' User's Interface . 189
4.4.1 The Base Window ..... 190
4.4.2 The Manipulation Window 192
4.4.3 The Read Window 201
4.4.4 The Save Window . . 202
4.4.5 The Print Window . . . 204
4.4.6 The Default Window . . 205
4.4. 7 The Properties Window 209
4.4.8 The Zoom Window . . . 210
4.4.9 The Perspective Window 211
4.4.10 The Saved Plot Window . 213
4.4.11 The Color Window . . . . 213
4.5 User-defined Color Functions .. 213
4.5.1 Arguments of Color Functions 215
4.5.2 Results of Color Functions . 216
4.5.3 Examples . . . . . . . . . . . . 216
4.6 Graphical File Formats . . . . . . . . . 221
4.6.1 The Format of the File vcam_defaults 222
4.6.2 Graphical Files in ASCII Format . 223
4.6.3 Graphical Files in Binary Format . 225
5 User Interfaces 227
5.1 XMuPAD ................. . 227
5.1.1 The Text Window ........ . 229
5.1.2 The Buttons in the Basic Window 231
5.1.3 Special Cases- Differences to MuPAD . 235
5.2 Hy'!EX ............ . 236
5.2.1 The Hy'!EX Window . . . . . . . . . 237
5.2.2 The Help Pages . . . . . . . . . . . . 240
5.3 MacMuPAD - MuPAD on the Macintosh . 241
5.3.1 Introduction 241
5.3.2 Installation . . 241
5.3.3 A First Session 242
5.3.4 The Windows . 245
5.3.5 Documents . . 247
5.3.6 Working with the Session Window 248
5.3.7 Text Editing ... 250
5.3.8 Graphics . . . . . . . . . . 252
5.3.9 The Help System . . . . . . 261
5.3.10 The Source Level Debugger 264
5.3.11 Configurating MacMuPAD 268
CONTENTS IX
5.3.12 Memory Problems ..... . 272
6 Survey about the MuPAD functions 275
6.1 Introduction . . . . . . . . . . . . . . 275
6.1.1 The Help Mechanism in MuPAD 275
6.1.2 The Syntax of the Help Pages . 276
6.1.3 Description of Errors . 277
6.2 Standard Library 278
abs ... 278
alias 279
anames. 280
append. 281
args .. 282
array 283
asympt. 284
atan .. 285
bernoulli. 286
besselJ . 287
besselY . 287
binomial 288
bool ... 289
built_in 290
bytes 291
ceil .. 291
coeff 292
collect 294
combine 294
conjugate. 295
contains 297
content . 298
context . 299
contfrac 300
D ... 301
Dpoly .. 302
debug .. 303
decompose. 304
degree ... 305
degreevec. 306
deno m 307
diff .. 308
DIGITS. 310
X CONTENTS
divide. 311
domain. 312
domattr 313
domtype 315
Line editor 316
eint .... 316
erf, erfc . 317
error ... 318
eval .... 319
evalassign 320
evalp ... 320
EVAL_STMT. 322
expand. 322
export. 324
expose. 325
expr .. 326
expr2text. 327
extnops .. 328
extop ... 328
extsubsop. 330
fact .... 331
factor, Factor 331
fclose. 332
fft ... 333
finput. 334
float 335
floor 336
fop en 337
fprint. 338
frac .. 340
fread 341
ftextinput 341
fun .... 343
func ... 343
funcattr 344
func_env 346
gamma 346
gcd .... 347
gcdex .. 348
genident 349