Executable or Nonexecutable Math - Maple Help

Entering 2-D Math

2-D math entry allows you to enter mathematical expressions in standard form as found in papers and books.

This document discusses general entry and entry for specific classes of expressions using 2-D math.

To interact with the examples on this page, open it as worksheet and execute the steps.

Note for non-Windows users: The keystrokes given in this document are for Windows.  There will be differences for other platforms. For instance, for Mac users, replace Ctrl with Command to follow the examples. For more keyboard shortcuts for your platform, see Shortcut Keys.

 Standard Entry Much of the standard entry is covered on the 2-D Math Shortcut Keys help page, including how to navigate 2-D expressions and how to escape characters that are shortcut keys. For more introductory information, see the basic Overview of 2-D Math and the material found under Getting Started in the Maple Help System. This page covers some further details and demonstrates a few nuances using some helpful examples.

Executable and Nonexecutable Math

2-D math expressions are by default executable.

To evaluate an expression and display the result on a new line, press:

 • Enter, Windows and Linux
 • Return, Mac

To evaluate an expression and display the result inline, press:

 • Alt + Enter, or Ctrl + =, Windows and Linux
 • Alt + Return, or Command + =, Mac

You can toggle a 2-D math expression to nonexecutable math. Use nonexecutable math for expressions that are intended only for display.

When you are editing a 2-D math expression, the background color indicates if the math is executable (blue background) or nonexecutable (gray background).

 Executable Math Nonexecutable Math

To toggle between executable and nonexecutable math, click an expression and use the shortcut key Shift + F5.  Alternatively, under the Edit menu, clear the check box beside Executable Math.

Tip: If an expression is executed accidentally, it can lead to error messages (if it is not valid Maple syntax) or unwanted output. If this happens, toggling the expression to nonexecutable math removes the error message or output and changes the math to nonexecutable.

Top of the Page

Multiplication

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

 > $2\cdot a\cdot {a}^{3}$
 ${2}{}{{a}}^{{4}}$ (3.1)
 > $\mathrm{expand}\left(\left(x+a\right)\cdot \left(x+b\right)\right)$
 ${a}{}{b}{+}{a}{}{x}{+}{x}{}{b}{+}{{x}}^{{2}}$ (3.2)

2-D math input allows for some implicit multiplication, that is, writing a multiplication operation without requiring a multiplication sign. For example, a space is used between x and x to mean multiplication:     = ${{x}}^{{2}}$



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

Exceptions to this rule include cases where it is clear that only multiplication can be implied. Then a space is not necessary:

 >
 ${x}$ (3.3)
 > $\mathrm{expand}\left(\left(x+1\right)x\right)$
 ${{x}}^{{2}}{+}{x}$ (3.4)

Note: For a product containing integers and decimals, implicit multiplication can be used only if the number occurs in the left-most position in the product. For products of numbers, use explicit multiplication (*). However, you can use implicit multiplication for products containing fractions.

Valid

= ${2}{}{x}$

Not valid

$23$

 

 

Valid

$2\cdot 3$ = ${6}$

$2.3\cdot 5.3333333333$ = ${12.26666667}$

Valid

= $\frac{{10}}{{9}}$

To avoid common errors in entering expressions in 2-D math, Maple automatically inserts an explicit multiplication symbol in certain cases.  You can control this feature. For details, see the Convert Space to Explicit Multiplication Operator section of the Options Dialog.

 Using space to imply multiplication Expression and result Space between x and x = ${{x}}^{{2}}$ Space between x and (x+1)   Space between f and (x+1) When you type a space between x and (x+1), Maple automatically inserts an explicit multiplication symbol to indicate multiplication. $\mathrm{expand}\left(x\cdot \left(x+1\right)\right)$ = ${{x}}^{{2}}{+}{x}$  $\mathrm{expand}\left(f\cdot \left(x+1\right)\right)$ = ${f}{}{x}{+}{f}$ No space between f and x The expression parses differently than  = ${f}{}{x}{+}{f}$  because without the space it means function application.  $\mathrm{expand}\left(f\left(x+1\right)\right)$ = ${f}\left({x}{+}{1}\right)$   Caution: Do not put a space between a function name and its arguments.  This will be interpreted as multiplication. This results in the incorrect result see here, because a space between cos and (a) is multiplication!   With no space, this is the cos function applied to a, and the result is 1, as expected.   $a≔0:$ $\mathrm{cos}\cdot \left(a\right)$ = ${0}$  $\mathrm{cos}\left(a\right)$ = ${1}$

