mupad user's manual - springer978-3-322-96649-0/1.pdf · mupad user's manual...

13
MuPAD User's Manual

Upload: hoangkien

Post on 14-Apr-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

MuPAD User's Manual

Page 2: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

MuPAD User's Manual Multi-Processing Algebra Data Tool

MuPAD Version 1.2.2

Springer Fachmedien Wiesbaden GmbH

Page 3: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · 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.

Page 4: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

Contents

1 Introduction 1.1 MuPAD: An Overview ......... .

1.1.1 What makes MuPAD different? . 1.1.2 History of MuPAD ....... . 1.1.3 What does this Book contain? . 1.1.4 Other Documentation about MuPAD 1.1.5 Acknowledgements . 1.1.6 How to get MuPAD

1.2 Getting started . . . . . 1.2.1 A bit of Calculus .. 1.2.2 Getting Help . . . . 1.2.3 Nothing but Numbers 1.2.4 Have a Look . . 1.2.5 1.2.6

Programming . . Abstract Types .

2 The Language and its Functionality 2.1 Introduction .......... .

2.1.1 Interactive Input ... . 2.1.2 The History Mechanism 2.1.3 System Initialization 2.1.4 Language Elements .

2.2 Details of Evaluation ... . 2.2.1 Expressions .... . 2.2.2 Evaluation of Expressions 2.2.3 Evaluation of Statements 2.2.4 Controlling Substitution 2.2.5 Influencing Evaluation

2.3 Basic Types . . . . . . . 2.3.1 Numerical Types ..

v

1 1 1 2 2 3 4

4 6 6 7 8

10 10 11

15 15 16 17 17 18 19 19 19 20 21 24 26 28

Page 5: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

vi

2.3.2 Identifiers . . . . . 2.3.3 Character Strings . 2.3.4 NIL ..... . 2.3.5 FAIL ....... . 2.3.6 Empty Objects .. 2.3.7 Boolean Constants 2.3.8 Numerical Constants . 2.3.9 Lists . 2.3.10 Sets .. 2.3.11 Tables . 2.3.12 Arrays . 2.3.13 Polynomials . 2.3.14 Graphical Primitives 2.3.15 Expressions ..... 2.3.16 Function Environments 2.3.17 Directly Executable Objects .

CONTENTS

28 29 30 31 31 32 32 32 35 35 38 42 46 48 52 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

Page 6: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

CoNTENTS

2.5.8 The Commands next and break 2.5.9 The quit Statement . . .. 2.5.10 Statements as Expressions .

2.6 Procedures ......... . 2.6.1 The Procedure Body .. . 2.6.2 Parameter Passing . . .. 2.6.3 Local Variables - Scoping 2.6.4 Environment Variables . 2.6.5 Options ......... . 2.6.6 The Procedure Name .. 2.6.7 The Operands of a Procedure Definition 2.6.8 Assignments to Function Calls

2. 7 Pure Functions . . . . . . . . . . . . . 2.7.1 The Function Body ..... . 2.7.2 Parameters of a Pure Function 2.7.3 Operands of a Pure Function . 2. 7.4 Assignments to a Pure Function

2.8 Parallelism . . . . . . . . 2.8.1 Micro-Parallelism ........ . 2.8.2 Macro-Parallelism ....... .

2.9 Direct Use of Internal System Functions 2.10 Manipulation of Objects ........ .

2.10.1 Types and Expression Types .. 2.10.2 The Functions type, domtype and testtype 2.10.3 The Functions nops and op .. . 2.10.4 The Function subsop ........... . 2.10.5 The Functions subs and subsex ..... .

2.10.6 Manipulation of Statements and Programs 2.11 The History Mechanism .............. .

3 Debugging 3.1 Introduction . 3.2 Interaction between the User and the Debugger 3.3 mdx: The X-Frontend of the Debugger .

3.3.1 Description of the Commands . 3.3.2 Command Syntax . . . . . . . .

4 Graphics 4.1 Introduction . 4.2 Plot Options 4.3 Graphical Primitives

vii

98 99 99

102 105 107 109 110 112 116 118 119 120 121 121 122 123 123 124 130 136 139 140 140 143 148 152 156 158

163 163 165 166 168 171

173 173 179 188

Page 7: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

viii

4.4 VCam - The Graphics' User's Interface . 4.4.1 The Base Window ..... 4.4.2 The Manipulation Window 4.4.3 The Read Window 4.4.4 The Save Window . . 4.4.5 The Print Window . . . 4.4.6 The Default Window . . 4.4. 7 The Properties Window 4.4.8 The Zoom Window . . . 4.4.9 The Perspective Window 4.4.10 The Saved Plot Window . 4.4.11 The Color Window . . . .

