Maple Quick Start - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Getting Started : worksheet/help/quickstart

Maple Quick Start

 

Introduction

Talking to Maple

Entering Math

Combining Text and Math

Plotting

Task Assistants, Tutors and Math Apps

Entering Commands

Document Editing and Formatting Tools

Configuring the Maple Environment

Introduction

In this introductory course, you will become familiar with and comfortable in the Maple environment. You will learn how to use context menus, task assistants, and palettes to perform powerful analyses and create high-impact graphics with only a minimal knowledge of commands. You will also learn how to create technical reports that capture the knowledge behind an analysis directly in the Maple document. This course will give you the tools you need to get started quickly, and a solid foundation upon which to build your future Maple explorations.

To try this material on your own, start with an empty Maple document. Perform the steps found in the left column of each table below. The results of each step are displayed in the right column for your reference.

Note for non-Windows or international users: The keystrokes given in this document are for Windows using a QWERTY keyboard. If you are using a different platform or keyboard, see Help> Quick Help for the list of the most common keystrokes or the 2-D math shortcut keys help page.

Talking to Maple

In this section, you will learn the basics of asking Maple a question and getting a result.

Steps

Results

Using [ENTER]

 

When you launch Maple you start with a blank document, with menus and toolbars at the top, palettes on the side. At the cursor, you can start typing math. Press [ENTER] to see the result.

 

Example: Type "1+2 [ENTER]".

Notice that the result appears on the next line.

1+2

3

(2.1)

Using [Alt]+[ENTER]

 

In the example above, we obtained a result by pressing [ENTER] after our input.

 

You can also get Maple to return the result on the same line as your question by typing [Alt]+[ENTER] (hold down the alt key, then press the enter key).

 

Example: Type "x+5-2" then [Alt]+[ENTER].

x+52 = x+3

Context Panel

 

You can use Maple's context panel to perform a wide variety of operations.  

 

Example: Place your cursor on the last result, and view the context panel. The context panel offers several operations to choose from according to the expression that you are using. To integrate this expression, select Integrate, then x.

 

Example: To plot the result of the integration, select the result, and from the context panel select Plots > 2-D Plot.

 

The context panel options are displayed dynamically based on the expression, and the clickable math operations are self-documenting: the text above the arrow shows what operation has been performed.

 

 

 x+52 = x+3integrate w.r.t. x12x2+3x

x+52 = x+3integrate w.r.t. x12x2+3x

Smart Popups

 

It is also possible to generate plots and to apply commands using Smart Popups.

Example: Enter 12x2+3x and click [Enter]. From the context panel for the result, select from the suggestions at the top of the panel. For example, choose 2-D Plot.

 

 

12x2+3x = 12x2+3x

 

Changing the Problem

 

Mathematics in a Maple document are live. You can go back, make changes, and re-execute the problem to obtain a new result.

 

Example: Go back to your original calculation of "1 + 2", change the number "1" to a "3" and press [ENTER]. Note the change in output.

 

Example: In the context menu example, above, change the "x" to "10 x". Highlight the entire line, including the plot, then click Execute all selected groups, , in the worksheet toolbar. All selected calculations are updated.

 

 

3+2

5

(2.2)

10  x+52 = 10x+3integrate w.r.t. x5x2+3x

 

Tip: Clicking Execute the entire worksheet,  , re-calculates the entire document.

Entering Math

There are a number of methods to enter math into Maple. You can enter math using a combination of palettes, keyboard shortcuts, context menus and commands. Most operations can be entered in more than one way, so you can choose the method you are most comfortable with.

Steps

Results

Exact Answers and Numeric Approximations

 

Maple calculates exact answers (for example, fractions remain as fractions).

Example: On a new line, enter 1/2 + 1/3.

Note that the slash (/) automatically moves you to the denominator. The right-arrow will revert you back. Press [Alt]+[ENTER] to see the result on the same line.

 

