Question: Command-line Maple doesn't evaluate certain functions

Hi everyone, I'm having issues using Maple through the command line (I have reasons to be avoiding the GUI, namely I am trying to use Maple in a development environment that integrates other programs, e.g. Mathematica into the mix. This forces me to only be able to access Maple via the command line).

 

Here is my issue: for some functions, like diff(), which differentiates functions, Maple evaluates the function on the input:

 

> f:=x+2;                                                
                    f := x + 2

> g := diff(f, x);                                 
                      g := 1

 

For other functions though, such as SPolynomial() (from the Ore_algebra library), command-line Maple is lazy and just spits back the input:

> with(Ore_algebra) 

> A:=diff_algebra([D1, x1], [D2, x2]);     
A := diff_algebra([D1, x1], [D2, x2])

> T:=MonomialOrder(A, grlex(D1, D2));              
T := MonomialOrder(diff_algebra([D1, x1], [D2, x2]), grlex(D1, D2))

> L1:=D1;                                          
                     L1 := D1

> L2:=D2;                                          
                     L2 := D2

> L:=SPolynomial(L1, L2, T);                       
L := SPolynomial(D1, D2, MonomialOrder(diff_algebra([D1, x1], [D2, x2]), grlex(D1, D2)))

 

Let me know if you get the same error as well! The correct output (outputted by the worksheet version of Maple) should be:

 

L := 0

 

Please Wait...