In addition, by default, expressions like $2\left(x\right)$ and $2.1667\left(y\right)$ parse to products instead of operators (the latter being the default in 1-D math).
This behavior can be changed using the Typesetting Rule Assistant, or by adjusting Typesetting settings as follows:

 > $\mathrm{Typesetting}:-\mathrm{Settings}\left(\mathrm{numberfunctions}=\mathrm{true}\right):$
 > $2\left(x\right)$
 ${2}$ (3.5)
 > $\mathrm{Typesetting}:-\mathrm{Settings}\left(\mathrm{numberfunctions}=\mathrm{false}\right):$
 > $2\left(x\right)$
 ${2}{}{x}$ (3.6)

Top of the Page

2-D Operators

The 2-D math mode allows direct entry of 2-D mathematical objects, such as integrals, sums, products, and limits.

Command-Symbol Completion Keys

 Esc, Mac, Windows, and Linux
 Ctrl + Space, Windows
 Ctrl + Shift + Space, Linux

These are also available on the Expression and Calculus palettes.

Examples

Steps

Definite sum:

$\sum _{i=1}^{n}i$ = $\frac{{\left({n}{+}{1}\right)}^{{2}}}{{2}}{-}\frac{{n}}{{2}}{-}\frac{{1}}{{2}}$



 1 Type $\mathrm{sum}$ and use command completion to select $\sum$
 2 Press Ctrl + ' and type $i=1$
 3 Use Right Arrow key to exit subscript
 4 Press Ctrl + Shift + " and type $n$
 5 Use Right Arrow key to exit superscript
 6 Type $i$

Alternatively:

 1 Type $\mathrm{sum}$ and use command completion to select $\sum _{{l}}^{{r}}{f}$
 2 Press Tab to move between placeholders and replace:
 • ${l}$ with $i=1$
 • ${r}$ with $n$
 • ${f}$ with $i$

Directional limit:

$\underset{x\to 0+}{\mathrm{lim}}\frac{1}{x}$ = ${\mathrm{\infty }}$



 1 Type $\mathrm{lim}$ or $\mathrm{limit}$, press Ctrl + ' , type $x$ ->$0+$
 2 Press Right Arrow key
 3 Type $\frac{1}{x}$

Alternatively:

 1 Type $\mathrm{lim}$ and use command completion to select $\underset{{x}\to {a}}{lim}{f}$
 2 Press Tab to move between placeholders and replace:
 • ${x}$ with $x$
 • ${a}$ with $0+$
 • ${f}$ with $\frac{1}{x}$

Directional limit:

$\underset{x\to 0-}{\mathrm{limit}}\frac{1}{x}$ = ${-}{\mathrm{\infty }}$



 1 Type $\mathrm{lim}$ or $\mathrm{limit}$, press Ctrl + ' , type $x$ ->$0-$
 2 Press Right Arrow key
 3 Type $\frac{1}{x}$

Integrals require a special character for the 'd' prefix of the integration variable (DifferentialD):

= ${50}$



 1 Type $\mathrm{int}$ and use command completion to select $\int$
 2 Press Ctrl + Shift + _ and type $0$.
 3 Press Right Arrow key
 4 Press Shift + ^ and type $10$
 5 Press Right Arrow key
 6 Type  and use command completion to select the Differential'd'
 7 Type $x$

The integration limits can also be entered over and under the integral sign:

= ${50}$

 1 Type $\mathrm{int}$ and use command completion to select $\int$
 2 Press Ctrl + ' and type $0$
 3 Press Right Arrow key
 4 Press Ctrl + Shift + " and type $10$
 5 Press Right Arrow key
 6 Type  and use command completion to select the Differential'd'
 7 Type $x$

In addition, many formatted 2-D notations are directly available in the command-symbol completion mechanism. This alternative entry technique is demonstrated here:

= ${50}$

 1 Type $\mathrm{int}$and use command completion to select ${\int }_{{a}}^{{b}}{f}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆ{x}$
 2 Press Tab to move between placeholders and replace:
 • ${a}$ with $0$
 • ${b}$ with $10$
 • ${f}$ with $x$
 • ${x}$ with $x$

Inert Functions
Inert functions are used to delay evaluation. That is, during computations, the operation they represent remains unperformed.

Inert versions of the int, sum, and limit functions are denoted by the symbols appearing gray in color, the inert version of eval has the evaluation bar in gray, and the inert diff function has the differentiation symbols in gray.

You can enter these functions in 2-D math in two ways:



