invalid arguments - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : invalid arguments

Error, (in ...) invalid arguments

 

Description

Examples

Description

This error occurs when an argument of an incorrect type is passed to a command. The type of arguments accepted by Maple commands are listed in the Calling Sequence and Parameters sections in the help page for the command. You can use the type command to verify whether an argument is of the correct type required by the command.

Examples

Example 1

One common way this error can occur is if you try to use a name as a variable, but earlier that name was assigned a value.

x5

x:=5

(2.1)

fsolve23 x5+103 x4 10 x,x

Error, (in fsolve) invalid arguments

Solution:
Unassign x.

x'x';

x:=x

(2.2)

fsolve23 x5+103 x4 10 x,x

4.483086353,0.,0.4453115351

(2.3)

Example 2

In the following example, the equation y=mX+c, is assigned to the name, equation1 which is passed as an argument to the int command. As indicated on the int/details help page, int accepts only an algebraic expression or operator as a first argument in all of the listed calling sequences. Thus, passing an equation to int results in an error.

g  .2189750324;

g:=0.2189750324

(2.4)

m  1;

m:=1

(2.5)

a  1;

a:=1

(2.6)

c  2;

c:=2

(2.7)

equation1  y = mX+c; 

equation1:=y=X+2

(2.8)

area1  intequation1, X = g .. a, numeric;

Error, (in int) invalid arguments

typeequation1,algebraic

false

(2.9)

Solution:

Assigning the algebraic expression mX+c instead of the equation y=mX+c corrects the error.

restart

g  .2189750324;

g:=0.2189750324

(2.10)

m 1;

m:=1

(2.11)

a  1;

a:=1

(2.12)

c 2;

c:=2

(2.13)

expression   mX+c; 

expression:=X+2

(2.14)

area1  intexpression, X = g .. a, numeric;

area1:=2.038074903

(2.15)

typeexpression,algebraic

true

(2.16)

Example 3

In the following example, the error that generates the error message is more subtle. The calling sequences of dsolve, as listed on the dsolve only an ordinary differential equation or a set or list of differential equations. In this example, a set of a set of equations is passed to dsolve instead of a set of equations.

restart;

sys  difff1x, x, xf1x+f2x = 0, difff2x, x, xf2x+f3x+f1xf2x = 0, difff4x, x, x+f3xf4x = 0, difff3x, x, xf3x+f4x+f2xf3x = 0;

sys:=ⅆ2ⅆx2f1xf1x+f2x=0,ⅆ2ⅆx2f4x+f3xf4x=0,ⅆ2ⅆx2f2x2f2x+f3x+f1x=0,ⅆ2ⅆx2f3x2f3x+f4x+f2x=0

(2.17)

ics  f10 = 0, f20 = 0, f30 = 0, f40 = r

ics:=f10=0,f20=0,f30=0,f40=r

(2.18)

sol  dsolvesys, ics

Error, (in dsolve) invalid arguments; expected an equation, or a set or list of them, received: {{diff(diff(f1(x), x), x)-f1(x)+f2(x) = 0, diff(diff(f4(x), x), x)+f3(x)-f4(x) = 0, diff(diff(f2(x), x), x)-2*f2(x)+f3(x)+f1(x) = 0, diff(diff(f3(x), x), x)-2*f3(x)+f4(x)+f2(x) = 0}}

typesys,ics,setequation

false

(2.19)

Solution:

One way to correct the above error is to remove the brackets around the sequence of differential equations assigned to sys.

sys  difff1x, x, xf1x+f2x = 0, difff2x, x, xf2x+f3x+f1xf2x = 0, difff4x, x, x+f3xf4x = 0, difff3x, x, xf3x+f4x+f2xf3x = 0;

sys:=ⅆ2ⅆx2f1xf1x+f2x=0,ⅆ2ⅆx2f2x2f2x+f3x+f1x=0,ⅆ2ⅆx2f4x+f3xf4x=0,ⅆ2ⅆx2f3x2f3x+f4x+f2x=0

(2.20)

ics  f10 = 0, f20 = 0, f30 = 0, f40 = r

ics:=f10=0,f20=0,f30=0,f40=r

(2.21)

sol  dsolvesys, ics

sol:=f1x=14r+_C2x+_C4+14rⅇ2x+_C4ⅇ2x+_C614r+182rⅇ2+2x+_C6ⅇ2+2x182+28_C8+r4_C82ⅇ22x+_C8ⅇ22x,f2x=_C4+14rⅇ2x_C4ⅇ2x_C614r+182rⅇ2+2x_C614r+182rⅇ2+2x2_C6ⅇ2+2x_C6ⅇ2+2x2+182+28_C8+r4_C82ⅇ22x182+28_C8+r4_C82ⅇ22x2_C8ⅇ22x+_C8ⅇ22x2+14r+_C2x,f3x=_C614r+182rⅇ2+2x+_C6ⅇ2+2x182+28_C8+r4_C82ⅇ22x+_C8ⅇ22x+_C614r+182rⅇ2+2x2+_C6ⅇ2+2x2+182+28_C8+r4_C82ⅇ22x2_C8ⅇ22x2_C4+14rⅇ2x_C4ⅇ2x+14r+_C2x,f4x=_C614r+182rⅇ2+2x_C6ⅇ2+2x+182+28_C8+r4_C82ⅇ22x_C8ⅇ22x+_C4+14rⅇ2x+_C4ⅇ2x+14r+_C2x

(2.22)

See Also

dsolve

int/details

set

type