8.2 calculations with and without the multiplication operator (4.6.02)

8.2.1 Vladimir Bondarenko
8.2.2 Robert Israel (5.6.02)
8.2.3 David Harrington (5.6.02)
8.2.4 Adri van der Meer (6.6.02)

8.2.1 Vladimir Bondarenko

These 2 examples are trivial.

> 1956*(1+1)^2; 
 
      7824 
 
> 1994*(diff(a,a)+y(z))^2; 
 
      1994*(1+y(z))^2
 

However, if I eliminate the multiplication operator, ’*’,

> 1956(1+1)^2; 
 
         3825936       # = 1956^2 
 
> 1994(diff(aleph,a)+y(z)+ISSAC-2003)^2; 
 
         3976036       # = 1994^2
 

8.2.2 Robert Israel (5.6.02)

Eliminating the * in a*(...) gives you a(...), which is interpreted as the function a evaluated at "...". Numbers are considered as constant functions when necessary. This allows algebra to be performed on functions, e.g.

> g:= f^2 + 3*f + 2: 
  g(p); 
 
         2 
     f(p)  + 3 f(p) + 2
 

8.2.3 David Harrington (5.6.02)

I think 1956() is a function that returns the constant 1956, no matter what its argument is. You can see that type(’1956()’,function); returns true. However, Maple immediately simplifies it to 1956 and it no longer behaves like a function: type(1956(),function); returns false.

So 1956(1+1)^2; returns 1956^2 but 1956*(1+1)^2; returns 1956*4 (not 1956^2).

8.2.4 Adri van der Meer (6.6.02)

If the ‘*‘ operator is omitted, the syntax becomes "name(arguments)" that is a function call. Maple accepts a constant as a procedurename, as can be seen in:

> f := x -> 1956; 
                              f := 1956 
> 1956(x,y,z); 
                                 1956
 

This explains your results.