Error, (in ...) invalid arguments
Description
Examples
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.
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
fsolve23 x5+103 x4 −10 x,x
Error, (in fsolve) invalid arguments
Solution: Unassign x.
x≔'x';
x:=x
−4.483086353,0.,0.4453115351
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
m ≔ 1;
m:=1
a ≔ 1;
a:=1
c ≔ 2;
c:=2
equation1 ≔ y = m⋅X+c;
equation1:=y=X+2
area1 ≔ intequation1, X = g .. a, numeric;
Error, (in int) invalid arguments
typeequation1,algebraic
false
Solution:
Assigning the algebraic expression m⋅X+c instead of the equation y=m⋅X+c corrects the error.
restart
m≔ 1;
c≔ 2;
expression ≔ m⋅X+c;
expression:=X+2
area1 ≔ intexpression, X = g .. a, numeric;
area1:=2.038074903
typeexpression,algebraic
true
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
ics ≔ f10 = 0, f20 = 0, f30 = 0, f40 = r
ics:=f1⁡0=0,f2⁡0=0,f3⁡0=0,f4⁡0=r
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
One way to correct the above error is to remove the brackets around the sequence of differential equations assigned to sys.
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
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
See Also
dsolve
int/details
set
type
Download Help Document