6.82 automatic simplification, to switch off (6.4.99)

6.82.1 Eno Tonisson

Maple’s automatic simplification is usually very useful. It seems to be comfortable that like terms in a sum or product are collected or greatest common divisors are removed or etc.

But ...

Is it possible to "switch off" the automatic simplification?

After entering

> eq1:=4*x+5*(x-4)=0;
 

Maple gives

eq1 := 9 x - 20 = 0

Is it possible to get eq1 := 4*x+5*(x-4)=0?

6.82.2 Helmut Kahovec(9.4.99)

Well, not directly. But look at the following trick:

> restart; 
> eq1:=4*x+5*``(x-4)=0; 
 
                     eq1 := 4 x + 5  (x - 4) = 0
 

``() is the null string function as used by Maple when printing the result of ifactor():

> ifactor(10); 
 
                               (2)  (5) 
 
> lprint(%); 
``(2)*``(5)
 

expand() simply returns the arguments of the null string function:

> showstat(`expand/`); 
 
`expand/` := proc() 
   1    args 
end 
 
> expand(eq1); 
 
                             9 x - 20 = 0
 

6.82.3 Robert Israel (9.4.99)

What you can do is use the very useful
verb|“| function (that’s a name with no letters!). Enter the equation as

> eq1:= 4*x + 5* ``(x-4) = 0; 
 
              eq1 := 4 x + 5  (x - 4) = 0
 

Before solving the equation or doing anything else that would require breaking up the (x-4), you should use "expand":

> expand(eq1); 
              9 x - 20 = 0