Maple also calculates numeric approximations.Example: From the context panel for the result above, select Approximate. Select accuracy of 5 digits.

 

If your problem uses decimal approximations already, Maple will return the answer in the same format.

Example: Try the example on the right.

 

You can apply different formatting to numeric results.

Example: In the context panel, under Number Format, select Scientific from the list.

12+13 = 56

12+13 = 56at 5 digits0.83333

0.5 x+13x = 0.8333333333x

0.5 x+13x = 8.33×10-1x

Palettes

 

Maple has over 1000 palette symbols within the palette menus. You can also use Maple's expression palette to input expressions. The expression palette contains fill-in-the-blank templates for common operations.

 

Example: Using the Expression Palette, find the integral of 4 t6+sint dt. Open the expression palette (click Expression on the left-hand side of your Maple document) and click the indefinite integral ( ) symbol. An indefinite integral template will appear in your worksheet. Fill in the placeholders (use [TAB] to move to the next placeholder). When done, press [ENTER] to evaluate.

 

Note: Use the caret symbol (^) to create a superscript, and right-arrow to revert back to normal text.

 

Example: Use the Calculus palette to find the limit of a function.

 

 

Tip: Put frequently used palette entries on the Favorites Palette. To do so, right-click on the desired expression in the palette and select Add to Favorites Palette.

 

Tip: Maple has many different palettes for entering expressions. To see all of the available palettes, right-click on the palette dock and view the Show Palette submenu.

4t6+sint ⅆt

47t7cost

(3.1)

limx0sinx2x = 0

Symbol Completion

 

The symbol completion mechanism provides an alternative to palettes for entering symbols.

 

Type the first few characters of the symbol name, and press [Esc]. Choose the desired symbol from the list.

 

Example: Try entering π2+x. To enter π, type Pi [Esc]. For the square root symbol, enter sqrt [Esc].

 π2+x

π2+x

(3.2)

Case-Sensitivity

 

Maple is case-sensitive.

 

Example: Enter " x+x ".

Example: Enter " y+Y ".

Compare the results.

x+x = 2x

y+Y = y+Y

Entering Multiplication

In general, you can use * or a space to imply multiplication.  In 2-D math, * appears as a center dot ().

 

Example: Type " 3 x " for "3 times x".

 

If you use spaces for multiplication, be careful.

" x y " means "x times y", but " xy " means the

variable whose name is "xy".

 

Example: Type "x [space] y +  xy ".

If you choose to Differentiate using the context menu, you will see that x, y, and xy are treated as three separate variables due to the way they were entered.

 

You should be careful using implicit multiplication in Maple to avoid confusion with function calls. To us, fx+1 looks like a function call, and xx+1 looks like implied multiplication. Maple understands both of these as function calls.

 

Example: Enter xx+2x using no space, a space, and an explicit multiplication sign. Ask Maple to calculate each result so you can see the differences.  The first one is not the same as the next two because there is no multiplication operation between x and x+2.

 

Tip: Troubleshooting your mathematics is easier if you use explicit multiplication symbols.

3  x+5  x = 8x

x y+xy = xy+xy

fx+1 = fx+1

xx+2x = xx+2x

x x+2x = x+2

xx+2x = x+2

Mathematical Notation

 

Maple understands familiar mathematical notation.

 

For example, Maple understands that y''+y'+y=0 is a differential equation in yx .

 

Example: Enter the equation listed above (using the single quote key for the prime notation). To verify that it is in fact a differential equation, select Solve DE from the context menu.

y''+y'+y=0solve DEyx=_C1ⅇ12xsin123x+_C2ⅇ12xcos123x

Label References

 

Maple uses label references.

 

Whenever you use [ENTER] to get a response, the result is automatically given a label reference. To refer to a previous result in a computation, use [Ctrl]+[L] and enter the label reference number.

 

Example: Multiply the result π2+x (from above) by x, using labels.

 

To reference an equation from another document, use Insert > Reference...