Example:  = ${\int }{x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$

Steps

Using command-symbol completion:

The inert functions can be entered with command-symbol completion using the inert versions of the function names, such as Int and Sum.

 1 Type $\mathrm{Int}$ and use command completion to select ${\int }{f}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$
 2 Press Tab to replace the placeholders ${f}$ and ${x}$ with $x$

Using palettes:

The active (noninert) functions can be entered from the palettes. You can then convert the expression to its inert form.

 1 From the Expression or Calculus palette, select the template $\int {f}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}ⅆ{x}$.
 2 Press Tab to replace the placeholders ${f}$ and ${x}$ with $x$
 3 From the Context Panel for the expression, select 2-D Math > Convert To > Inert Form. (The ${\int }$ and ${ⅆ}$ turns gray in color.)



Top of the page

Separators while Programming in 2-D Math

In general, 2-D math statements do not need to be terminated with a semicolon. However, a statement separator (semicolon or colon) is necessary between two statements in one input region. Otherwise, there will be ambiguity when Maple parses multiple statements.

In the following example, an error occurs because a separator has been omitted between the two statements entered between the use and end use keywords.

 

This issue can be resolved by adding a semicolon after the first statement.

 ${z}{≔}{a}$ (5.1)

To suppress the output, use a colon after the end use statement:

Derivative Notation and Implied Dependency

Many standard derivative notations are supported for 2-D math entry methods, including prime notation, dot notation, Leibniz notation, and repeated index notation, but there are a number of settings that you must be aware of when using these. Display in output can be controlled as well.

 > $\mathrm{restart}$

Prime Notation

Prime notation, by default, uses the variable $x$. When entering a derivative in prime notation, if no dependency is present, then the function is assumed to be a function of $x$. For example:

 > $f''$
 $\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}\left({x}\right)$ (6.1.1)
 >
 $\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}\left({x}\right){+}{3}{}{y}\left({x}\right){=}{0}$ (6.1.2)

