Ask Your Question

Wrong Answer?

asked 2014-08-19 16:46:36 -0500

When I ask Sage to solve a simple rational inequality it occasionally gives a wrong answer. For example, $$ \frac{x^2 - 9 }{x-3} \geq 0$$ is satisfied when $x \geq -3$ except at $x=3$, but Sage just gives $x \geq -3$. Here's the code I am using:

sage: solve((x^2-9)/(x-3) >= 0,x)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-20 07:50:12 -0500

kcrisman gravatar image

updated 2014-08-21 15:20:10 -0500

This is in Maxima.

Maxima 5.33.0
using Lisp ECL 12.12.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load("solve_rat_ineq"); 
(%o1) /Users/.../sage/local/share/maxima/5.33.0/share/solve\
(%i2) solve_rat_ineq((x^2-9)/(x-3) >= 0);
(%o2)                            [[x >= - 3]]

That said, Maxima (and Sage and lots of other things) do simplify x^2/x to be just x, so I am not 100% sure it's not intended behavior. Anyway, I agree it would be better to not have the 3, so I've reported it at Maxima bug 2804.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-08-19 16:46:36 -0500

Seen: 76 times

Last updated: Aug 21 '14