----maxima-bounces at math.utexas.edu wrote: -----
>To: "Alasdair McAndrew"
>From: "Stavros Macrakis"
>Sent by: maxima-bounces at math.utexas.edu
>Date: 03/19/2007 10:07AM
>cc: maxima list
>Subject: Re: [Maxima] Solving (systems of) non-linear equations?
>
>Using Barton Willis's topoly package, it can also solve some systems
>involving roots and abs (but with spurious solutions in general):
I have a new version of topoly and a solver based on to_poly.
The solver (trys) to reject spurious solutions:
(%i8) to_poly_solve([sqrt(x) = -1],[x]);
(%o8) []
(%i9) to_poly_solve([sqrt(x) = y, x + y = 5],[x,y]);
(%o9) [[x=-(sqrt(3)*sqrt(7)-11)/2,y=(sqrt(3)*sqrt(7)-1)/2]]
The process that rejects spurious solutions can drive you nuts:
(%i10) to_poly_solve([sqrt(x)+sqrt(y) = a , x^2=y] , [x, y]);
Is 4 * a + 1 positive, negative, or zero? pos;
Is - sqrt(4*a+1) + 2 * a + 1 positive or negative? pos;
Is sqrt(4*a+1) - 1 positive or negative? pos;
Is sqrt(4*a+1) + 2 * a + 1 positive or negative? pos;
Is 4 * a - 1 positive, negative, or zero? pos;
(%o10) [[x=-(sqrt(4*a+1)-2*a-1)/2,y=-((2*a+1)*sqrt(4*a+1)-2*a^2-4*a-1)/2]]
The new to_poly doesn't eliminate new variables (the variable g10):
(%i11) to_poly(sqrt(x)=y,[x,y]);
(%o11) [[g10-y,g10^2-x],[-%pi/2<carg(g10),carg(g10)<=%pi/2]]
Barton