LinearSolve appears to be broken in both Maple 7 and Maple 8, and across several platforms.
The problem appears occationally when the matrix has a real entry and the solution is not unique.
Is this problem known? Does anyone have a fix or a workaround? (I must solve a 20 by 40 system, and I am neither amused nor impressed!)
Two small examples of the LinearSolve bug
> with(LinearAlgebra): > <<1,1,0>|<1,1,0>|<0,0,1>>,<1,1,0>; LinearSolve(%); # Works correctly [1 1 0] [1] [ ] [ ] [1 1 0], [1] [ ] [ ] [0 0 1] [0] [1 - _t0[2]] [ ] [ _t0[2] ] [ ] [ 0 ] > <<1,1,0>|<1,1,0>|<0,0,1.>>,<1,1,0>: LinearSolve(%); # Make one entry real Error, (in LinearAlgebra:-LA_Main:-BackwardSubstitute) Matrix must be in row-echelon form, zero rows at the bottom > <<1.,1.,0.>|<0.,0.,0.>|<0.,0.,1.>>,<1.,1.,0.>: LinearSolve(%); # Example 2 Error, (in LinearAlgebra:-LA_Main:-BackwardSubstitute) Matrix must be in row-echelon form, zero rows at the bottom > interface(version); TTY Iris, Maple 8.00, SGI MIPS UNIX, Apr 22 2002 Build ID 110847
It seems to work with
> LinearSolve(%,method='solve',outputoptions=[datatype=anything]);
(in this example, anyway).
Yes, it’s annoying. If you haven’t noticed yet, the same problem turns up with GaussianElimination and LUDecomposition, i.e. Maple doesn’t move the rows of zeroes to the bottom.