Newbie question: Simplifying rational inequality results



Hello Robert,

solve_rat_ineq is not as powerful as the Mathematica function you
mentioned. It is limited to rational expressions.

solve_rat_ineq(abs(x-1)/abs(x-5) <= 1/3);

should give this error:

solve_rat_ineq:  abs(x-1)/abs(x-5) <= 1/3  is not rational.

solve_rat_ineq uses algsys to find singularities and roots of the
corresponding equation. algsys is limited here. As a consequence
solve_rat_ineq is limited too and I placed the above error message into
solve_rat_ineq.

E.g. algsys([abs(x-1)/abs(x-5) = 1/3], [x]); yields [] which is obviously
wrong.


load(solve_rat_ineq); returns the path of the source file. Inside of this
file there are some examples.

Hope this helps
Volker van Nek



2013/6/28 Robert Pollak <robert.pollak at jku.at>

> Hello list, hello Volker [1],
>
> the command
>
> solve_rat_ineq(ineq=abs(x-1)/abs(x-5) <= 1/3)
>
> yields
>
> [[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]]
>
> , which is a disjunctive normal form with unevaluated inequalities
> (which are probably explained by [2] and therefore fixable by 'is()').
>
> What's the best way to reduce this to the equivalent
>
> [[-1 <= x, x <= 2]] ?
>
> Should I implement a corresponding method by myself or is there some
> functionality already available?
>
> Currently my students still have to use Mathematica, which works as
> expected:
>
> In[1]:= Reduce[(2*Abs[-1 + x])/Abs[-5 + x] <= 2/3, {x}, Reals]
> Out[1]= -1 <= x <= 2
>
>
> Best regards,
> Robert
>
>
> [1] Volker van Nek is the author of solve_rat_ineq
>
> [2] http://thread.gmane.org/gmane.comp.mathematics.maxima.general/7946/
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>