maplE. 8 command the brilliance of a thousand mathematicians Getting Started Guide Waterloo Maple
command the brilliance of a thousand mathematicians Getting Started Guide M-0027-00-E Printed in Canada Waterloo Maple Inc. 57 Erb Street West Waterloo, Ontario | Canada N2L 6C2 tel: 1.519.747.2373 | fax: 1.519.747.5284 info@maplesoft.com | www.maplesoft.com North American Sales: 1.800.267.6583 © 2002 Waterloo Maple Inc. Maple is a registered trademark of Waterloo Maple Inc
Maple 8 Getting Started Guide C 2002 by Waterloo Maple Inc
Maple 8 Getting Started Guide © 2002 by Waterloo Maple Inc
Waterloo Maple Inc 57 Erb Street West Waterloo ON N2L 6C2 Canada Maple and Maple V are registered trademarks of Waterloo Maple Inc Maplets is a trademark of Waterloo Maple Inc C 2002, 2001 by Waterloo Maple Inc. All rights reserved The electronic version(PDF)of this book may be downloaded and printed for personal use or stored as a copy on a personal machine. The electronic version(PDF)of this bool may not be distributed. Information in this document is subject to change without notice and does not represent a commitment on the part of the vendor. The software described in this document is furnished under a license agreement and may be used or copied only in accordance with the agreement. It is against the law to copy the software on any medium except as specifically allowed in the agreement The use of general descriptive names, trade names, trademarks, etc, in this publication, even if the former are not especially identified, is not to be taken as a sign that such names, as understood by the Trade marks and Merchandise Marks Act, may accordingly be used freely by anyone Windows is a registered trademark of Mircosoft Corporation All other trademarks are property of their respective owners Printed in canada ISBN1-894511-25-5
ii Waterloo Maple Inc. 57 Erb Street West Waterloo, ON N2L 6C2 Canada Maple and Maple V are registered trademarks of Waterloo Maple Inc. Maplets is a trademark of Waterloo Maple Inc. © 2002, 2001 by Waterloo Maple Inc. All rights reserved. The electronic version (PDF) of this book may be downloaded and printed for personal use or stored as a copy on a personal machine. The electronic version (PDF) of this book may not be distributed. Information in this document is subject to change without notice and does not represent a commitment on the part of the vendor. The software described in this document is furnished under a license agreement and may be used or copied only in accordance with the agreement. It is against the law to copy the software on any medium except as specifically allowed in the agreement. The use of general descriptive names, trade names, trademarks, etc., in this publication, even if the former are not especially identified, is not to be taken as a sign that such names, as understood by the Trade Marks and Merchandise Marks Act, may accordingly be used freely by anyone. Windows is a registered trademark of Mircosoft Corporation. All other trademarks are property of their respective owners. Printed in Canada ISBN 1-894511-25-5
Contents 1 Chapter 1: Introduction to Maple 1.1 talling maple 1.2 Starting Mapl 1.3 The Maple Window ing Help Pag 1.5 Entering Expre in Maple 2 Chapter 2: Solving a Problem 2.1 Scenario 2.2 Commands in packa 2. 3 Math and visualization 10 Plotting the hill...… Finding the maximum point of the surface Finding the skiers starting point Finding the path down 14 2.4 Using a For Loop-Finding the Path Performing the initialization…… 15 2.5 Visualization revisited 2.6 Documenting Your Work 9 Adding text… Structuring the worksheet with sections Adding numbers 2.7 Exporting to HTML 3 Chapter 3: Getting More Information 3.1 The Help System Maple help pages Help page toolbar 26 Getting help Help command Help Browser…
iii 1 Chapter 1: Introduction to Maple ................................................. 1 1.1 Installing Maple ................................................................................. 1 1.2 Starting Maple ................................................................................... 1 1.3 The Maple Window ............................................................................ 2 1.4 Accessing Help Pages......................................................................... 4 1.5 Entering Expressions in Maple......................................................... 5 2 Chapter 2: Solving a Problem ...................................................... 9 2.1 Scenario .............................................................................................. 9 2.2 Commands in Packages ..................................................................... 9 2.3 Math and Visualization ................................................................... 10 Plotting the hill .............................................................................. 11 Finding the maximum point of the surface .................................. 12 Finding the skier’s starting point ................................................. 13 Finding the path down .................................................................. 14 2.4 Using a For Loop—Finding the Path.............................................. 15 Performing the initialization ........................................................ 15 Specifying the For Loop ................................................................. 16 2.5 Visualization Revisited.................................................................... 17 2.6 Documenting Your Work ................................................................. 19 Adding text ..................................................................................... 19 Structuring the worksheet with sections ..................................... 21 Adding numbers ............................................................................ 22 2.7 Exporting to HTML.......................................................................... 23 3 Chapter 3: Getting More Information ........................................ 25 3.1 The Help System.............................................................................. 25 Maple help pages ........................................................................... 25 Help page toolbar ........................................................................... 26 Getting help ................................................................................... 27 Help command .......................................................................... 27 Help Browser ............................................................................ 27 Contents
Cont Topic search Full text search 3.2 Manual set 3.3 New User's tour 8899 3.4 Example worksheets.... 3.5 Web sites Index
iv • Contents Topic search .............................................................................. 27 Full text search ......................................................................... 28 3.2 Manual Set ....................................................................................... 28 3.3 New User’s Tour............................................................................... 29 3.4 Example Worksheets ....................................................................... 29 3.5 Web Sites .......................................................................................... 29 Index ................................................................................................... 31
1 Introduction to Maple Maple is an analytic computation system. It performs mathematical computations and manipulations for solving problems from various technical disciplines. Most significantly, Maple computes both numerical as well symbolic solutions to mathematical expressions. This means that Maple performs computations on expressions that contain symbols, such as T or x, without performing numerical approximations. For example, Maple determines that the derivative of sin(x)is cos(x), even when x has not been assigned a value. Maple provides exact solutions to many technical problems In addition, Maple has visualization tools that contribute to the problem solving process 1.1 Installing Maple For installation and licensing instructions, refer to the Install. htm file on your Maple CD 1.2 Starting Maple You can run the Maple program with either a graphical user interface or a command-line interface. In the graphical user interface, you can enter Maple commands at the prompt, or you can use palettes, context-sensitive menus and other features to construct commands. The worksheet is your Maple document, and in it you can format and document your commands In the command-line interface, you enter Maple commands at the prompt While you cannot access the graphical interface features, the command-line
1 1 Introduction to Maple Chapter 1: Introduction to Maple Maple is an analytic computation system. It performs mathematical computations and manipulations for solving problems from various technical disciplines. Most significantly, Maple computes both numerical as well as symbolic solutions to mathematical expressions. This means that Maple performs computations on expressions that contain symbols, such as π or x, without performing numerical approximations. For example, Maple determines that the derivative of is , even when has not been assigned a value. Maple provides exact solutions to many technical problems. In addition, Maple has visualization tools that contribute to the problemsolving process. 1.1 Installing Maple For installation and licensing instructions, refer to the file on your Maple CD. 1.2 Starting Maple You can run the Maple program with either a graphical user interface or a command-line interface. In the graphical user interface, you can enter Maple commands at the prompt, or you can use palettes, context-sensitive menus, and other features to construct commands. The worksheet is your Maple document, and in it you can format and document your commands. In the command-line interface, you enter Maple commands at the prompt. While you cannot access the graphical interface features, the command-line
2. Chapter 1: Introduction to Maple interface uses less memory than the worksheet interface. It is therefore useful in solving very large or complex problems on computers with limited memory. This guide covers the standard interface. For more information on the command-line interface, look in your Maple folder for the cmdline. txt file (for Macintosh, refer to the Command Line Readme file To start the standard interface in windows. From the Start menu, choose Programs, Maple 8, then Maple 8. To start the standard interface on a Macintosh computer: 1. Double-click the Maple 8 application icon on the Macintosh hard drive. 2. If prompted, enter your User ID in the Maple 8 Multiple User Logon dialog box, and click Log On. If you have entered a new ID, you have to confirm its creation To start the standard interface in UNIX or Linux Enter the full path, for example, /usr/local/maple/bin/xmaple 1. Add your Maple 8 directory(for example, /usr/local/maple/bin) to your command search path 2. Enter xmap le On all operating systems, the first Maple worksheet session opens with the Introduction to Maple 8 page that points you to the New User's Tour, updates, and other introductory help pages. Subsequent worksheet sessions start with a new, blank worksheet 1.3 The Maple Window The Maple window resembles that of a typical application program. The main features are shown in Figure 1-A on page 3
2 • Chapter 1: Introduction to Maple interface uses less memory than the worksheet interface. It is therefore useful in solving very large or complex problems on computers with limited memory. This guide covers the standard interface. For more information on the command-line interface, look in your Maple folder for the file (for Macintosh, refer to the file). To start the standard interface in Windows: • From the Start menu, choose Programs, Maple 8, then Maple 8. To start the standard interface on a Macintosh computer: 1. Double-click the Maple 8 application icon on the Macintosh hard drive. 2. If prompted, enter your User ID in the Maple 8 Multiple User Logon dialog box, and click Log On. If you have entered a new ID, you have to confirm its creation. To start the standard interface in UNIX or Linux: • Enter the full path, for example, Or, 1. Add your Maple 8 directory (for example, ) to your command search path. 2. Enter . On all operating systems, the first Maple worksheet session opens with the Introduction to Maple 8 page that points you to the New User’s Tour, updates, and other introductory help pages. Subsequent worksheet sessions start with a new, blank worksheet. 1.3 The Maple Window The Maple window resembles that of a typical application program. The main features are shown in Figure 1-A on page 3.
1.3 The Maple Window·3 A和园回鬯幽的[四m国目 sheet window Help B aB elkin vIsopatuozall K Worksheet Elements ABT△ EZHOIKJAM N三oPΣTY@x int((PI/2)*sin(x)+x 2, x): e司 >plot((-1/2)cos(x),X=-10,.10) 4四a G M 国围围圈 -D. 目 -04 T ime: 2.3s Bytes: 3. 69M Available: 521M Figure 1-A Maple window features A toolbar containing shortcut buttons Context bar A toolbar containing context-sensitive shortcut buttons. (This means that the buttons change based on the cursor location or selection. It can also contain a field for editing and entering text C Section heading The name or title of a section D Maple input A mathematical expression that Maple evaluates. By default, input commands are entered at the prompt, "> and are displayed in red type. The resulting output is displayed beneath
1.3 The Maple Window • 3 Figure 1-A Maple window features A Toolbar A toolbar containing shortcut buttons. B Context bar A toolbar containing context-sensitive shortcut buttons. (This means that the buttons change based on the cursor location or selection.) It can also contain a field for editing and entering text. C Section heading The name or title of a section. D Maple input A mathematical expression that Maple evaluates. By default, input commands are entered at the prompt, “>”, and are displayed in red type. The resulting output is displayed beneath. A B E C D F G H I J L M N K
hapter 1: Introduction to Maple E Maple output The result of an executed Maple input command. By default, Maple output is displayed in blue type in Standard Math Notation F Execution group A set of Maple input with its corresponding output. Worksheet H A grouping of worksheet elements 1 Section range bracket A line that"brackets" the elements of a section By default, the Maple prompt is a greater-than symbol that indicates where to K Symbol palet A collection of buttons for entering mathematical symbols in Maple L Expression palette A collection of templates for entering mathematical expressions in Maple M Matrix palette A collection of templates for entering matrices in Maple N Vector palet A collection of buttons for entering vectors in Maple 1.4 Accessing Help Pages The commands and features in Maple are documented in online help pages To view help pages, at the prompt, enter a question mark(? )followed by the name of the command or subject on which you want help. Do not enter any spaces. For example, to refer to the help page on natural logarithms, enter ?In. For information on different ways to get help, see The Help System on page 25
4 • Chapter 1: Introduction to Maple 1.4 Accessing Help Pages The commands and features in Maple are documented in online help pages. To view help pages, at the prompt, enter a question mark () followed by the name of the command or subject on which you want help. Do not enter any spaces. For example, to refer to the help page on natural logarithms, enter . For information on different ways to get help, see The Help System on page 25. E Maple output The result of an executed Maple input command. By default, Maple output is displayed in blue type in Standard Math Notation. F Execution group A set of Maple input with its corresponding output. G Worksheet A Maple document. H Section A grouping of worksheet elements. I Section range bracket A line that “brackets” the elements of a section. J Prompt By default, the Maple prompt is a greater-than symbol that indicates where to enter Maple input. K Symbol palette A collection of buttons for entering mathematical symbols in Maple. L Expression palette A collection of templates for entering mathematical expressions in Maple. M Matrix palette A collection of templates for entering matrices in Maple. N Vector palette A collection of buttons for entering vectors in Maple.
1.5 Entering Expressions in Maple 1.5 Entering Expressions in Maple To enter expressions at the prompt, use the keyboard, the palettes, or both Using the keyboard is the most direct method, but the palettes enable you to enter a command without knowing its syntax There are two types of input display. Use Maple Notation to display input as Maple syntax. Maple Notation is the default. Use Standard Math Notation to display input in typeset notation as it appears in a textbook These examples step you through entering sin(x)dr in various ways To enter the integral in Standard Math Notation by using the palettes 1. Display the palettes, if necessary. From the View menu, choose Palettes, then Show All Palettes. The Symbol, Expression, Matrix, and Vector palettes are displayed. Move the palettes to the side of the worksheet, if 2. If required, change the input to Standard Math Notation. (If there is a question mark(?)after the prompt, the input is already set to Standard Math Notation. )At the prompt, right-click. The context-sensitive menu is displayed. Choose Standard Math 3. On the Expression palette, click. The integral symbol appears,and the question mark placeholder is selected 4. On the Expression palette, click sin The function sin appears, with another placeholder 5. Enter x(on the keyboard), and press Tab to go to the next placeholder Repeat step 5 7. Enter 0(zero), and press TAB 8. On the Symbol palette, clickz. (It is in the bottom row.) 9. Press enter Your worksheet should resemble that of Figure 1-B on page 6
1.5 Entering Expressions in Maple • 5 1.5 Entering Expressions in Maple To enter expressions at the prompt, use the keyboard, the palettes, or both. Using the keyboard is the most direct method, but the palettes enable you to enter a command without knowing its syntax. There are two types of input display. Use Maple Notation to display input as Maple syntax. Maple Notation is the default. Use Standard Math Notation to display input in typeset notation as it appears in a textbook. These examples step you through entering in various ways. To enter the integral in Standard Math Notation by using the palettes: 1. Display the palettes, if necessary. From the View menu, choose Palettes, then Show All Palettes. The Symbol, Expression, Matrix, and Vector palettes are displayed. Move the palettes to the side of the worksheet, if necessary. 2. If required, change the input to Standard Math Notation. (If there is a question mark (?) after the prompt, the input is already set to Standard Math Notation.) At the prompt, right-click. The context-sensitive menu is displayed. Choose Standard Math. 3. On the Expression palette, click . The integral symbol appears, and the question mark placeholder is selected. 4. On the Expression palette, click . The function sin appears, with another placeholder. 5. Enter (on the keyboard), and press TAB to go to the next placeholder. 6. Repeat step 5. 7. Enter (zero), and press TAB. 8. On the Symbol palette, click . (It is in the bottom row.) 9. Press ENTER. Your worksheet should resemble that of Figure 1-B on page 6. sin( ) x dx 0 π ∫