7.70 bug in inequal in Maple 6 (5.2.01)

7.70.1 Christian und Sabine Koch
7.70.2 Robert Israel (6.2.01)
7.70.3 Jay Treiman (7.2.01)
7.70.4 Symancyk, Daniel (9.2.01)

7.70.1 Christian und Sabine Koch

In working towards linear programming with my students I found maple 6.01 doing weird things:

with (plots); 
inequal(x+y<2,x=-1..2, y=-1..2);
 

shows a triangle!!!!

inequal(x+y<2,x=-1..3, y=-1..2);
 

shows an angle with vertex at (-1,1) !!

inequal(x+y<2,x=-1..3, y=-1..3);
 

shows the region left and under the 2nd diagonal ???

It is corrected with Maple 7. (U. Klein)

7.70.2 Robert Israel (6.2.01)

In fact "inequal" always plots a strict inequality (a*x + b*y < c or a*x + b*y > c) as if c = 0. This affects Maple 6 and 6.01 but not Maple V.

This particular bug can be worked around by using "inequalities" from my Maple Advisor Database, http://www.math.ubc.ca/~israel/advisor, but it is only a symptom of a more serious problem.

Consider:

> x - 5 < 0; 
 
       x < 5
 

Maple 5.1 would leave this as-is.

It seems that Maple now automatically simplifies a strict inequality with terms of type "numeric" on both sides so that the numeric term is only on the right. This means you’ll run into errors if (as occurs in the code of "inequal") you produce an inequality of the form expr < 0 and then proceed on the assumption that all the terms of expr stay on the left side. I would not be surprised if this causes bugs in other places besides "inequal".

I have not seen any mention of this in the ?updates help pages.

7.70.3 Jay Treiman (7.2.01)

It appears that inequal also has problems with <=. In Maple 6.01

>constraints := {5*x[1]+5*x[2]=300, 
>                 .6*x[1]+1.5*x[2]<=63, 
>                 x[1]<=50, x[2]<=35, 
>                 x[1]>=0,x[2]>=0}; 
>inequal(constraints,x[1]=-5..100,x[2]=-5..100, 
>      optionsexcluded=(color=white), 
>      optionsfeasible=(color=grey));
 

gave me the wrong region.

7.70.4 Symancyk, Daniel (9.2.01)

I tried adding optionsfeasible and optionsexcluded to see if they would help. There must be a bug in 6.01 when strict inequalities are involved. In R5.1 the following works fine.

with (plots); 
inequal(x+y<2,x=-1..2,y=-1..2,optionsfeasible=(color=yellow), 
        optionsexcluded=(color=white));
 

However, in 6.01 there is the error that you described. When the < is changed to <= in 6.01, the command works as it should.