Am 28.06.2013 15:35, schrieb Stavros Macrakis:
> There seems to be a typo in your example -- it won't parse. I tried
> ineq:... instead of ineq=..., and tried removing ineq=, but that yields
> an error from solve_rat_ineq. Tested in Maxima 5.28.0 and 5.30.0 / SBCL
> / OSX / wxMaxima. Also, "==" (in your output) is not a standard Maxima
> operator (does a newer version of solve_rat_ineq define it?).
>
> * What is the exact input you used?
> * What is the version of Maxima you used?
> * Are you using the version of solve_rat_ineq that came with Maxima, or
> some other version?
>
> Complete and reproducible problem reports help us help you.
Sure. I am sorry for having posed my question in such a bad form. The
reason is that I am not using Maxima directly, but via Sage 5.4 instead
(which says maxima.version() = 5.26.0).
In Sage, when I enter
solve(abs((x-1)/(x-5)) <= 1/3, x)
I get the output
#0: solve_rat_ineq(ineq=abs(x-1)/abs(x-5) <= 1/3)
[[x == -1, -6 != 0, -6 != 0], [x == -1, -6 != 0, -6 != 0, -6 != 0], [x
== -1, -6 != 0, -6 != 0], [x == -1, -6 != 0, -6 != 0, -6 != 0], [x == 2,
-3 != 0, -3 != 0], [x == 2, -3 != 0, -3 != 0, -3 != 0], [x == 2, -3 !=
0, -3 != 0], [x == 2, -3 != 0, -3 != 0, -3 != 0], [x == 1], [1 < x, x
< 2], [-1 < x, x < 1]]
Since I did not know Maxima, I naively assumed this to be the log of the
Maxima call.
I have now installed Maxima-5.28.0-2. Unfortunately, as Volker has
explained in the meantime, solve_rat_ineq cannot deal with 'abs':
(%i1) load("solve_rat_ineq");
(%o1)
"C:/PROGRA~2/MAXIMA~1.0-2/share/maxima/5.28.0-2/share/solve_rat_ineq/solve_rat_ineq.mac"
(%i2) solve_rat_ineq(abs(x-1)/abs(x-5) <= 1/3);
solve_rat_ineq: abs(x-1)/abs(x-5)<=1/3 is not rational.
#0: solve_rat_ineq(ineq=abs(x-1)/abs(x-5) <= 1/3)(solve_rat_ineq.mac
line 59)
-- an error. To debug this try: debugmode(true);
So I assume that Sage does the case distinction for the 'abs' function
by itself and calls Maxima on each case separately, like
(%i5) solve_rat_ineq((x-1)/(x-5) <= 1/3);
(%o5) [[x>=-1,x<5]]
Therefore I will move my question over to the Sage people, since there
seems to be no way to solve "abs(x-1)/abs(x-5) <= 1/3" in Maxima.
Sorry again, and best regards,
Robert