Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Maple Quick Start: Talking To Maple Steps Results

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Maple Quick Start

© Maplesoft, a division of Waterloo Maple Inc.

This tutorial is designed to help you become familiar with the Maple environment and
teach you the few fundamental concepts and tools you need to become productive
quickly. 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.

Talking to Maple

Steps Results

Start Page
When you first start Maple, you will see
the Start page. The page points you to a
variety of resources. For example, the
Getting Started icon will bring you to a
page full of tutorials and quick "How do I..
." lessons.
Click on the New Document icon, on the
top left of the page to open a blank
document.
Using [ENTER]
You can start by typing math into your
Maple document and pressing [ENTER] in
order to see the result.

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


3 (1.1)
Notice that the result appears on the
next line.

Using [Alt]+[ENTER]

If you would like to have the result


returned on the same line, press [ALT]+
[ENTER].

=
Example: Type "x+5-2" then [Alt]+
[ENTER].
integrate w.r.t. x
=
Context Panel

Maple's context panel is one of the most


integrate w.r.t. x
important tools in Maple. It can be used =
to perform a wide variety of operations,
and the options change depending on
what expression or object your cursor is
on. The context panel is on the right side
of your Maple workspace.

Example: If you place your cursor on the


last result. 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.

It is also possible to generate plots from


the context menu;
Example: To plot the result of the
integration, click on the result, and then
select Plots > 2-D Plot.
Changing the Problem

Math in a Maple document is live. You can 5 (1.2)


go back, make changes, and re-execute
the problem to obtain a new result. integrate w.r.t. x
=

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 panel example,


above, change the "x" to "10 x". Highlight
the entire line, including the plot, then
click the Execute selection button,
, found on the toolbar at the top of

the Maple window. All selected


calculations are updated.

Tip: Clicking the Execute the entire


worksheet button, , re-calculates

the entire document.


full angle reduction identity: sin(2*x)=2*sin(x)*cos(x)
Smart Popups

At the top of the context panel, you'll find


Smart Popups, which give you a preview
of the result of an operation before you
apply it.

Example: Enter sin(2x). From the


Context Panel, you can convert this
expression to an equivalent form
using trig identities.
Entering Math

Steps Results

Exact Answers and Numeric


Approximations
5
=
Maple calculates exact answers (for 6
example, fractions remain as fractions).
Example: On a new line, enter 1/2 + 1/3.

Important! Note that when you enter a


fraction, the / automatically moves you
into to the denominator. Use the right-
arrow key to come out again.
5 at 5 digits
= 0.83333
Maple also calculates numeric 6
approximations.
Example: Click on the result above and
select Approximate from the context
panel. Select an 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: On the context panel, under
Number Format, select Scientific.
Palettes

Maple has over 1000 expressions and


symbols within its collection of palettes,
found on the left side of your Maple
window. Some of them insert fill-in-the-
blank templates into your document, and
are useful for problem entry.

Example: Using the Expression


Palette, find the definite integral of
from 0 to 1. Open the expression
(2.1)
palette (click Expression on the left-hand
side of your Maple document) and click

the definite integral ( ) symbol. A

definite integral template will appear in


your worksheet. Fill in the place-holders
(use [TAB] to move to the next
placeholder). When done, press [ENTER]
to evaluate.

Important! Use ^ to create an


exponent/superscript, and right-arrow to
get out again.

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: To see the full list of available


palettes and customize their order and
visibility, right-click on the palette dock
and select Arrange Palettes...
Symbol Completion

The symbol completion mechanism


provides an alternative to palettes for
entering symbols.

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

Example: Try entering . To enter


, type pi [Esc]. For the square root
symbol, enter sqrt [Esc].

The right-arrow will take you outside the


square root symbol.

The same mechanism can be used to


enter templates.
Example: Type int [Esc]. Choices include
various integration templates.

Case-Sensitivity

Maple is case-sensitive. This means, for


example, that a lower case x and an
=
upper case X will be treated as two
different variables. =

Example: Enter " ".


Example: Enter " ".
Compare the results.
Multiplication
In the case of a number multiplied by a
variable only, you have the option of
leaving out the multiplication symbol
entirely, as the examples up to now have
shown. =
Example: Type " 3x + 4x ".
Maple will insert a space to indicate the
implicit multiplication.

In general, you can use * or a space to


denote multiplication. When using
standard math notation, the * appears as =
a center dot ( ).

Example: Type " 3 [space] x + 5 * x".

Implicit multiplication offers convenience


and additional typesetting options, but 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 ".


