Quick Help - Maple Programming Help

Quick Help

Toggle Math/Text

In Document mode, toggling between Text and Math modes switches between entering text and entering 2-D mathematical expressions $\left(\frac{{x}^{2}}{y}\right)$. In Worksheet mode, toggling between Math and Text modes switches between 2-D and 1-D Math commands. By default, Maple uses Math mode.

Use the F5 key to switch between Math and Text modes. Math mode is characterized by a slanted, italic prompt (/) whereas the Text mode is characterized by a regular prompt (|).

In this document, the following icons distinguish modes.

 Document Mode Worksheet Mode

In Document Mode

 Examples Steps ${x}^{2}$ is a function of $x$ x^2 F5 is a function of F5 x A simple problem: 1+3 = 4 F5 A simple problem: F5 1 + 3 Ctrl+= (Command+= for Macintosh)

Note: In Document mode, any statement to be evaluated must be entered in Math mode.

In Worksheet Mode

Examples

Steps

 > $\int {x}^{3}+{x}^{2}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}&d;x$

From the Expression palette, select $\int {f}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}ⅆ{x}$

x^3 + x^2 Tab x

 > int(x^3+x^2, x);

F5

Enter text as it appears.

To display the Maple palettes, see Arranging Palettes in Your Worksheet.

Evaluate and Display on New Line

Use Enter to evaluate your mathematical expression or Maple command. Maple calculates and displays the result on a new line.

Examples

Steps

$\int {x}^{3}+x\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}ⅆx$

From the Expression palette, select $\int {f}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}ⅆ{x}$

x^3 + x Tab x and press Enter

 > factor(x^3+x);

Enter text as it appears and press Enter.

To display the result beside the original expression, see Evaluate and Display Inline.

Evaluate and Display Inline (Maple Document)

In Document mode, use Ctrl+=  to evaluate your mathematical expression or Maple command.

 Example Steps $1+1$ = ${2}$ 1 + 1 Ctrl+= (Command+= for Macintosh)

Context menus display the result beside the original question.

 Example Steps $\mathrm{sin}\left(x\right)$$\stackrel{\text{differentiate w.r.t. x}}{\to }$${\mathrm{cos}}{}\left({x}\right)$ sin(x) Right-click (Control-click, for Macintosh) sin(x). Select Differentiate>With Respect To>x

You can edit the results to replace the arrow with the text of your choice.

 Example Steps The derivative of $\mathrm{sin}\left(x\right)$ is ${\mathrm{cos}}{}\left({x}\right)$ Move to the beginning of the expression. F5 The derivative of Delete  $\stackrel{\text{differentiate w.r.t. x}}{\to }$ F5  is

Leave Superscript/Subscript/Fraction

To leave the superscript, subscript, or denominator of a fraction, use the right-arrow key.

  Example Steps  ${x}^{2}$ x^2 Right-arrow to leave the superscript region  ${x}_{a}$ ${x}_{a}$ x Ctrl+_  a (x Command+_ for Macintosh) x__a Right-arrow to leave the subscript region  $\frac{1}{x+\frac{2}{y}+3}$ 1/x+2/y Right-arrow to leave the denominator of $\frac{2}{y}$ +3 Right-arrow to leave the denominator 

Note: In Maple, subscripts can be indexed or literal.  For details, see 2-D Math Shortcut Keys and Hints.

Complete Symbol/Complete Command

When you type a symbol name in Math mode, Esc (see command/symbol completion keys) automatically converts the name into a properly displayed symbol. When you type the first few letters of a symbol name, Esc displays a popup list of matching symbols. Use Tab to select the proper completion.

 Example Steps $\sqrt{x}$ sqrt then Esc then Tab x

In Math and Text modes, the command/symbol completion keys are used to complete a Maple command or a user-defined variable name. All possible completions are displayed in a popup list. If there is a unique choice, the command is completed automatically.



Example

Steps

 > Student[LinearAlgebra][GramSchmidt]

