Post Reply 
Bug in a solve function
11-07-2019, 10:04 AM
Post: #1
Bug in a solve function
Try to solve the inequality: (x^3-1)*(x^2-4*x+4)/(x^2-5*x+6)>=0

The Prime's CAS returns the wrong answer {x>=1 AND x<=2, x>3}. The right answer must be a {x>=1 AND x<2, x>3}. Xcas returns the same result. Point x=2 must not be in the solution list.

The same issue appears with the equation x/x=1. Prime's CAS and Xcas return the wrong answer {x}. Point x=0 must not be in the solution list.
Find all posts by this user
Quote this message in a reply
11-07-2019, 10:13 AM
Post: #2
NOT A Bug in a solve function
This is for the same reason as for your other posts, the expressions are considered like polynomials, therefore simplification happens.
And this is in my opinion much better, because excluding these values just because they are roots of the denominator, without taking care of the numerator, is artificial.
Find all posts by this user
Quote this message in a reply
11-07-2019, 10:36 AM
Post: #3
RE: Bug in a solve function
(11-07-2019 10:13 AM)parisse Wrote:  This is for the same reason as for your other posts, the expressions are considered like polynomials, therefore simplification happens.
And this is in my opinion much better, because excluding these values just because they are roots of the denominator, without taking care of the numerator, is artificial.

Let's substitute point x=0 to the equation x/x=1. We'll get undef=1, but if x=0 is the solution of this equation, then the left side must be equal to the right side.

Simplifying (Reducing) fractions: Dividing the numerator and denominator of a fraction by the same non-zero number will also yield an equivalent fraction.

In these cases (my examples) simplification cancels this rule. Why?
Find all posts by this user
Quote this message in a reply
11-07-2019, 07:45 PM
Post: #4
RE: Bug in a solve function
When you type x/x and run a simplification, x is a polynomial. This is implicit when you run most of the commands of a CAS, like solve. This is an algebraic process, but is also true if you consider the limit as x->0 or look at the graph of 'x/x'. That's the reason why I say that excluding x=0 is artificial (0 is a removable singularity).
Find all posts by this user
Quote this message in a reply
11-08-2019, 03:57 AM
Post: #5
RE: Bug in a solve function
Sad
Thanks.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)