The result is not because the two
expressions are not the same. If you
choose to Differentiate using the
context panel, you will see that x, y, and
xy all appear as variables in this
expression.
Mathematical Notation
solve DE

Maple understands familiar mathematical


notation.

For example, Maple understands that


is a differential equation in
.

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 panel.

Label References

Maple uses label references.

(2.3)
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


(from above) by x, using labels. Your label
number may be different than the one
shown.

To reference an equation from another


document, use Insert > Reference...
Variable Assignment

In order to assign a value to a variable


name, use the assignment statement,
denoted by a colon followed by the equals
sign, in the form var := value.
(2.4)

Example: To assign the value "10" to the


variable name "cost", type "cost := 10". 20 (2.5)
After a value has been assigned to "cost",
it can be used in subsequent calculations.

You can see any assigned variables and


their respective values in the Variables
palette.

Defining Functions
To define a function, use arrow
notation, such as . Enter the
arrow operator by typing a hyphen [ -
] followed by a greater than sign [ > ].
Maple automatically reformats those
characters as a single arrow character. (2.6)
Example: Define a function to take a
value, w, and return its square.
4 (2.7)

You can then call the function, as x2 (2.8)


shown.
Combining Text and Math
In Maple you can combine math and text in the same paragraph.

Steps Results
Example: Start by entering a simple
=
computation.

The integral =
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.

Place your cursor at the end of the The integral =


output, press [F5], and complete the rest
of the sentence. , as you can see.

Modify some of the terms in the problem, The integral =


highlight the entire sentence and click
execute all selected groups ( ) to , as you can see.

re-execute the computation.


If you do not wish the mathematics
that appears in your text to be
executable, you can make your
mathematical expressions inert. This
means that when you execute a
document or region that contains
these expressions, they are treated as
static text rather than a computation. The expression is easy to
simplify.
(3.1)
Example: Using [F5] to toggle back and
forth between math and text as you type,
create the sentence "The expression
is easy to simplify.". Highlight
the entire sentence and click execute all The expression is easy to
simplify.
selected groups ( ). The math in

the sentence gets executed and the


results are displayed. Now enter it again,
but this time use [Shift] [F5] to enter
math mode. This time when you execute
the sentence, nothing happens. The math
is treated as static text, not executable
math.
Click on the two expressions. Note that
the live math has a blue background and
the inert math has a gray background.
You can also convert live math to inert
math by highlighting the expression and
then pressing [Shift] [F5].

Tip: If you are trying to enter math but it doesn't seem to be formatting properly, you
are most likely in text mode. In math mode, the cursor is slanted and has a dotted box
around it. In text mode, the cursor appears as a vertical bar. You can also check what
mode you are in by looking at the top left of the toolbar. In text mode it will look like
. In math mode it will look like . You can use

these toolbar buttons to change modes as an alternative to pressing [F5].


Plotting
Maple can produce a large variety of 2-D and 3-D plots and animations.

Steps Results

2-D Plots

The fastest way to plot an expression in


Maple is to use the context panel.

Example: Enter an expression in x (for


example, ), then select Plots > 2-D
Plot from the context panel.

You can manipulate this plot in several


ways using the Plot Manipulator tools,
found on the Plot toolbar and also on the
context panel.

Example: To pan the plot, click on

(or select Manipulator>Pan from the


context panel). Hold down the left mouse
button and use the mouse to move the
plot around.
Example: To zoom in and out, use
. Hold down the left mouse

button and draw a rectangle around the


area you wish to zoom in on.
Example: To find the coordinates of
points on your curve, select
Manipulator>Point Probe and Probe
Info>Nearest point on line, or select
the corresponding options using
Combining Plots

You can easily add another plot on the


same set of axes.

Example: Plot . Then enter


another equation in x into your worksheet

(e.g. ), highlight the new

expression with your mouse, hold down


the [Ctrl] key and drag it onto the plot.

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. ). Select Plots > 3-D Plots
> x,y from the context panel.
If you used the Drawing tools in the
previous example, click on the Plot button
on the toolbar, , to

switch back into plot manipulation mode.


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

Example: Pan and zoom the plot by


selecting the appropriate tool from the
toolbar or the Manipulator list on the
context panel. Now when you hold down
and move the mouse, the new action is
performed.
Plot Options

You can modify the look of your plot in a


variety of ways.

Plot options can be changed using the


context panel. The available options
depend on the type of plot.

Example: Click Transparency and


modify the plot transparency.
Task Assistants, Tutors, and Math Apps
Maple includes many interactive tools for performing simple and complex tasks, as well
as for exploring concepts. See the Tools menu for the full list.