If an explicit dependency is present, the function is assumed to be the derivative of a function of $x$ evaluated at that value. If the dependent variable is not assigned, or is a known function (like sin), then D notation is used:

 > $f'''\left(0\right)$
 ${{\mathrm{D}}}^{\left({3}\right)}\left({f}\right)\left({0}\right)$ (6.1.3)

To enter the prime notation:

 1 Type the expression in math mode, or
 2 From the Calculus palette, select the appropriate template. To fill in the content, navigate through the placeholders using the Tab key.

If the dependent variable is assigned, and is not a known function, then eval/diff notation is used:

 >
 > $q''\left(0\right)$
 $\genfrac{}{}{0}{}{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{q}\left({x}\right)\right)}{\phantom{\left\{{x}{=}{0}\right\}}}{|}\genfrac{}{}{0}{}{\phantom{\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{q}\left({x}\right)\right)}}{\left\{{x}{=}{0}\right\}}$ (6.1.4)

To enter the prime notation:

 3 Type the expression in math mode, or
 4 From the Calculus palette, select the appropriate template. To fill in the content, navigate through the placeholders using the Tab key.

The variable becomes more important when prime is applied to an expression, as follows:

 > $\left({x}^{2}+x\right)'$
 ${2}{}{x}{+}{1}$ (6.1.5)

Dot Notation

Dot notation, by default, uses the variable $t$, so names with a dot and no dependencies explicitly listed are assumed to depend on $t$:

 > $\stackrel{..}{f}$
 $\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}\left({t}\right)$ (6.2.1)
 >
 $\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}\left({t}\right){+}{3}{}{y}\left({t}\right){=}{0}$ (6.2.2)

The dot notation can be entered in one of the following ways:

Using keyboard shortcuts

Using palette templates

 1 Type $f$
 2 Press Ctrl + Shift + "
 3 Type $..$
 4 Use the Right Arrow key to leave the superscript position
 1 Select $\stackrel{..}{{A}}$ from the Calculus palette
 2 Replace $\stackrel{}{{A}}$ with $f$



Just as for primes, the use of dot with an explicit dependency different from the dot variable is assumed to be the derivative of a function of $t$ evaluated at that value:

 > $\stackrel{..}{f}\left(0\right)$
 ${{\mathrm{D}}}^{\left({2}\right)}\left({f}\right)\left({0}\right)$ (6.2.3)

To enter the dot notation:

 3 Type $f$
 4 Press Ctrl + Shift + "
 5 Type $..$
 6 Use the Right Arrow key to leave the superscript position
 7 Type $\left(0\right)$

Prime or Dot Notation in Output Display

The output display can be modified to use prime and/or dot notation in the interactive Typesetting Rule Assistant, or by using the Typesetting package Settings command.

For example, use dot notation in typeset derivatives in place of $\frac{ⅆ}{ⅆt}$ notation:

 > $\mathrm{Typesetting}:-\mathrm{Settings}\left(\mathrm{typesetdot}=\mathrm{true}\right):$
 > $\stackrel{..}{f}$
 $\stackrel{{\mathbf{..}}}{{f}}\left({t}\right)$ (6.3.1)
 >
 $\stackrel{{\mathbf{.}}}{{y}}\left({t}\right){+}{3}{}{y}\left({t}\right){=}{0}$ (6.3.2)

Leibniz Notation

Leibniz notation can be used to specify derivatives and partial derivatives. Short-form use for partial derivatives requires that the function dependencies be suppressed. Function dependency suppression can be enabled in the interactive Typesetting Rule Assistant, or by using the Typesetting package Suppress command.

Univariate examples:

 >
 ${2}{}{x}{+}{1}$ (6.4.1)
 >
 ${2}$ (6.4.2)

To enter the Leibniz notation for univariate differentiation, select $\frac{ⅆ}{ⅆ\phantom{\rule[-0.0ex]{0.2em}{0.0ex}}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}$  and $\frac{{ⅆ}^{2}}{{ⅆ}^{\phantom{\rule[-0.0ex]{0.2em}{0.0ex}}}{{x}}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}$  , respectively, from the Calculus palette and press Tab to fill in the contents.

Multivariate examples:

 >
 ${2}{}{x}{}{y}$ (6.4.3)
 >
 ${{y}}^{{2}}{+}{{z}}^{{2}}$ (6.4.4)

To enter the Leibniz notation for multivariate differentiation, select $\frac{\partial }{\partial \phantom{\rule[-0.0ex]{0.2em}{0.0ex}}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}$  and $\frac{{\partial }^{2}}{\partial \phantom{\rule[-0.0ex]{0.2em}{0.0ex}}{x}\partial \phantom{\rule[-0.0ex]{0.2em}{0.0ex}}{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}$  , respectively, from the Calculus palette and press Tab to fill in the contents.

Short form of Leibniz notation:

You can use Typesetting:-Suppress to evaluate the derivative as follows:

 > $\mathrm{Typesetting}:-\mathrm{Suppress}\left(f\left(x,y\right)\right)$
 >
 $\frac{{\partial }{f}}{{\partial }{x}}$ (6.4.5)

This typeset enables short-form entry of function names as well:

 > $f$
 ${f}$ (6.4.6)

To enable repeated index notation for partial derivatives, use the following command:

 > $\mathrm{Typesetting}:-\mathrm{Settings}\left(\mathrm{userep}=\mathrm{true}\right):$
 > ${f}_{x,x,y}$
 ${{f}}_{{x}{,}{x}{,}{y}}$ (6.4.7)

Top of the page

Vector Calculus

In addition to standard matrix and vector-style entry, 2-D math also supports vector and vector calculus operations in standard syntax through the VectorCalculus package.



Command-Symbol Completion Keys

 Esc, Mac, Windows, and Linux
 Ctrl + Space, Windows
 Ctrl + Shift + Space, Linux

Dot Product

Type <1,2>.<0,1>:

 > $⟨1,2⟩.⟨0,1⟩$
 ${2}$ (7.1.1)

Cross Product

 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$

Type &x as cross-product operator:

 >

Or, use × from the Common Symbols palette:

 > $⟨1,2,3⟩×⟨7,8,0⟩$

In the following example, note the change in display of output for $⟨1,2,3⟩×⟨7,8,0⟩$ after unloading the package.

 > $\mathrm{unwith}\left(\mathrm{VectorCalculus}\right):$
 > $⟨1,2,3⟩×⟨7,8,0⟩$
 $\left[\begin{array}{c}{-24}\\ {21}\\ {-6}\end{array}\right]$ (7.2.1)

 > $\mathrm{restart}$
 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$

The coordinate system can be specified within individual calls:

 >

Or, set coordinate system as follows:

 > $\mathrm{SetCoordinates}\left('\mathrm{cartesian}'\left[x,y,z\right]\right):$

Choose from one of the following input style:



 > $\mathrm{Nabla}\left({x}^{2}+{y}^{2}+{z}^{2}\right)$
 > $\mathrm{Del}\left({x}^{2}+{y}^{2}+{z}^{2}\right)$
 > $\mathrm{Gradient}\left({x}^{2}+{y}^{2}+{z}^{2}\right)$

From the Common Symbols palette, select ∇, or type $\mathrm{nabla}$ and use command completion to select ∇.
Alternatively, type $\mathrm{Gradient}$, select $\nabla {x}$ and enter the vector field.

 > $\nabla \left({x}^{2}+{y}^{2}+{z}^{2}\right)$

Note: For computation using other coordinate systems, see VectorCalculus[Coordinates].

Divergence

 > $\mathrm{restart}$
 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$
 > $\mathrm{SetCoordinates}\left('\mathrm{cartesian}'\left[x,y,z\right]\right):$

Use one of the following methods:

 >
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (7.4.1)
 >
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (7.4.2)

The vector field can be assigned separately as well:

 > $V≔\mathrm{VectorField}\left(⟨{x}^{2},{y}^{2},{z}^{2}⟩\right)$
 > $\nabla .V$
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (7.4.3)
 > $\mathrm{Divergence}\left(V\right)$
 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (7.4.4)



From the Common Symbols palette, select ∇ followed by · .
Alternatively, type $\mathrm{Del}$ or $\mathrm{Nabla}$ to enter the Del operator, or type $\mathrm{Divergence}$, select $\nabla ·{x}$ and enter the vector field.

 > $\nabla ·⟨{x}^{2},{y}^{2},{z}^{2}⟩$

Note: For computation using other coordinate systems, see VectorCalculus/Coordinates.

 ${2}{}{x}{+}{2}{}{y}{+}{2}{}{z}$ (7.4.5)

Curl

 > $\mathrm{restart}$
 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$
 > $\mathrm{SetCoordinates}\left('\mathrm{cartesian}'\left[x,y,z\right]\right):$

Use one of the following methods:

 >
 >
 >

Create the vector field separately:

 >
 > $\mathrm{Curl}\left(C\right)$

From the Common Symbols palette, select ∇ followed by × . Or, type $\mathrm{Del}$ or $\mathrm{Nabla}$ to enter the Del operator, or type $\mathrm{Curl}$, select $\nabla ×{x}$ and enter the vector field.

 >

Note: For computation using other coordinate systems, see VectorCalculus/Coordinates.

Laplacian

 > $\mathrm{restart}$
 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$
 > $\mathrm{SetCoordinates}\left('\mathrm{cartesian}'\left[x,y,z\right]\right):$



 1 Laplacian in Cartesian coordinates:
 > $\mathrm{Laplacian}\left({x}^{2}+{y}^{2}+{z}^{2}\right)$
 ${6}$ (7.6.1)

 2 Laplacian using polar coordinates:
 >
 $\frac{{1}}{{r}}$ (7.6.2)



 3 Laplacian using cylindrical coordinates:
 >
 $\frac{{1}{-}\frac{{\mathrm{cos}}\left({\mathrm{\theta }}\right)}{{r}}}{{r}}$ (7.6.3)

4.

Use expressions of the form (Del . Del)(f), Del . (Del(f)), or Del . Del(f):

 > $\nabla ·\nabla \left({x}^{2}+{y}^{2}+{z}^{2}\right)$
 ${6}$ (7.6.4)
 > $\left(\nabla ·\nabla \right)\left({x}^{2}+{y}^{2}+{z}^{2}\right)$
 ${6}$ (7.6.5)
 > $\nabla ·\left(\nabla \left({x}^{2}+{y}^{2}+{z}^{2}\right)\right)$
 ${6}$ (7.6.6)



 5 Type $\mathrm{Del}$ or $\mathrm{Nabla}$ to enter the Del operator, or type $\mathrm{Laplacian}$, select ${\nabla }^{2}{x}$ and enter the vector field. Alternatively, press Shift + ^ to enter 2 as exponent of Del. Use right arrow key to leave exponent.

 6 From the Expression palette, select ${{a}}^{{b}}$. Use the Tab key to move between placeholders and replace ${a}$ with ∇ (available in the Common Symbols palette) and ${b}$ with $2$.

 > ${\nabla }^{2}\left({x}^{2}+{x}^{2}+{x}^{2}\right)$

 ${6}$ (7.6.7)



Top of the page

Special Functions

For convenience and control you can customize 2-D math typesetting of special functions. There are three ways to input special functions: by calling sequence, by command completion, or by enabling parsing rules.  You can control the output display of special functions as well.

Special Functions Entry in Input

You can enter special functions in Maple using their calling sequences, for example, BesselJ(v,x) is the Bessel function of the first kind.

You can also use the command completion mechanism to enter special functions in a typeset mathematical notation (textbook notation).

Command-Symbol Completion Keys

 Esc, Mac, Windows, and Linux
 Ctrl + Space, Windows
 Ctrl + Shift + Space, Linux

For example,type $\mathrm{BesselJ}$, use command completion to select ${J}_{{v}}\left({x}\right)$, and press Tab to replace ${v}$ with $v$ and ${x}$ with $x$.
Similarly, enter the BesselI function.

 > $\mathrm{expr}≔{J}_{v}\left(x\right)+{I}_{v}\left(x\right)$
 ${\mathrm{expr}}{≔}{\mathrm{BesselJ}}\left({v}{,}{x}\right){+}{\mathrm{BesselI}}\left({v}{,}{x}\right)$ (8.1.1)

In addition, the completion of functions where the mathematical notation is based on an alphanumeric character is available by using command-symbol completion on that character. For example, to enter the BesselI function using command completion, type $I$ and select ${I}_{{v}}\left({x}\right)$.

The final option is to enable parsing rules so you can enter, for example, J with a subscript and have it parsed as the BesselJ function. In most cases, the rules for 2-D math entry must be enabled using the Typesetting Rule Assistant or from the command line using the Typesetting[EnableParseRule] function.

Enable the parse rules for Bessel functions.

 > $\mathrm{Typesetting}\left[\mathrm{EnableParseRule}\right]\left(\left\{"BesselJ","BesselY","BesselI","BesselK"\right\}\right):$



Now you can enter Bessel functions in standard notation.
Type input as shown:

 >
 ${\mathrm{expr}}{≔}{{J}}_{{v}}\left({x}\right){+}{{I}}_{{v}}\left({x}\right)$ (8.1.2)

Special Function Display in Output

You can change the display of special functions in the output using the Typesetting:-EnableTypesetRule command.

 > $\mathrm{Typesetting}\left[\mathrm{EnableTypesetRule}\right]\left(\mathrm{Typesetting}\left[\mathrm{SpecialFunctionRules}\right]\right):$
 > $\mathrm{expr}$
 ${{J}}_{{v}}\left({x}\right){+}{{I}}_{{v}}\left({x}\right)$ (8.2.1)



Note: Under standard typesetting mode, the option for typeset display of special functions has no effect:

 > $\mathrm{interface}\left(\mathrm{typesetting}=\mathrm{standard}\right):$
 > $\mathrm{expr}$
 ${\mathrm{BesselJ}}\left({v}{,}{x}\right){+}{\mathrm{BesselI}}\left({v}{,}{x}\right)$ (8.2.2)



 > $\mathrm{interface}\left(\mathrm{typesetting}=\mathrm{extended}\right):$

You can also control the typeset display for individual special functions through the Typesetting Rule Assistant.

Top of the page

Generalized Operators and Equations

MathML operators available within Maple parse, by default, to binary operators using the same name as the normalized entity name.

Note: The precedence of these operators is the same as for '=' for any operators in the Arrows, Relational, Relational Round, and Negated palettes, and the same as neutral operators '&...' for all other operators.



Example

Steps

 >
 ${\mathrm{expr}}{≔}{a}{\ll }{b}$ (9.1)

expr is actually stored as a function with function name &ll;. If you enter the following:

 > $\mathrm{op}\left(0,\mathrm{expr}\right)$
 ${\ll }$ (9.2)
 > $\mathrm{eval}\left(\mathrm{expr},\ll =\left(\left(a,b\right)\to a+b\right)\right)$
 ${a}{+}{b}$ (9.3)

Enter the much less than operator from the Relational palette.

 > $a\le x\le b$
 ${a}{\le }{x}{\le }{b}$ (9.4)

The $\le$operator can be entered in one of the following ways:

 1 Type <=
 2 Type $\mathrm{leq}$ and use the command completion method
 3 Select the operator from the Relational palette

Following is an example which demonstrates that any non-equivalence operators have higher precedence than multiplication:

 >
 ${b}{⊠}{c}$ (9.5)

Now, compare this result to the the following:

 > $\frac{a\cdot b+c\cdot d}{a\cdot d}$
 $\frac{{a}{}{b}{+}{c}{}{d}}{{a}{}{d}}$ (9.6)

Here the multiplication operator has higher precedence.

For the first example:

 4 Select the $\frac{{a}}{{b}}$ template from the Expression palette
 5 Type a*b
 6 To enter the boxtimes operator, type $\mathrm{boxtimes}$ and use the command completion method.
 7 Type c*d
 8 Press Tab to enter a*d as denominator

Top of the page

Tolerances/Optional Forms

The $\mathbf{±}$ and $\mathbf{\mp }$ operators have special precedence rules that enable them to be used in two forms.

The default is to treat them with the same precedence as addition, in which case they can be used to describe an expression with two optional values, one choosing the upper operator, and the other choosing the lower operator. In this case, these operators are internally represented as unary operators.

 >
 > $\mathrm{&+-}:=a\to \mathrm{if}\left(\mathrm{whichval}=1,a,\mathrm{if}\left(\mathrm{whichval}=2,\mathrm{&uminus0;a},'\mathrm{&+-}'\left(a\right)\right)\right):$
 > $\mathrm{&-+}:=a\to \mathrm{if}\left(\mathrm{whichval}=1,-a,\mathrm{if}\left(\mathrm{whichval}=2,a,'\mathrm{&-+}'\left(a\right)\right)\right):$



An optional equation using $±$and/or $\mp$:

 > $\mathrm{ans}:=\frac{{x}^{2}±x+1}{x\mp 2}:$



At this point, the value of 'whichval' lets you change the value of the expression:

 > $\mathrm{whichval}≔1:$
 > $\mathrm{ans}$
 $\frac{{{x}}^{{2}}{+}{x}{+}{1}}{{x}{-}{2}}$ (10.1)
 > $\mathrm{whichval}≔2:$
 > $\mathrm{ans}$
 $\frac{{{x}}^{{2}}{-}{x}{+}{1}}{{x}{+}{2}}$ (10.2)



Alternatively, the $±$ symbol can be used as a binary operator to describe a tolerance from the Tolerances package.
The meaning of the symbol can be switched from use for optional values to tolerances in either the Typesetting Rule Assistant, by the command line Typesetting:-Settings command, or simply by loading the Tolerances package:

 > $\mathrm{with}\left(\mathrm{Tolerances}\right):$
 > $5±0.3$
 ${5.00}{±}{0.300}$ (10.3)
 > $1±0.1\cdot 2±0.1$
 ${2.01}{±}{0.300}$ (10.4)



Top of the page

Logic

Available logical (boolean) operators in 2-D math include nand, nor, and iff, defined in terms of the existing logic operations not, and, or, xor, and implies. Each boolean operation has a symbolic counterpart.

Each logic operation, the MathML symbol used, and the symbolic form are demonstrated in the following table:

 Operation Standard Form Symbol Symbol Form not $\mathrm{not}a$ = ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{a}$ not $¬a$ = ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{a}$ nand $a\mathrm{nand}b$ = ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\right)$ uarr $a↑b$ = ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\right)$ and $a\mathrm{and}b$ = ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ and $a\wedge b$ = ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ nor $a\mathrm{nor}b$ = ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\right)$ darr $a↓b$ = ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}\right)$ or $a\mathrm{or}b$ = ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ or $a\vee b$ = ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ xor $a\mathrm{xor}b$ = ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{xor}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ veebar $a⊻b$ = ${a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{xor}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}$ implies $a\mathrm{implies}b$ = ${a}{⇒}{b}$ Implies $a⇒b$ = ${a}{⇒}{b}$ iff $a\mathrm{iff}b$ = $\left({a}{⇒}{b}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({b}{⇒}{a}\right)$ iff $a⇔b$ = $\left({a}{⇒}{b}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({b}{⇒}{a}\right)$

As an additional convenience, the nand, nor, xor, and implies operations have completion shortcuts available for their corresponding symbols (as their MathML entity names are quite different).

For example:

 • Type
 • Use command completion to enter $⇒$
 • Type $b$ and press Enter to evaluate

 >
 ${a}{\mathbf{⇒}}{b}$ (11.1)

When the Logic package is loaded, the logic expressions, in both symbolic and verbal form, parse to Logic package operations.  Note: While the outputs display similarly, there are differences between the underlying implementation of the Logic package operators and the top-level logical operators. For more information, see the help pages boolean, Logic, and Logic Package Operators.

Note: When the Logic package is loaded, the standard logic operations are still available in prefix form.



 > $\mathrm{not}\left(a\right)$
 ${\mathbf{not}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{a}$ (11.2)
 > $\mathrm{and}\left(a,b\right)$
 ${a}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{b}$ (11.3)
 > $\mathrm{or}\left(a,b\right)$
 ${a}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{or}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{b}$ (11.4)



Top of the page

Atomic Variables (Literal Names)

Maple can work with composite or colored objects that are to be considered distinct from the components making up the objects or the object without the same color attributes. These objects are called atomic objects.

If you want to display a single Maple expression as an atomic object, select the expression, and then in the Format>Convert to menu, select the Atomic Variable check box. This can also be accessed through the Context Panel for the expression: 2-D math>Convert To>Atomic Variable. Alternatively, press Ctrl + Shift + A (Windows and Linux) or Command + Shift + A (Mac).

In simple cases where a script object is composed with a base and one or more scripts of a simple type (identifier, operator, or number), which otherwise has no meaning in Maple, these objects become atomic automatically.

Example

Steps

 >



 1 Press Ctrl + Shift + " to enter the overscript for $x$
 2 Use one of the following methods to enter tilde:
 • Press Shift + ~
 • Select ~ from the Common Symbols palette
 • Type $\mathrm{tilde}$ and use command completion method
 3 Use Right Arrow key to leave overscript



This name assigned to $\mathrm{var}$ is different from $x$, and in fact has no relation to $x$, as it is .

 > $x≔1:$



 > $\mathrm{var}$
 $\stackrel{{˜}}{{x}}$ (12.1)





Assigning the value of $x$ does not affect this name.

Furthermore,  is treated as any other name in Maple.



 > $\mathrm{diff}\left(f\left(\mathrm{var}\right),\mathrm{var}\right)$
 $\frac{{ⅆ}}{{ⅆ}\stackrel{{˜}}{{x}}}{}{f}\left(\stackrel{{˜}}{{x}}\right)$ (12.2)

For this reason, in some cases where a parse error would result, the expression is instead assumed to be of atomic type, and is treated as such. For example, the following three values would result in parse errors, but since they are simple objects, are instead identified as atomic objects.

Example

Steps

 > $\left[{x}^{@},{x}^{&},{x}^{.}\right]$
 $\left[{{x}}^{{@}}{,}{{x}}^{{&}}{,}{{x}}^{{.}}\right]$ (12.3)



To enter the superscript for $x$ press Shift + ^ . Use Right Arrow key to leave superscript.

The internal representations of these atomic variables are composed of MathML construct, which can be displayed in the following manner:

 > $\mathrm{sprintf}\left(\stackrel{~}{x}\right)$
 ${"#mover\left(mi\left("x"\right),mo\left("Ëœ"\right)\right)"}$ (12.4)

If this automatic behavior is not desired, it can be disabled through the Typesetting Settings command or through the Typesetting Rule Assistant:

 > $\mathrm{Typesetting}:-\mathrm{Settings}\left(\mathrm{autoatomic}=\mathrm{false}\right):$
 > ${x}^{@}$
 



Expressions that would normally parse as Maple objects can be converted to atomic objects using the context menu. For example, $x$ with a subscript of $1$ is normally interpreted as a table reference:

 > ${x}_{1}$
 ${{1}}_{{1}}$ (12.5)

Note that this returns '1' subscripted by '1' because $x$ was assigned to 1 earlier.

To work with this notation as a name, different from $x$, enter the expression, select it, then from the Context Panel select 2-D math>Convert To>Atomic Variable and evaluate.

 > $\mathrm{x__1}$
 $\mathrm{x__1}$ (12.6)

Alternately, in this specific case, you can use two underscores (Shift + _ _) to create a subscripted name called a literal subscript.

 > $\mathrm{x__1}$
 $\mathrm{x__1}$ (12.7)

Note that the atomic variable x is different from the indexed one.

Again, note the following example with Array:

 > $A≔\left[0,1,3,4\right]$
 ${A}{â‰”}\left[{0}{,}{1}{,}{3}{,}{4}\right]$ (12.8)



The following indexed subscript returns the element in the first position of Array $A$ (equivalent to A[1]):

 > ${A}_{1}$
 ${0}$ (12.9)

However, once $A$ subscript $1$ is converted to an atomic variable, it evaluates in this manner:

 > $\mathrm{A__1}$
 $\mathrm{A__1}$ (12.10)

This is equivalent to calling A__1.

In addition to the ability to compose objects to construct semantically different objects, you can also use color. When an automatic atomic object contains colors different from the default, these become part of the atomic object. If the View>Atomic Variable option is set, then all atomic variables, including ones with non-default colors, are shown in magenta. It is recommended that you avoid using the default input and output colors (black and blue) to distinguish objects.

For example, you can construct the name  that is different from $x$ by changing the color of an $x$ to $\mathrm{green}$. Select the $x$. From the Context Panel select 2-D Math>Format>Color. Select green, and click OK. To make it atomic, select the green $x$, and from the Context Panel select 2-D Math>Convert To>Atomic Variable.

${x}$



And as an example of using green $x$ in a for loop:

 >
 ${1}{,}{1}$
 ${2}{,}{1}$
 ${3}{,}{1}$
 ${4}{,}{1}$
 ${5}{,}{1}$ (12.11)



Top of the page