Stud Tab [L Tab [Gr

Navigating Placeholders

The Expression palette and task templates use fill-in-the-blank placeholders. To fill the placeholders, complete the first entry and then Tab to the next.

The Tab key is also used for indenting in Text mode. The Tab icon allows you to set the Tab key to move between placeholders or to indent.

 Tab icon off. Allows you to move between placeholders using the Tab key. Tab icon on. Allows you to indent using the Tab key.



 Maple Help To display the Maple Help Navigator: Select Help>Maple Help or press Ctrl+F1.   To display Quick Help: Press F1.   To display the Quick Reference Card: Select Help>Quick Reference or press Ctrl+F2.   To display help on a particular topic: Enter ?$\mathrm{topic}$ or place the cursor on the topic name and press F2. For example ?$\mathrm{factor}$ displays the help page for the factor() command.

Math Editing Shortcuts

In addition to the palettes and mouse interactions, keyboard shortcuts are available for all operations.

Common Keyboard Shortcuts (See full list)

Symbol/Formats

Key

Example

Enter/exit 2-D Math

F5

Example using fraction: $\frac{1}{4}$  (Math mode) versus 1/4 (Text mode)

Command/symbol completion

 • Esc, Macintosh and Windows
 • Ctrl+Space, Windows
 • Command+Shift+Space, Macintosh
 • Ctrl+Shift+Space, Linux

 • Right-click expression, Windows and Linux
 • Control-click, Macintosh

Fraction${}^{1}$

/ (forward slash)

Exponent (superscript)${}^{1}$

^ (caret)

${x}^{2}$

Indexed subscript${}^{1}$

Ctrl+_ (Command+_, Macintosh)

${x}_{a}$

Literal subscript${}^{1}$ (subscripted variable name)

__(two underscores)

${x}_{\mathrm{max}}$

Escape next character for entering "^"

\^ (caret)

$u^v$

Square root

$\sqrt{25}$

Navigating the expressions

Arrow keys

$\frac{1}{x+\frac{1}{2}}$

use right arrow key to leave denominator, superscript, or subscript region

Units and Tolerances

Maple supports calculations with units and dimensions. The Tolerances package provides an environment to perform computations with quantities involving tolerances.

 Mode Examples Steps $a:=4⟦m⟧$ = ${4}{}⟦{m}⟧$ To define a variable $a$ as 4 meters,       a := 4       From the Units (SI) palette, select $⟦m⟧$        Ctrl+= (Command+=, for Macintosh) $b:=1.5⟦\mathrm{mach}⟧$ = ${1.5}{}⟦{M}⟧$ To apply a unit not in palettes,       b := 1.5       From the Units (SI) palette, select $⟦{\mathrm{unit}}⟧$        mach       Ctrl+= (Command+=, for Macintosh) $x$$\stackrel{\text{affix unit kilogram}}{\to }$${x}{}⟦{\mathrm{kg}}⟧$ To apply units using context menus,      Right-click (Control-click for Macintosh) x      Select Units>Affix Unit>SI>kilogram $30⟦\mathrm{cm}⟧+1.2⟦m⟧$$\stackrel{\text{simplify units}}{\to }$${1.500000000}{}⟦{m}⟧$ To simplify the units in an expression,      Right-click (Control-click for Macintosh) the expression      Select Units>Simplify $3.5⟦m⟧$$\stackrel{\text{units to FPS system}}{\to }$${11.48293963}{}⟦{\mathrm{ft}}⟧$ To convert an expression with units to a different system of units,      Right-click (Control-click for Macintosh) the expression      Select Units>Convert>System>FPS $3.5⟦m⟧$$\stackrel{\text{replace units}}{\to }$${3.827646544}{}⟦{\mathrm{yd}}⟧$ To convert an expression with units to different units,      Right-click (Control-click for Macintosh) the expression      Select Units>Replace Units      In the dialog, enter yard      Click OK $\mathrm{with}\left(\mathrm{Tolerances}\right)$ $2±0.10\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}$ = ${2.00}{±}{0.100}$ To enter a quantity with an associated tolerance,       2 pm Ctrl+Space (Command+Shift+Space, for Macintosh) 0.10

For more information on using units and dimensions, see Using Units and Dimensions in Maple Documents.

Assignments

Use := (colon equals) to assign a value to a variable.

Note: In Document mode, the assignment statement must be entered in Math mode.

Mode

Examples

Steps

Let $a:=5$

F5 Let F5 a:= 5 Enter

 > a := 5;

Enter text as it appears and press Enter.

Functions

To define a function, use the arrow notation.

Mode

Examples

Steps

$f:=x\to {x}^{2}$

$f\left(3\right)$ = ${9}$

From the Expression palette, select ${f}:={a}\to {y}$

f Tab

x Tab

x^2

f(3)  Ctrl+= (Command+=, for Macintosh)

 > G := (x,y,z) -> x^2+y^2+z^2;
 > G(-1,0,1);

Enter text as it appears. Press enter to evaluate.

 Equations Equations are represented using the = sign. $y=m\cdot x+b$   To assign an equation to a variable, use the assignment operator.    Once assigned to a variable name, you can use the name to manipulate the equation. $\mathrm{rhs}\left(\mathrm{eqn}\right)$= ${m}{}{x}{+}{b}$

Right-click Expression

To easily manipulate an expression in Maple, right-click the expression (Control-click, for Macintosh) to display a context-sensitive menu of applicable options.

Example

Steps

${x}^{2}$



x^2

 • Right-click the expression, Windows and Linux
 • Control-click the expression, Macintosh

Context-sensitive menus are available for Maple input and output.

Example

Steps

 > diff(sin(x), x);

${\mathrm{cos}}{}\left({x}\right)$

Enter text as it appears and press Enter.

 • Right-click the expression output, Windows and Linux
 • Control-click the expression output, Macintosh