Trouble Shooting Notes

Learning to use Maple can be an extremely frustrating experience, if you let it. There are some types of errors which occur from the beginning that can be spotted and corrected easily by a person fluent in Maple, so if you have access to such a person, use him or her.

Here are a few suggestions that may be of use when you're stuck with a worksheet that's not working like it should.

Important! Loading an old Maple worksheet does not excute it. This is something you must do separately, either one cell at a time or all at once.

Also important! Remember that you can rexecute any cell in the worksheet at any time. This can lead to confusion about what you did last, because it may not be what is just above.

Use help: There is a help sheet with examples for every Maple word. A quick read thru will often clear up syntax problems. One very common early mistake is to leave out the parentheses around the inputs of a word. For example, typing

> plot x^2;

Syntax error, missing operator or `;`

will get you a syntax error, because you left out the parentheses.

>

The maple prompt is `>` . You can begin entering input after it. Make sure you are typing into an input cell, if you are expecting output.

End maple statements with a semicolon `;` or colon `:` . Maple suppresses output when the command line ends with a colon. Maple does not process until it comes to a (semi)colon. If you are getting no output when you should be, try feeding in a semicolon. This often works.

> p := expand((a+b)^5);

[Maple Math]

> p;

[Maple Math]

> q := expand((1+x)^9):

> q;

[Maple Math]

>

When in doubt, put in parentheses. For example, (x+3)/(x-3) is very different from x+3 / x-3 .

> (x+3)/(x-3),x+3 / x-3 ;

[Maple Math]

>

Make sure your variables are variable . You may have assigned a value, say 3, to x in a previous problem. To make x a variable again, type x := 'x': . Use the forward quote ' key, just below the double quote " here. If you forget this, strange things might happen. One way to handle this is to keep an input cell of variables used.

> x := 3;

[Maple Math]

> x := 'x';

[Maple Math]

>

Use restart; By typing restart; in an input cell and pressing enter, you clear all assignments, and start with a clean slate. This fixes a lot of problems fast, but you will need to re-execute input cells.

> hello := yes;

[Maple Math]

> hello;

[Maple Math]

> restart;

> hello;

[Maple Math]

Are you using the correct quote symbol? In Maple, the forward quote ' is used to suppress evaluation.
The
back quote ` is used to form names. The double quote " is used to define ascii strings.

> `this is a long name` := 12;

[Maple Math]

> `this is a long name`;

[Maple Math]

> check := "do not worry";

[Maple Math]

> check;

[Maple Math]

Do not forget to end loops with od , `if` statements with fi , and procedures with end . If you start a loop with do , Maple does not begin processing until it finds the end of the loop, which is signaled by the word od ; The same applies to the if .. then ... fi; and proc ... end; contructions. If you are getting no output when you should be, try feeding an od; , fi; , or end; This often works.

>

>

Unwanted output?: Is there output you need but don't want to see? Use a colon `:` instead of a semicolon to end the Maple statement which generates the output.

Use printlevel := 10; if you want to see what Maple is doing behind the scenes when you give it a command. If you want to see more, use printlevel := 50 or higher. Often by inspecting the output when printlevel is greater than 1 (the default), you can discover what is ailing your worksheet.

> unapply(x^2-100,x);

[Maple Math]

> printlevel:= 10;

[Maple Math]

>

> unapply(x^2-200,x);

{--> enter unapply, args = x^2-200, x

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

<-- exit unapply (now at top level) = proc (x) options operator, arrow; x^2-200 end}

[Maple Math]

> printlevel:=1;

[Maple Math]

Are all words you are using defined? Have you executed the input cells containing the procedures you need? Have you loaded the packages containing the words you need? Undefined words are simply returned by Maple. Hint: When using words from packages in procedure definitions, use the full name, e.g, use plots[display] instead of display.

> thisword := proc(x) x^2 + 10 end;

[Maple Math]

> thisword(3);

[Maple Math]

> restart;

> thisword(3);

[Maple Math]

>

Use debug . If you hav e defined a word, say ` thisword ` and it does not do what you want, you can often discover the error by typing debug(something); in an input cell and pressing the enter key. When you use the word again, its behind the scene computations are printed out for your inspection.

> debug(thisword);

[Maple Math]

> thisword(3);

{--> enter thisword, args = 3

[Maple Math]

<-- exit thisword (now at top level) = 19}

[Maple Math]

> undebug(thisword);

[Maple Math]

> thisword(3);

[Maple Math]

>

Want to see a word definition? Say you want to see how plot works. Type interface(verboseproc=2); in an input cell and press enter. Then type print(plot);

> interface(verboseproc=2);

> print(plot):

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

>