Error, (in gcdex) invalid arguments - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Error, (in gcdex) 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.

> 

x≔5

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=m⋅X+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 = m⋅X+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 m⋅X+c instead of the equation y=m⋅X+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 ≔  m⋅X+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, x−f1x+f2x = 0, difff2x, x, x−f2x+f3x+f1x−f2x = 0, difff4x, x, x+f3x−f4x = 0, difff3x, x, x−f3x+f4x+f2x−f3x = 0;

sys:=ⅆ2ⅆx2⁢f1⁡x−f1⁡x+f2⁡x=0,ⅆ2ⅆx2⁢f4⁡x+f3⁡x−f4⁡x=0,ⅆ2ⅆx2⁢f2⁡x−2⁢f2⁡x+f3⁡x+f1⁡x=0,ⅆ2ⅆx2⁢f3⁡x−2⁢f3⁡x+f4⁡x+f2⁡x=0

(2.17)
> 

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

ics:=f1⁡0=0,f2⁡0=0,f3⁡0=0,f4⁡0=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, x−f1x+f2x = 0, difff2x, x, x−f2x+f3x+f1x−f2x = 0, difff4x, x, x+f3x−f4x = 0, difff3x, x, x−f3x+f4x+f2x−f3x = 0;

sys:=ⅆ2ⅆx2⁢f1⁡x−f1⁡x+f2⁡x=0,ⅆ2ⅆx2⁢f2⁡x−2⁢f2⁡x+f3⁡x+f1⁡x=0,ⅆ2ⅆx2⁢f4⁡x+f3⁡x−f4⁡x=0,ⅆ2ⅆx2⁢f3⁡x−2⁢f3⁡x+f4⁡x+f2⁡x=0

(2.20)
> 

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

ics:=f1⁡0=0,f2⁡0=0,f3⁡0=0,f4⁡0=r

(2.21)
> 

sol ≔ dsolvesys, ics

sol:=f1⁡x=14⁢r+_C2⁢x+−_C4+14⁢r⁢ⅇ2⁢x+_C4⁢ⅇ−2⁢x+−_C6−14⁢r+18⁢2⁢r⁢ⅇ−2+2⁢x+_C6⁢ⅇ2+2⁢x−18⁢2+2⁢8⁢_C8+r−4⁢_C8⁢2⁢ⅇ−2−2⁢x+_C8⁢ⅇ2−2⁢x,f2⁡x=−−_C4+14⁢r⁢ⅇ2⁢x−_C4⁢ⅇ−2⁢x−−_C6−14⁢r+18⁢2⁢r⁢ⅇ−2+2⁢x−−_C6−14⁢r+18⁢2⁢r⁢ⅇ−2+2⁢x⁢2−_C6⁢ⅇ2+2⁢x−_C6⁢ⅇ2+2⁢x⁢2+18⁢2+2⁢8⁢_C8+r−4⁢_C8⁢2⁢ⅇ−2−2⁢x−18⁢2+2⁢8⁢_C8+r−4⁢_C8⁢2⁢ⅇ−2−2⁢x⁢2−_C8⁢ⅇ2−2⁢x+_C8⁢ⅇ2−2⁢x⁢2+14⁢r+_C2⁢x,f3⁡x=−_C6−14⁢r+18⁢2⁢r⁢ⅇ−2+2⁢x+_C6⁢ⅇ2+2⁢x−18⁢2+2⁢8⁢_C8+r−4⁢_C8⁢2⁢ⅇ−2−2⁢x+_C8⁢ⅇ2−2⁢x+−_C6−14⁢r+18⁢2⁢r⁢ⅇ−2+2⁢x⁢2+_C6⁢ⅇ2+2⁢x⁢2+18⁢2+2⁢8⁢_C8+r−4⁢_C8⁢2⁢ⅇ−2−2⁢x⁢2−_C8⁢ⅇ2−2⁢x⁢2−−_C4+14⁢r⁢ⅇ2⁢x−_C4⁢ⅇ−2⁢x+14⁢r+_C2⁢x,f4⁡x=−−_C6−14⁢r+18⁢2⁢r⁢ⅇ−2+2⁢x−_C6⁢ⅇ2+2⁢x+18⁢2+2⁢8⁢_C8+r−4⁢_C8⁢2⁢ⅇ−2−2⁢x−_C8⁢ⅇ2−2⁢x+−_C4+14⁢r⁢ⅇ2⁢x+_C4⁢ⅇ−2⁢x+14⁢r+_C2⁢x

(2.22)

See Also

dsolve

int/details

set

type