x

π2+xx

(3.3)

Variable Assignment

 

In order to assign a value to a variable name, the colon-equals operator is used.

 

Example: To assign the value "5*x" to the variable name "costA", the assignment statement, := (colon equals) is used. After a value has been assigned to "costA", it can be used in subsequent calculations.

 

Note: Anything you want Maple to evaluate (for example, assignment statements), must be entered in Math mode. Anything entered in Text mode will be non-executable.

costA5 x

costA5x

(3.4)

costA

5x

(3.5)

costB4 x

costB4x

(3.6)

costA+costB

9x

(3.7)

 

Tip: Find the list of keyboard shortcuts for your platform: Shortcut Keys and Quick Help.

 

Combining Text and Math

In Maple you can combine math and text in the same paragraph to help formulate mathematical sentences.

Steps

Results

Example: Start by entering a simple computation.

 

 

Go back to the start of your computation (place the cursor to the left of your expression), press [F5] to change from math input to text input, and start typing text.

x3+x2+3 ⅆx = 14x4+13x3+3x

The integral x3+x2+3 ⅆx = 14x4+13x3+3x.

Place your cursor at the end of the output, press [F5], and complete the rest of the sentence.

 

The integral x3+x2+3 ⅆx = 14x4+13x3+3x, as you can see.

Modify some of the terms in the problem, highlight the entire sentence and click execute all selected groups ( ) to re-execute the computation.

 

The integral 5 x3+x2+4 ⅆx = 54x4+13x3+4x, as you can see.

Tip: Pressing [F5] allows you to easily toggle between math input and text input.

Tip: In math mode, the cursor is slanted and has a dotted box around it. In text mode, the cursor appears as a vertical bar.

Tip: To check what mode you are in, look at the context bar above your document. In text mode it will look like  . In math mode it will look like  . You can also use these toolbar buttons to change modes as an alternative to pressing [F5].

Plotting

Maple can produce 2-D and 3-D plots of equations and expressions.

Steps

Results

2-D Plots

 

Now we will demonstrate plotting in Maple. The fastest way to plot an expression in Maple is to use the context menu.

 

Example: Enter an expression in x (for example, sin2x). From the context panel for the expression, select Plots > 2-D Plot.

 

Example: Use the point probe to find the coordinates of different points in the graph. To turn on the point probe, click on the plot. From the context panel, under Probe Info, select Nearest point on line.

 

Example: To pan the plot, click on the plot, and select Manipulator>Pan from the context panel. Hold down the left mouse button and use the mouse to move the plot around. To scale the plot, click on the plot and from the context panel select Scaling Constrained or clear the Scaling Constrained box for an unconstrained plot.

 

Tip: You can also change the manipulator tool by clicking on the plot, and then selecting the appropriate tool from plot toolbar at the top of the Maple window:

  

 

The enhanced point probe tool can find the point on the curve closest to your cursor, and allows you the ability to extract the coordinates of the cursor and paste them anywhere in the document.

sin2x

Combining Plots

 

You can easily add another plot on the same set of axes.

 

Example: Enter another equation in x (e.g. sinx2), highlight the new expression with your mouse, hold down the [Ctrl] key and drag it onto the plot.

sin2x

Annotating Plots

 

You can add additional information to plots by using the drawing tools. Lines, arrows, text, 2-D math, and shapes are available.

 

Example: Click on the plot, then click on the  toolbar. Use the Text Tool (T) to enter labels for the curves. Use [F5] to toggle between text and math, and standard Maple math editor entry keystrokes.

 

3-D Plots

 

Example: Enter an expression in x and y (e.g. sinxy).  From the context panel for the expression, use Plots > 3-D Plots > x,y.

 

Example: To rotate the plot: Click on the plot, hold down the left mouse button and move the mouse.

 

Example: Manipulate the plot by selecting a different tool from the Manipulator list on the context panel.  Now when you hold down and move the mouse, the new action is performed.

 