Steps Results

Using the Plot Builder


Assistant

Plots can easily be created and


customized in Maple using the Plot
Builder. Using the Plot Builder, you can
choose the type of plot you want and set
options all at the same time. The plot is
updated instantly so you can see the
results of your choices.

Example: Enter the expression you want


to plot, for example, . From the
context panel, select Plot Builder, then
choose 2-D contour plot as the plot
type.
Example: Using the drop-down menu,
change the plot type to 3-D plot. The
plot changes from a contour plot to a 3-D
plot. Then use the options to customize
the plot. For example:

Under Basic Options, for shading, select


zhue, and set style to surface.

Under Axes and Text, enter a title for


the plot and press [ENTER].

Tip: You can use the Plot Builder to


create and customize your plot, and then
use the show command option under
Basic Options to see the corresponding
Maple command the produces exactly
that plot.
Using the Exploration
Assistant

The Exploration Assistant allows you to


instantly create interactive mini-
applications used to explore the
parameters of an expression, even if that
expression involves Maple commands.
Explore generates a user interface with
interactive sliders, dials or gauges that
can vary the values for the parameters
and show the results.

Example: Enter
. 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 this
expression, choose to skip x and y. Move
the sliders to change the plot.
Using Tutors in Maple

Maple provides many tutors, which are


useful for teaching and exploring
mathematical concepts in calculus,
precalculus, linear algebra, statistics, and
more.

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 in Maple provide interactive


explorations of various mathematical and
scientific concepts. Math Apps are
available for many different fields
including algebra, functions, calculus,
discrete math, engineering, finance,
statistics, and more.

Examples: From the menu, select Tools


> Math Apps. Choose from the different
categories by clicking on the
corresponding icon.
For instance, click on Algebra and
Geometry, and then click on Conic
Sections, which is in the Geometry
section. Move the sliders to see how the
intersection of the plane through the cone
results in different curves.
From the Calculus>Integral section,
choose Solids of Revolution: Volume
by Disks, and then enter, or even draw a
curve and see an animation of its
revolution.

In addition to interactive Math Apps, in


the Engineering and Applications
section, you will also find example
applications that illustrate how to solve
and explore particular problems using a
command-driven approach.

Tip: You can also view Math Apps online in the MapleCloud (at maple.cloud), using
only a web browser.
Entering Commands
While many operations in Maple can be done through the use of the context panel and
other interactive tools, Maple also has an extensive set of commands, as well as a rich
programming language.

Steps Results

Entering Maple Commands

Many commands are grouped together in


packages.

(6.1)
Example: Using the Matrix palette,
create a Matrix, M, and then use the
command
(6.2)
to find the
determinant of M.

Note: If you do not provide the package


(6.3)
name, Maple does not know the definition
of this function, and so it simply returns
the unevaluated expression, as shown. If
you see something like this, it usually
means that you need to tell Maple what
package the command comes from, or
that you have mistyped the command
name.

You can avoid having to type the long-


form of each command by loading the
desired package using with(Package). This
command loads the package and returns
a list of all the commands in that
package. You can put a colon at the end
of any command to suppress its output.
Example: Load the LinearAlgebra
package. Now add a colon to the end to
see the difference.

Example: Now calculate the Determinant


of M using the short-form of the (6.4)
command.

Command completion is very useful when


typing long command names.

Example: Type Gau, then press [Esc] to (6.5)


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... to see the complete list of
packages.
Getting Help
Many resources are available to help you find your way around Maple, from "How do I?"
guides for new users to information for advanced Maple programmers.

Steps Results

Using the Help System

You can open the help system at any time


from the Help menu, Help>Maple Help.
From here, you can browse the entire
help system through the Table of
Contents, or search for what you need. Of
particular note:

The Maple Portal, which provides a


variety of tutorials and How do I...
topics for new users
The User Manual and Programming
Manual, linked from the start page

If you know the name of the command


you are interested, you can bring up its
help page using the ? command.
Example: Type ?isprime to bring up the
help page for the primality test command

Tip: You can place your cursor on a Maple


command in your worksheet and press
[F2] to bring up the help page for that
command.
Online Resources
From the Help menu, select Help>On the Web
for easy access to a variety of additional
resources. Of particular note for new users:
Student and Teacher Centers
MaplePrimes User Forum, where you can
ask questions of more experienced users and
Maplesoft staff
Application Center, which contains
thousands of Maple applications you can
explore, use, and learn from

You might also like