Use I as an variable in Maple

404 Views Asked by At

I want to declare a function I(t), but Maple interprets I as the imaginary unit. Can I use a Maple command to assume I is an variable? I've looked in the manual, but I can't seem to find a solution.

3

There are 3 best solutions below

0
On

$I$ as a name is protected in Maple, therefore you cannot use it. But there are other possibilities, for example you can declare a local name $I$ via

local $I$ := ...

The imaginary unit is then still available via _I.

For a reference see the manual on protected names. Hope, that helped.

0
On

Maple 17, but not older Maple, will allow local I at the top level. But the following will work in any Maple: First pick some symbol other than I to represent the imaginary unit. Let's say I pick _I. Then issue the command interface(imaginaryunit= _I);.

1
On

If one should define some codes just for using $I$ as an alphabet, so what about using I1 or I2 instead. Indeed, by doing this, there is no need to change the meaning of $I$ in Maple.