Ask Your Question
2

Wrong Answer?

asked 2014-08-19 23:46:36 +0200

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
1

answered 2014-08-20 14:50:12 +0200

kcrisman gravatar image

updated 2014-08-21 22:20:10 +0200

This is in Maxima.

Maxima 5.33.0 http://maxima.sourceforge.net
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\
_rat_ineq/solve_rat_ineq.mac
(%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

Stats

Asked: 2014-08-19 23:46:36 +0200

Seen: 556 times

Last updated: Aug 21 '14