4.5 User-defined Color Functions .. 4.5.1 Arguments of Color Functions 4.5.2 Results of Color Functions . 4.5.3 Examples . . . . . . . . . . . .

4.6 Graphical File Formats . . . . . . . . . 4.6.1 The Format of the File vcam_defaults 4.6.2 Graphical Files in ASCII Format . 4.6.3 Graphical Files in Binary Format .

5 User Interfaces 5.1 XMuPAD ................. .

5.1.1 The Text Window ........ . 5.1.2 The Buttons in the Basic Window 5.1.3 Special Cases- Differences to MuPAD .

5.2 Hy'!EX ............ . 5.2.1 The Hy'!EX Window . . . . . . . . . 5.2.2 The Help Pages . . . . . . . . . . . .

5.3 MacMuPAD - MuPAD on the Macintosh . 5.3.1 Introduction 5.3.2 Installation . . 5.3.3 A First Session 5.3.4 The Windows . 5.3.5 Documents . . 5.3.6 Working with the Session Window 5.3.7 Text Editing ... 5.3.8 Graphics . . . . . . . . . . 5.3.9 The Help System . . . . . . 5.3.10 The Source Level Debugger 5.3.11 Configurating MacMuPAD

CONTENTS

189 190 192 201 202 204 205 209 210 211 213 213 213 215 216 216 221 222 223 225

227 227 229 231 235 236 237 240 241 241 241 242 245 247 248 250 252 261 264 268

Page 8: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

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 den om 307 diff .. 308 DIGITS. 310

Page 9: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

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

Page 10: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

CONTENTS

genpoly global. has ... help, ? history HISTORY hold .. icon tent id ... if actor ifft .. igamma. igcd .. igcdex. ilcm Im ...

info .. indets . index_val. input ... insert_ordered int ... isprime . iszero .. ithprime last, Y. lcm ... lcoeff . ldegree length. level . LEVEL . LIB_PATH, READ_PATH, WRITE_PATH . limit .. linsert .. linsolve . lmonomial. load ... loadlib . loadproc

xi

350 351 352 353 354 354 355 356 357 357 358 359 359 360 361 361 363 364 365 366 367 367 369 370 371 371 372 373 374 375 376 377 378 379 380 381 382 383 384 384

Page 11: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

Xll

lterm .. . map .... . mapcoeffs. maprat. match .. max .... MAX LEVEL min .... modp, mods multcoeffs new ..... nextprime. nops .. norm .. normal. nterms. nthcoeff nthmonomial nth term null . numer 0 ..

ode .. op .. partfrac pathname pdivide pdioe phi ... plot2d. plot3d. point poly .. Poly .. polygon powermod PRETTY _PRINT . primp art print ... PRINTLEVEL

CONTENTS

386 387 388 389 390 393 393 394 395 396 397 398 398 400 401 402 403 404 405 406 406 407 408 409 411 411 412 414 414 415 418 423 424 427 428 430 431 431 432 433

Page 12: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

CONTENTS

profile . protocol psi ... radsimp . random .. randpoly Re ... .

read .. . readpipe readqueue. rectform . reset ... resultant. return. round . rtime . select. seq ... series. setuserinfo sign ... simplify solve . sort .. sqrfree strlen. strmatch subs .. subsex .. subsop .. substring. sum .....

sysname .. System variables, constants, operators system. table .. taylor .. tbl2text tcoeff .. testargs

Xlll

434 438 439 440 441 442 443 444 445 446 447 450 451 452 453 454 455 456 456 458 459 460 461 463 464 465 465 466 468 470 471 472 474 474 476 477 478 479 479 480

Page 13: MuPAD User's Manual - Springer978-3-322-96649-0/1.pdf · MuPAD User's Manual Multi-Processing Algebra Data Tool MuPAD Version 1.2.2 Springer Fachmedien Wiesbaden GmbH

XlV CoNTENTs

test type 482 TeX ..... 483 text2expr. 483 text2list. 484 text2tbl 486 textinput. 487 TEXTWIDTH. 488 time ... 488 topology 489 trace ... 489 traperror. 490 trunc ... 491 type .... 492 UNIX -MuPAD options under UNIX . 493 unalias . 494 user info 494 val ... 495 version . 496 write .. 496 writepipe. 498 writequeue 498 zeta 499 zip. 500

A Tables 503

B PARI 513

c Netpbm 515

D MuPAD-Syntax in BNF 517

E Generating Commands of the Color Plots 523

F Changes between MuPAD 1.2.1 and 1.2.2 541

G New Functionality in MuPAD 1.2.2 545

Bibliography 549

Index 551