Tip: You can also change the manipulator tool by clicking on the plot, and then selecting the appropriate tool at the top of the Maple window:

sinxy

Plot Options

 

You can modify the look of your plot in a variety of ways.

 

Plot options can be changed by right-clicking on the plot and modifying the options within the context panel.  Note that the choices available in the context panel are specific to 3-D plots.

 

Example: Select Transparency in the context panel for the plot. Modify the plot transparency by selecting a number between 0 and 1.

 

Plot options can also be changed by clicking on the plot, selecting the Plot menu or plotting toolbar at the top of your Maple worksheet, and selecting the relevant options.

 

Example: Click on the image, and then from the context panel, select  Axes > Boxed. Alternatively, use the axis selection button on the Plot toolbar:

sinxy

Task Assistants, Tutors and Math Apps

As explored above, context menus are one way to solve problems without using Maple commands. Task assistants provide another method. Tutors are useful for teaching and exploring mathematical concepts. The full list of assistants and tutors can be found on the Tools menu.

Steps

Results

Using the Plot Builder Assistant

 

Plots can easily be created in Maple using the built-in Plot Builder.

 

 

Example: Enter the expression you want to plot, for example, x2+y2. From the context panel, select Plot Builder. Using the Plot Builder, you can choose the type of plot you want, add titles, and set options all at once. This example shows a 3-D plot with the use of a shading scheme, normal axes, and a plot title:

 

1. 

For the plot type, select 3-D plot.

2. 

Under Basic Options, for shading, select z, and for axes style, select normal.

3. 

Under Axes and Text, enter a title for the plot.

x2+y2

The Plot Builder allows you to create more than just ordinary 2-D and 3-D plots. The example on the right is a polar plot.

 

Example: Enter the expression 2 sin 4 t+1. Select Plot Builder from the context panel. Select 2-D polar plot for the plot type.

 

2 sin4 t+1

Using the Exploration Assistant

 

The Exploration Assistant allows you to instantly create interactive mini-applications used to explore the parameters of the expressions.

 

Example: Enter the expression you want to explore. For example, enter plot3dcosa x+b siny.  Select Explore from the context panel. From here, you can set the range of values you want to explore, as well as specify any variables to skip.  When you select skip, that parameter remains as a symbolic unknown in the expression; no slider will be created to control that value.

With the given expression, choose to skip x and y.

Learn more: Explore the parameters of the expression. Explore generates a user interface with interactive sliders, dials or gauges that can vary the values for the parameters and show the results.

plot3dcosa x+b siny

Using Tutors in Maple

 

Maple provides tutors which are useful for teaching and exploring mathematical concepts in the subjects of:

• 

Basics

• 

Calculus - Single-Variable

• 

Calculus - Multi-Variable

• 

Complex Variables

• 

Differential Equations

• 

Linear Algebra

• 

Numerical Analysis

• 

Precalculus

• 

Statistics

• 

OptimizationVector Calculus

 

Example: From the menu, select Tools > Tutors > Calculus - Single Variable > Integration Methods. Enter a function and follow the example through by applying the correct rule at each step and using Get Hint for help.

Math Apps

 

Math Apps and other interactive applications provide demonstrations that illustrate various mathematical and scientific concepts. The Math App Guide provides an overview of all of the available applications in many different fields including Discrete Math, Engineering, Finance, Statistics, and more.

 

Example: From the menu, select Tools > Math Apps. To open a Math App, simply click on its icon.

Drum Vibrations

 

Tip: You can also view Math Apps online using the MapleCloud.

Entering Commands

While many operations in Maple can be done through the use of context menus and other interactive tools, Maple also has a rich programming language.

Steps

Results

Entering Maple Commands

 

Many commands are grouped together in packages. You can type the long name, or enter a with command prior to using a command from that particular package.

 

Example: Create a Matrix, M, and apply the command LinearAlgebraDeterminantM to find the determinant of M.

 

