error in solving x^4> -2 via solve_rat_ineq



Hi Robert,

I do not clearly understand in which way you intend to use float here.
float doesn't separate the imaginary and real part of a complex number.
rectform resp. imagpart and realpart does this.

And for comparing the imagpart to zero you can't use float either: E.g.
3*x^3 - 3*x + 1 has 3 real roots. Let's consider the first one:
(%i2) s1: solve(3*x^3 - 3*x + 1)[1];
(%o2) x = (sqrt(3)*%i/2-1/2)/(3*(%i/(2*3^(3/2))-1/6)^(1/3))
        +(%i/(2*3^(3/2))-1/6)^(1/3)*(-sqrt(3)*%i/2-1/2)
(%i3) i1: imagpart(s1);
(%o3) 0 = (sqrt(3)*sin(5*%pi/18)/2+3*cos(5*%pi/18)/2)/3
        -sin(5*%pi/18)/(2*sqrt(3))-cos(5*%pi/18)/2
(%i4) float(i1);
(%o4) 0.0 = -1.110223024625156E-16
(%i5) ratsimp(i1);
(%o5) 0 = 0
This is one of the examples which show that it might lead to trouble if
you want to compare a float to zero. But simplification helps. In my
patch for solve_rat_ineq I am going to use 
is(equal(imagpart(x),0)) 
as the test. is(equal(a,b)) internally uses ratsimp(a-b). 

(I also had a look at the underlying algsys bug. At first sight the fix
seems to be quite easy.)

Greetings
Volker van Nek

Am Freitag, den 22.01.2010, 20:31 +0000 schrieb Robert Marik:
> Volker van Nek <volkervannek <at> googlemail.com> writes:
> 
> > 
> > Robert,
> > 
> > I will commit a fix for this problem in the next days (after doing some
> > checking). 
> > (My fix takes into account, that the problem is still with algsys and
> > does not fix the algsys bug 2786017.)
> > 
> 
> Thank you very much for fast help. I was thinking about using float function and
> test, that the points which split x axis into subintervals have no imaginary
> part. But I think that you understand Maxima much better than me and you can
> provide much better fix. Thank you very much.
> 
> Robert
> 
> 
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima