Error Message Guide Overview - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : ErrorMessageGuideOverview

Error Message Guide Overview

 

Description

Warnings

Other Resources

See Also

Description

You may have been directed to this page because an error was generated in your Maple worksheet. If so, do not panic. We make every effort to provide valuable information that may help you to solve the problem right away, or at least narrow down the parameters of the problem. However, if the text of the error message does not provide you with the information you need to troubleshoot your document, there are steps you can take to correct the problem.

 

There are three circumstances that would generate an error in Maple:

 

1. 

User Errors - the user has supplied incorrect input

2. 

No Solution - in some cases, a Maple routine will issue an error, indicating that the given problem has no solution

3. 

Maple Errors - Maple generates an error during internal computation in response to a problem with its own code

 

In most cases, the user might assume that an error is generated due to incorrect input. As you can see from the previous list of options, that may not be the case. The following sections discuss each of these circumstances, along with resources that will help you to understand Maple errors and instructions on how to proceed.

User Errors

Example 1

sin5

Error, invalid input: sin expects its 1st argument, x, to be of type algebraic, but received [5]

 

One common error that users make is supplying arguments of the wrong type.

 

Solution:

In this case, the first argument should be of type algebraic instead of type list.

sin5

sin5

(1.1.1)

Example 2

inttransfourier xⅇx2, x 

Error, invalid input: inttrans[fourier] uses a 3rd argument, w (of type algebraic), which is missing

 

Another common error is supplying the wrong number of arguments.

 

Solution:

Make sure that the correct number and type of arguments have been entered.

inttransfourierxⅇx2,x,3

32Iⅇ94π

(1.1.2)

You can see the correct calling sequences for any Maple command, including how to specify the arguments, on the help page for that command. For this example, see inttrans[fourier].

 

Example 3

f  procx if x<2 then sinx&semi; else x2&semi; end if&semi; end proc&colon;

plotfx&comma; x&equals;3..3

Error, (in f) cannot determine if this expression is true or false: x < 2

fx

Error, (in f) cannot determine if this expression is true or false: x < 2

 

Sometimes, a user error may be generated in a routine different from the outmost routine being called.

 

Solution:

Maple evaluates the inputs to a procedure such as plot before it calls the procedure, resulting in f being called with the symbolic argument x. You can delay the evaluation of the input using unevaluation quotes. For more information, see the related error help page.

 

Example 4

x1.5

x:=1.5

(1.1.3)

solvex24&equals;0&comma;x

Warning, solving for expressions other than names or functions is not recommended.

Error, (in solve) a constant is invalid as a variable, 1.5

 

A common error is the misuse of previous assignments. Sometimes, you assign a name to a value or expression and then later use that name expecting it to be a variable.

 

Solution:

To avoid this error, you can use a different variable than x in the second expression, unassign the variable x, or clear Maple's internal memory using restart, which clears all variable assignments.

 

Example 5

sin&lpar;&pi;

Error, unable to match delimiters

One of the most common errors is a syntax error, often created by mistyping the input... that is, a typo. In this case, the required finishing parenthesis is missing.

 

Solution:

To fix this error, add the missing parenthesis.

sin&pi;

0

(1.1.4)

Example 6

plotscomplexplota&comma;b&comma;c

Error, (in plots:-complexplot) invalid input: `plots/complexplot` expects its 2nd argument, r, to be of type {range, name = range}, but received b

 

Sometimes a syntax error is more involved. In this example, the command plots[complexplot] is used, but with arbitrary arguments a&comma;b&comma;c.

 

Solution:

To determine the correct syntax for this command, go to the help page for the related command (which is given within the error message in parentheses). In this case, see the plots[complexplot] help page. This page will explain the proper syntax for the arguments or other parts of the calling sequence. In this particular example, valid arguments for this command could include the following:

plotscomplexplotcos&plus;sinI&comma;&pi;..&pi;&comma;0.8..0.8&comma;1..1

No Solution

LinearAlgebraLinearSolve 0&comma; 5 &semi;

Error, (in LinearAlgebra:-LinearSolve) inconsistent system

 

Sometimes, there is no solution to a given problem, which is a legitimate result. In such cases, Maple will return an error to indicate that there is no solution available. In this case, there is nothing to fix; this is Maple's response that there is no solution available.

Maple Errors

It is possible that Maple will generate an error during internal computation as a result of a problem with its own code. If you believe this has happened, we would like to hear from you! The best way to give us the information to fix this problem is to use our Support Request Form. Fill out the form and include a copy of the worksheet that generated the error. This will help our programmers fix any errors within the code.

Warnings

Along with error messages, Maple produces various informative warning messages when executing a command. Warning messages are discussed in further detail warningmessage.

Other Resources

Here are some other tips or resources that you can use to determine the source of your error:

• 

Check the error help page

The error help page explains the format of error messages, which can help you to decipher the information being given.

• 

Rewrite or reformat the problem

It may be that the command used is not the one that should be used in a particular instance. Try rewriting the formula using a different command or different parameters.

• 

Check the FAQ

Go to Maplesoft's FAQ page to find answers to users' most common problems.

• 

Search MaplePrimes

Do a search for the generated error message on MaplePrimes, the online community for Maple users. Copy the error message text (or if this does not return any results, copy only the name of the routine) into the search box at the top of the MaplePrimes page.

• 

Maple Manuals

Maple's manuals are available online, including the User Manual, Programming Guide, and Getting Started with Maple Toolboxes. In particular, the Programming Guide includes Avoiding Common Errors sections at the end of many chapters. From the Help menu, select Manuals, Resources, and more, and then Manuals.

• 

Maple Technical Support

If all else fails, please contact Maplesoft Technical Support.

See Also

error, ProgrammingGuide, restart, syntax, unassign, warningmessage