Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1176 Spurious solutions (zero denominators) returned by solve

open
nobody
5
2007-06-29
2007-04-26
Anonymous
No

I was trying to calculate the equation of a hyperbola of the type x^2/a^2 - y^2/b^2 = 1, given two points. Maxima finds, among others, also a wrong solution [a=0,b=0].

(%i4) hyp:x^2/a^2-y^2/b^2=1$
(%i4) eq1:hyp,x=-5/2,y=-3/4$
(%i4) eq2:hyp,x=10/3,y=4/3$
(%i4) solve([eq1,eq2],[a,b]);
(%o4) [[a=2,b=-1],[a=-2,b=-1],[a=2,b=1],[a=-2,b=1],[a=0,b=0]]

F. Buratti (Italy)
bufranz@hotmail.com

Maxima version: 5.11.99rc2
Maxima build date: 20:46 4/19/2007
host type: i686-pc-mingw32
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.8

Discussion

  • Logged In: YES
    user_id=588346
    Originator: NO

    Yes, this is a bug. Here is a simpler example:

    solve([1/a-1/b=1,a=b],[a,b]) => [[a=0,b=0]]

     
    • labels: --> Lisp Core - Solving equations
     
  • Robert Dodier
    Robert Dodier
    2007-06-29

    • summary: Wrong solution of system --> Spurious solutions (zero denominators) returned by solve
     
  • Robert Dodier
    Robert Dodier
    2007-06-29

    Logged In: YES
    user_id=501686
    Originator: NO

    Merging bug report # 1700056 (same problem); I'll mark 1700056 as a dup. Also revise summary to make it more descriptive.

    ------------- begin 1700056 -------------
    With Maxima 5.11.0, Using Lisp CLISP 2.41 (2006-10-13)

    q1 : 2/x + 5/y = -19/15;
    q2 : 1/y -5/x = -4/3;
    sys :[q1,q2];
    var : [x,y];
    solve(sys,var);
    /*==> [[x = 5,y = -3],[x = 0,y = 0]]

    This seems to happen only with systems. I was not able
    to reproduce this bug with a single equation and a single
    variable.
    -------------- end 1700056 --------------