Menu

#1452 augcoefmatrix?

None
open
5
2016-04-08
2008-07-17
No

My maxima version is 5.15

I am use augcoefmatrix() changes linear equation to coefficient matrix
like as
(%i01) f1:x1-3*x2+5*x3=2;f2:4*x1+7*x2-x3=8;

(%o01) x1-3*x2+5*x3=2
(%o02) 4*x1+7*x2-x3=8

(%i03) augcoefmatrix([f1,f2],[x1,x2,x3]);

(%o03) [1 -3 5 -2]
[4 7 -1 -8]

you can see that augmented matrix [-2 -8],that positive negative is have problem,It should be [2 8]

1 Attachments

Discussion

  • Robert Dodier

    Robert Dodier - 2008-08-24
    • labels: 929639 --> Lisp Core
     
  • Dieter Kaiser

    Dieter Kaiser - 2009-11-22

    I think all is correct. The matrix of coefficients is constructed from the list of equations of the form equation = 0. For the equations above we can write:

    (%i54) f1:x1-3*x2+5*x3-2=0$
    (%i55) f2:4*x1+7*x2-x3-8=0$

    (%i56) augcoefmatrix([f1,f2],[x1,x2,x3]);
    (%o56) matrix([1,-3,5,-2],[4,7,-1,-8])

    This is the result of the bug report. The example of the documentation shows this behavior too.

    Setting the status to pending and the resolution to invalid.

    Dieter Kaiser

     
  • Dieter Kaiser

    Dieter Kaiser - 2009-11-22
    • status: open --> pending
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     
  • Leo Butler

    Leo Butler - 2016-04-07
    • labels: Lisp Core --> Lisp Core, augcoefmatrix, meqhk
    • status: closed --> open
    • assigned_to: Leo Butler
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +0001-On-master-augcoefmatrix.patch (3.7 kB; text/x-patch)
    
    • Group: --> None
     
  • Leo Butler

    Leo Butler - 2016-04-07

    I am re-opening this bug report.

    Although the documentation clearly describes this behaviour and it is tested for in the testsuite, the original bug report is correct, imo. The mathematical convention is that the right-hand column is the vector of constants appearing on the right-hand side of the equations. See any introductory text or wikipedia for that matter.

    augcoefmatrix punts to meqhk which introduces the spurious -1 on each constant term.

    Attached is a patch to implement this change.

     
  • Kris Katterjohn

    Kris Katterjohn - 2016-04-08

    I agree: the current behavior seems strange. I wonder if it's taught that way anywhere.

     

Log in to post a comment.