Menu

#1266 solve() problem

None
closed
5
2016-10-04
2007-09-08
Anonymous
No

Trying to solve two polynomial equations in two unknowns fails, but when I add a third trivial equation with a third unknown it works.

Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) solve([x^2+x+1=0,x^2*y+1=0]);
(%o1) []
(%i2) solve([x^2+x+1=0,x^2*y+1=0,z=0]);
sqrt(3) %i + 1 sqrt(3) %i + 1
(%o2) [[z = 0, y = --------------, x = - --------------],
2 2
sqrt(3) %i - 1 sqrt(3) %i - 1
[z = 0, y = - --------------, x = --------------]]
2 2
(%i3) bug_report();

The Maxima bug database is available at
http://sourceforge.net/tracker/?atid=104933&group_id=4933&func=browse
Submit bug reports by following the 'Submit New' link on that page.
Please include the following build information with your bug report:
-------------------------------------------------------------

Maxima version: 5.13.0
Maxima build date: 14:20 8/31/2007
host type: i686-pc-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7

-------------------------------------------------------------
The above information is also available from the Maxima function build_info().

Related

Bugs: #3208
Bugs: #3224

Discussion

  • Robert Dodier

    Robert Dodier - 2007-09-08

    Logged In: YES
    user_id=501686
    Originator: NO

    It appears that Maxima obtains the same result if you solve the first equation for x and then substitute into the second and solve for y.

    (%i1) display2d:false;
    (%o1) false
    (%i2) solve (x^2 + x + 1 = 0, x);
    (%o2) [x = -(sqrt(3)*%i+1)/2,x = (sqrt(3)*%i-1)/2]
    (%i3) solve (x^2*y + 1 = 0, y), first (%o2);
    (%o3) [y = -2/(sqrt(3)*%i-1)]
    (%i4) solve (x^2*y + 1 = 0, y), second (%o2);
    (%o4) [y = 2/(sqrt(3)*%i+1)]

    I don't know why Maxima can solve at least two different versions of this problem, but not the original formulation. I think some other reported bugs in solve have the same flavor.

     
  • David Billinghurst

    Commit [2986fc], which fixed a number of algsys bugs - see [bugs:#3208] - has made this worse. I think this is due to heap overflow in radcan called from function EBAKSUBST1. My changes didn't cause this, but they did allow the solution to procede to the point of failure.

    (%i1) solve([x^2+x+1=0,x^2*y+1=0]);
    Heap exhausted during garbage collection: 0 bytes available, 16 requested.
    

    Probably same as [bugs:#1106]

     

    Related

    Bugs: #1106
    Bugs: #3208
    Commit: [2986fc]

  • David Billinghurst

    • assigned_to: David Billinghurst
    • Group: --> None
     
  • David Billinghurst

    • status: open --> closed
     
  • David Billinghurst

    Fixed by commit [640ca7]. Test case is now in maxima testsuite.

    (%i6) solve([x^2+x+1=0,x^2*y+1=0]);
    
    (%o6) [[y = -(sqrt(3)*%i-1)/2,x = (sqrt(3)*%i-1)/2],
           [y = (sqrt(3)*%i+1)/2,x = -(sqrt(3)*%i+1)/2]]
    
     

    Related

    Commit: [640ca7]


Log in to post a comment.