Note: If you do not provide the package name, Maple does not know the definition of this function, and so it simply returns the unevaluated expression.

 

You can avoid having to type the long-form of each command by pre-loading the desired package. You can use a colon at the end of the command to suppress output.

 

Example: Load the LinearAlgebra package first using a colon. Try again without the colon to see the difference.

 

Example: Now calculate the Determinant of M using the short-form of the command.

 

Command completion is very useful when typing long command names.

 

Example: Type Gau, then press [Esc] to see a list of possible completions. Use the arrow key to select the desired command and press [Enter], or select the command with the mouse.

 

Tip: Many packages can be loaded through Tools > Load Package. See Tools > Load Package > List All Packages... or click here to see the complete list.

 

M1235

M1235

(7.1)

LinearAlgebraDeterminantM

1

(7.2)

DeterminantM

Determinant1235

(7.3)

withLinearAlgebra:

DeterminantM

1

(7.4)

GaussianEliminationM

1201

(7.5)

 

Document Editing and Formatting Tools

Maple contains numerous word processing tools to help you create professional-looking reports. For your reference, here is a list of some of the more common ones.

Feature

Where to Find It

Built-in title and headings styles

Drop-down list on toolbar

Sections and subsections

Insert > Section

Tables

Insert > Table

Ability to edit table properties

Context panel for the table, or Format > Table > Properties.

Drawing canvas

Insert > Drawing

Font control and ability to define new styles

Format > Styles...

The ability to insert images, tables, and other objects

Insert > Image, Insert > Table

A spell-checker that is aware of mathematical terms

Tools > Spellcheck

Hyperlinks and bookmarks

Format > Convert to > Hyperlink

Format > Bookmarks...

The ability to add headers and footers

Insert > Header Footer

Export to HTML, PDF, etc.

File > Export As

 

Tip: The user manual contains a chapter on creating mathematical documents.

Configuring the Maple Environment

You can customize the Maple environment in many ways. Below is a list of the most common ones. Note that any option set through the Options menu can be set just for this session, or globally (every time you start Maple).

Feature

How to Control Feature

Start page.

Turn it off through Tools > Options, Interface tab.  You can select to just open a new blank worksheet at start-up, or select a custom start page.

See it anytime by clicking the Open the start page icon ( ) on the Maple toolbar.

Option for new documents to start in Document mode (no prompt, evaluate math inline and use self-documenting context panel operations) or Worksheet mode (prompts, all commands shown).

Tools > Options, Interface tab.

See the Default format for new worksheets drop-down menu.

Option to enter math in 2-D math notation (default) or Maple notation.

This applies to math entered at a prompt—that is, in worksheet mode. All math must be entered in 2-D math notation in document mode.

Note: Maple notation is also referred to as 1-D math notation.

 

You can also control the input type for individual lines, without changing the overall default.

Tools > Options, Display tab.

See the Input Display drop-down menu. 

 

x2

x2

(9.1)

vs.

x^2

x2

(9.2)
 

Use context menu on the line above. Selecting Convert to > 2-D Math Input turns the above line into x2.

Number of digits displayed in calculation results.

Maple displays 10 digits by default (though it calculates more).

Tools > Options, Precision tab.

See the Round screen display to drop-down menu.

 

For example, show the floating point value of π. The default result is:

  evalfπ

3.141592654

(9.3)

After setting the screen display to 5, the result is:

 

evalfπ

3.141592654

(9.4)

Add the item to Favorites Palette.

 

Palettes can be reordered or turned off completely.

 

Palette docks can also be expanded and collapsed.

Right-click on the palette item, select Add to Favorites Palette.

 

Go to the View > Palettes menu or click and drag palettes in the palette dock.

 

Use the View> Palettes menu, or the small arrows at the top of the palette to expand and collapse. For the left-hand-side dock, these arrows are in the top-right corner of the palette, to the right of the scroll bar.