Appendix 1 Mupad Libraries and Procedures
Total Page:16
File Type:pdf, Size:1020Kb
Appendix 1 MuPAD Libraries and Procedures In this appendix, I have included all the libraries available in MuPAD, and almost all the procedures that are available in the most recent version of MuPAD at the time of writing. I have tried to make this list as complete as possible. Still, I could have missed a few things, as there are many procedures that are considered as internal. However, the border between internal procedures and those designated to be used by MuPAD users can be a bit dim. Therefore, it may happen that some of the procedures described here might be internal and some others might become internal in the future. In fact, from the user's point of view there is little difference between internal and official procedures. You can use them, as long as you know their syntax and where to find them. For many procedures, I have provided a short syntax and description that may help the readers to identify the role of the procedure or find a procedure for a specific goal. You need to keep in mind that most of these procedures can be used in a wide variety of ways and with a number of parameters. It is therefore not possible to describe in a small chapter all the forms of syntax and parameters that can be applied to them. My intention when developing this appendix was to provide you with the most basic information about what you can find in MuPAD's libraries and in the whole MuPAD system. There is a huge number of procedures and functions that I have grouped under the title "MuPAD Standard Collection". In fact, these procedures are not always included in any particular library. They are placed in various parts of the MuPAD system including kernel functions and those in standard library. The common feature for all of them is that you can access them directly without using the slot operator regardless of where they really are. Thus, if you can use a procedure like float(l+exp(l)) rather than like combinat: :bell(15), then I will consider this procedure as part of the so-called standard collection. Many of the procedures listed here were not even mentioned in my 482 MuPAO Pro Computing Essentials book. You can find information about them using MuPAD's help files. The order of libraries and procedures is alphabetic. A1.1 MuPAD Libraries (version 3.0, 21/02/2004) adt - basic collection ofabstract data type Ax - basic axiom con tructor: Cat - ba ic category constructors combinat -functions for combinatorics detools - 100isfor differential equations Oom - domain constructors fp - utilitie forjunctional programming generate - utilitie to generateforeign formats from expres. ions Graph - utilitie 10r handling directed and undirectedgraphs groebner - utilities to calculate Grobner-base .forpolynomial ideals import - utilities for reading data in differentformats intlib - utilitie for ymbolic integration linalg «the linear algehra package linopt - the packagefor linear optimization Iistlib - utilities for list operation. matchlib - toolsfor pal/ern matching module - utilitiesfor module management numeric <function .for numerical mathematics numlib - the packagefor elementary number theory' orthpoly - /001.1'for orthogonal polynomials ode - the libraryfor ordinary differential equations output - utilities for the output ofdata plot - graphical primitive lind functions for two- and three-dimen iional plots polylib - utilitie for polynomials prog - programming utilitie . property - properties ofidentifiers RGB - colorfunctions anddefi'!itiolls Series - lOoL5 anddatu structuresfor working with series solvelib - methodsfor solvin equations, system. o equations and ine ualities ~ p p e n d i x 1: MuPAD Libraries and Procedures 483 stats . statisticalfunctions stringlib - utilities for working with trings student· the student package transform- the library for integral transformation lYRe· ulilities or Iv e ex Jressions and ro Jerrie.1 A1.2 Operators Represented by Symbols := - assign a value to a variable , -, I, ., A- arithmetical operation. •factorialfunction I! . doublefactorialfunction . derivative ofa function , <, <=, >=, > . equality and inequality relations > - declaration ofa function >, <=> . Boolean operators representing implication and equivalence •. the dot operator 10 concatenate 111'0 lists or Siring ... the range operator. 2..5 .. range operator. PI...5. I. return a floating point interval including its ends @- composilion offunctions @@ - the operator to iterate a function given number oflimes S. the operator 10 creole a seqll nee Tword » displays help for a given word :: • the '10 1 0 eralor acce s to ob 'ect .1'101.1' A1.3 MuPAD Standard Collection A1.3.1 Procedures in Standard Collection This section lists the procedures that can be applied to objects other than numbers. All the arithmetic functions are listed in section Al.3.2 alias(x = objecl) . define x a (III alia a/a given object anames(All) . returns identifiers that have values or properties in the current ession ofMuPAD and, or, not, xor - Boolean operators ;484 MuPAO Pro Computing Essentials array(k I .. n I. k2.. 112 . ...)- creates all array assert(condilion) - declares a condition 10 he true at the moment when the statement is evaluated assign(Lis/) - assigns values given in the form oflist ofequattonts) assign Element s(L.i == v,..) - assigns values 10 entries ofa list, array assume(x. propertys - assigns a mathematical property 10 a luPAD object asympt{{. x ) - computes asymp totic series expansion bool(expr) - produces Boolean value ofthe given expression break - the procedure terminating execution ofa loop or a case structure bytes() - returns the current memory lise C_ • the .et ofcomplex number ' card (set ) - produces cardinalityfor a given set coeff(p ) - returns sequence of1101I-zero coefficients ofa polynomial co e rce(object. U) - tries to convert object into an object ofa domain U collect(p. x) - collects coefficient ofa given polynomial expression combine(expr) - combines the terms 0/a given expression into U single power complexlnfinity - the constant representing infinity in complex number conjugate(z) - produces the conjugate ofa complex number contains(A. object) - checks ifa given element A is contained inside of(I container object cont ent(p ) - compute the coli/eli/ ofthe polynomial. i.e. gcd ofit coefficients context(object) - evaluates object in the given coli/ext ofthe calling procedure contfrac(x) - produces continuedfraction ofa given //11m her 0 (1) - differential operator. equivalent tof '. also partial derivative debug() - . tarts luPAD debugger degree(p. x) - returns degree ofthe polynomial p with respect to x degreevec(p) • returns a list ofexponents ofthe leading term ofa polynomial delete x I, x2...xn - deletes values ofthe given identifiers denom (expr) - produce denominator ofa given rational expres ion diff{{. x) - produces the derivative ofa function with respect to a gil -en variable discont{{. x) - produces all the di 'continuities ofafimctionJ(x) divi de(p(x),q(x») - divides (l/l univariate polynomial ptx) by qtx), return quotient and reminderfrom division domtype(object) - returns domain type ofthe given object dOp'rint (obje t - lrints lar e malrices on Ihe screen :Appendix 1: MuPAD Libraries and Procedures 485 errorCmessage") - breaks running procedure and produces error message eval(object) - evaluate the given object evalassign(x. value. depth) - evaluates x with the given depth and assigns value to the re ul: evalp(p. x = xO) - evaluate polynomial Pfor x = xO expand(expressioll) - expands an arithmetical expre sion export(library. procedures) - exports proceduresfrom a given library expose(procedllre) - di play the source code ofa given procedure or domain expr(object) - converts object into WI element ofa basic domain expr2text(object) - convert object into a string ofcharacter ' external(.. ) - returns the module function environment extnops(object) - refilms the number ofoperands ofthe given object in internal repre: entation extop(object) - returns all the operands ofa domain element extsubsop(d, i = newel) - produces a copy ofthe domain element with replaced i-th operand factor(p) -factors polynomial into irreducible polynomials Factored(/) - the domain ofobjects infactoredform fcloset») - closes thefile with descriptor 11 finput(f//ename) - read MuPAD objectsfrom the given binary or ASCIIfile fname(n) - return . the name ofthefile with specified descriptor fopen (filename) - opens the file with the given name fprint(filename. objects) - writes MuPAD objects into afile frandom() - the floating point number random function freadVilename) - reads and executes the specified AiuPADfile freezeV) - creates an inactive copy ofthefunctionf ftextinput(filename. x) - reads a line from a textfile and as. ign. it to the identifier x funcenv(/) - creates afunction environment gcd(P.q...) - produce the greatest common divisor ofpo~rnumial ' gcdex(p. q, x) - the extended Euclidean algorithm/or polynomials genident() - create a nell' identifier that was not used before in the current ession genpoly(n. b. x) - creates a polynomial p with variable x such that p(b) = II getpidO - returns the ID ofthe running IIIPAD process under the U IX operating system getQroQ eXp'r - relllrns mathemalical Jrop"ertl' a iven exnre.uion 486 MuPAD Pro Computing Essentials ground(p) - returns th constant coefficient ofthe polynomial p has(objecll. objecll) - procedure checks yntax ofobject: to determine ifobject l is part ofthe objectI hastype(objecl. Iype) - checks ifa given object IIa a pecified typ help("word') - the proc dure 10 di play