Error, (in ...) invalid input: ... expects its ... argument, ..., to be of type ..., but received ...
Description
Examples
This error occurs when the argument to a command is of the wrong type.
Example
sin1,2, 3;
Error, invalid input: sin expects its 1st argument, x, to be of type algebraic, but received [1, 2, 3]
Examine the argument using the whattype command. Use the Describe command (or review the command's help page) to see correct usage.
whattype1,2,3;
list
Here, whattype returns list--the argument 1,2,3 used in the example is of type list. To see the valid arguments for the sin command, use Describe.
Describe⁡sin
sin( x::algebraic )
When you use the Describe command on a Maple object, it returns the type of an object and its value. In this example, Describe(sin) returns the value x and the type algebraic. Lists are not a valid subset of type/algebraic. For this example, the argument must be of type algebraic.
To find out more information about sin, see the sin help page. See Describe for more information about the Describe command and its uses beyond Maple objects.
Solution 1: Use an argument of type algebraic.
sin1;sin2;sin3
sin⁡1
sin⁡2
sin⁡3
Solution 2: Use the element-wise operator ~ to apply sin to every element in a list.
sin~1,2,3
sin⁡1,sin⁡2,sin⁡3
See Also
Describe
operators/elementwise
type
whattype
Download Help Document