solve_rat_ineq



Barton,

thanks for your comments. I fixed the bugs you found in cvs.

(%i10) listconstvars : true;
(%o10)                               true
(%i11) solve_rat_ineq(2 > %pi);
(%o11)                                []

(%i12) solve_rat_ineq(x);
solve_rat_ineq:  x  is not an inequality.
#0: solve_rat_ineq(ineq=x)
 -- an error.  To debug this try debugmode(true);

(%i13) solve_rat_ineq(x^2+x+19 > 0);
(%o13)                                all


(%i14) solve_rat_ineq(x^5 + x +1 > 5.6b0);
(%o14)                     [[x > 1.27186272482944]]
I use algsys and algsys or someone who is called by algsys does the convertion. 

At the moment I would like to keep solve_rat_ineq the way it is, which means restricted to 
rational expressions. I believe that "every" rational inequality will be solved. 
In future terms we can think about developing another function solve_ineq which handles a 
wider class of expressions and this function could make use of both fourier_elim.lisp and 
solve_rat_ineq.mac.

Just a comment about the syntax of the returned expression. I chose it that way because it 
allows to retrieve the boundaries by simply mapping rhs.

(%i21) sol: [[x > 1, x < 2], [x > 3]]$
(%i22) fullmapl(rhs,sol);
(%o22)                          [[1, 2], [3]]


Volker


Am 5 Jun 2008 um 7:12 hat Barton Willis geschrieben:

> Thank you for this contribution. A few observations:
> 
> Part called on atom:
> 
>   (%i4) solve_rat_ineq(x);
>    part called on atom: x
> 
> Subscripted infinities:
> 
>   (%i35) solve_rat_ineq(x^2+x+19 > 0);
>   (%o35) [[x>=inf[1],x<=inf[2]],[x>=(-inf)[1],x<=(-inf)[2]]]
> 
> Somebody convertes big floats to doubles:
> 
>   (%i46) solve_rat_ineq(x^5 + x +1 > 5.6b0);
>    `rat' replaced 5.6B0 by 28/5 = 5.6B0
>   (%o46) [[x>1.27186272482944]]
> 
> I think you should consider renaming your function solve_ineq and return a
> noun form
> when it isn't able to find a solution.
> 
> Barton
> 
>