E-Book, Englisch, Deutsch, 297 Seiten, eBook
Corless Essential Maple 7
2. Auflage 2002
ISBN: 978-0-387-21557-0
Verlag: Springer US
Format: PDF
Kopierschutz: 1 - PDF Watermark
An Introduction for Scientific Programmers
E-Book, Englisch, Deutsch, 297 Seiten, eBook
ISBN: 978-0-387-21557-0
Verlag: Springer US
Format: PDF
Kopierschutz: 1 - PDF Watermark
The best book on Maple just got better. This lively book is bursting with clear descriptions, revealing examples and top tips. It is gentle enough to act as an introduction and yet sufficiently comprehensive and well organised to serve as a reference manual. Maple Release 7 is significantly different to earlier releases, so this book will appeal even to hardened users who want to catch up fast.
- Des Higham, University of Strathclyde, UK
This book provides an accelerated introduction to Maple for scientific programmers who already have experience in other computer languages (such as C, Pascal, or FORTRAN). It gives an overview of the most commonly used constructs and provides an elementary introduction to Maple programming. This edition of the book has been extensively updated for Maple Release 7 with future releases in mind. This has involved a substantial update of all programs, examples and exercises. Extensive new material has also been added, including an appendix on complex variables in a computer algebra context.
Zielgruppe
Professional/practitioner
Autoren/Hrsg.
Weitere Infos & Material
1;What’s in This Book;7
2;Acknowledgements;9
3;Contents;11
4;List of Figures;13
5;1 Basics;16
5.1;1.1 Getting Started;16
5.1.1;1.1.1 Basic Command Syntax;18
5.1.2;1.1.2 Use of Context-Sensitive Menus to Execute Maple Commands;19
5.1.3;1.1.3 Sample Maple Sessions;19
5.1.4;1.1.4 Arithmetic;36
5.1.5;1.1.5 Interrupting a Maple Computation;39
5.1.6;1.1.6 Saving Work;39
5.2;1.2 Some Things to Watch Out For;41
5.2.1;1.2.1 Good Worksheet Hygiene;41
5.2.2;1.2.2 Common Syntax Errors;42
5.2.3;1.2.3 Assigning Values to Variables;43
5.2.4;1.2.4 Removing Values from Variables;44
5.2.5;1.2.5 sign versus signum versus csgn;45
5.2.6;1.2.6 Accidental Creation of a Remember Table;46
5.2.7;1.2.7 Fences: Parentheses ( ) versus Braces { } versus Brackets [ ] versus Angle Brackets;47
5.2.8;1.2.8 Quotation marks: Left versus Right versus String;47
5.2.9;1.2.9 Precedence of Operators;49
5.2.10;1.2.10 Protected and Reserved Names;50
5.2.11;1.2.11 Having Different Assumptions about Domains;52
5.3;1.3 Documenting YourWork;52
5.4;1.4 The Three Levels of Maple “Black Boxes”;57
5.5;1.5 No Nontrivial Software Package is Bug-Free;58
5.6;1.6 Evaluation Rules;59
5.6.1;1.6.1 Working With Complex Numbers and Expressions;62
5.6.2;1.6.2 Inert Functions;63
5.7;1.7 The assume Facility;67
6;2 Useful One-Word Commands;71
6.1;2.1 Simplification;71
6.1.1;2.1.1 normal;72
6.1.2;2.1.2 collect;73
6.1.3;2.1.3 factor;83
6.1.4;2.1.4 expand;89
6.1.5;2.1.5 combine;90
6.1.6;2.1.6 simplify;91
6.2;2.2 Solving Equations;94
6.2.1;2.2.1 solve;94
6.2.2;2.2.2 fsolve;97
6.2.3;2.2.3 dsolve;101
6.2.4;2.2.4 rsolve;113
6.2.5;2.2.5 Linear Equations;114
6.2.6;2.2.6 Other Solvers;117
6.2.7;2.2.7 Systems of Polynomial Equations;117
6.3;2.3 Manipulations from Calculus;125
6.3.1;2.3.1 diff;125
6.3.2;2.3.2 int;127
6.3.3;2.3.3 limit;135
6.3.4;2.3.4 series;135
6.4;2.4 Adding Terms versus the Finite-Difference Calculus;139
6.5;2.5 Floating-Point Evaluation;144
6.5.1;2.5.1 Using evalhf;146
6.5.2;2.5.2 Signed Zero;150
6.6;2.6 The Most Helpful Maple Utilities;150
6.6.1;2.6.1 I/O Utilities;151
6.6.2;2.6.2 alias and macro;152
6.6.3;2.6.3 Interacting with the Operating System and External Calls;152
6.6.4;2.6.4 Mapping Functions Onto Compound Objects;152
6.6.5;2.6.5 Code Generation;154
6.7;2.7 Plotting in Maple;157
6.7.1;2.7.1 Two-Dimensional Plots;157
6.7.2;2.7.2 Three-Dimensional Plots;170
6.7.3;2.7.3 Contour Plots and Other Plots;174
6.7.4;2.7.4 Common Errors;183
6.7.5;2.7.5 Getting Hard Copy of your Plots;185
6.8;2.8 Packages in Maple;188
6.8.1;2.8.1 The MATLAB Link;189
6.8.2;2.8.2 numapprox;193
6.8.3;2.8.3 Units;194
6.8.4;2.8.4 MathML;199
7;3 Programming in Maple;201
7.1;3.1 Procedures;202
7.1.1;3.1.1 Structured Types;205
7.1.2;3.1.2 Example: Modified Gram–Schmidt;206
7.2;3.2 Operators and Modules;211
7.2.1;3.2.1 A Module for Finite-Difference Operators;216
7.2.2;3.2.2 Remarks on Mathematical Operators;219
7.3;3.3 Data Structures;220
7.4;3.4 Local versus Global versus Environment Variables;226
7.4.1;3.4.1 Exporting Local Variables;226
7.4.2;3.4.2 Global Variables;227
7.4.3;3.4.3 Environment Variables;227
7.4.4;3.4.4 Nested Lexical Scopes;230
7.5;3.5 Recursion and option remember;230
7.6;3.6 Variable Number or Type of Arguments;239
7.7;3.7 Returning More Than One Result;241
7.8;3.8 Debugging Maple Programs;243
7.9;3.9 Sample Maple Programs;250
7.9.1;3.9.1 Parametric Solution of Algebraic Equations;250
7.9.2;3.9.2 Path Following in p(x, y) = 0;254
7.9.3;3.9.3 Large Expression Management, Revisited;260
7.9.4;3.9.4 Fourier Sine Series, Revisited;260
7.9.5;3.9.5 Solution of y (t) = ay(t - 1);266
8;Appendix A A Primer on Complex Variables;273
8.1;A.1 Polar Coordinates and the Two-Argument Arctan Function;274
8.2;A.2 The Exponential Function;275
8.3;A.3 The Natural Logarithm;277
8.4;A.4 Trig Functions and Hyperbolic Functions;279
8.5;A.5 Inverse Trigs and Hyperbolics;279
9;Bibliography;286
10;Index;290
11;More eBooks at www.ciando.com;0
Basics.- Useful One-Word Commands.- Programming in Maple.
3 Programming in Maple (p.186-187)
[Lady Fiorinda was] in the theoric of these matters liberally grounded through daily sage expositions and informations by Doctor Vandermast, who had these four years past been to her for instructor and tutor. To try her paces and put in practice the doctor’s principles and her own most will-o’-the-wisp and unexperimental embroiderings upon them, ready means lay to hand. . .
- E. R. Eddison, The Mezentian Gate, Book VI.
Maple is useful as a collection of "black boxes," but it is more useful still as a very high-level programming language. Since most of the tasks undertaken by Maple are "one-off" calculations (as opposed to "batch" calculations, which require many executions of the same program), it makes sense that Maple is an interpreted, rather than compiled, language. This is true even for the Maple library, because for large problems the cost will be dominated by the manipulation of large objects. Some crucial operations, though, are performed by kernel routines, which are compiled for efficiency.
With the external calling features, new to Maple 6 and improved for Maple 7, it is now possible to "tune" these efficiency tradeoffs more closely for any particular application. With the external calling features, new to Maple 6 and improved for Maple 7, it is now possible to "tune" these efficiency tradeoffs more closely for any particular application.
Maple procedures can be divided loosely into two types: operators, and more general procedures. Procedures and related structures may be bundled together into a module. An operator is meant to imitate a mathematical operator, both in notation (insofar as this is possible in ASCII) and in action. The .rst section of this chapter deals with general procedures and their uses. These can do essentially anything computable. Since Maple is a high-level language, you can express these actions in many ways. The section following that looks at operators.
For more in-depth information on how to program in Maple, see [44] and the detailed examples in the directory samples/ch06, which can be found on Windows systems in the directory Program Files/Maple 7. For an extended example of revising a program for efficiency, see [50]. For examples of useful programs, see [21].
3.1 Procedures
A Maple procedure always returns a value. It is the value of the last statement executed in the procedure before returning, or else the value of an explicit return statement. See ?return. This value may be NULL, which does not print anything on output. The distinction between NULL and "no value" is academic. One important consequence of a procedure returning NULL is that the environment variables %, %%, and %%% are not changed. The procedures print and lprint use this deliberately. [We will discuss environment variables in more detail later.] The procedures solve, fsolve, and dsolve, for example, will return NULL if they .nd no solution, and sometimes this takes special handling in programs. One simple way to deal with this with solve is to enclose the results from solve in set braces ( { } ), converting a possible NULL value to the empty set (and incidentally removing multiplicity; use list brackets if you wish to preserve multiplicity).