Maxima 5.33.0 wrongly inverts the matrix (but maxima 5.27.0 does it correctly).
M:matrix( [1,1,0,0,1], [-(a*sqrt(-delta^2*Ma^2*vx^2+a^2*delta^2+a^2)+a^2*delta)/(delta*Ma^2*rho*vx+a*Ma*rho),0,0,0,(a*sqrt(-delta^2*Ma^2*vx^2+a^2*delta^2+a^2)-a^2*delta)/(delta*Ma^2*rho*vx+a*Ma*rho)], [0,0,1,0,0], [0,0,0,1,0], [a^2,0,0,0,a^2] ); Mi:ratsimp(invert(M));
The answer should be compact, but version 5.33.0 gives long triginometric expressions (also it gives a warning STYLE-WARNING: redefining MAXIMA::MAKE-MRING in DEFUN).
Robert Dodier
2014-07-29
Diff:
--- old +++ new @@ -1,5 +1,6 @@ Maxima 5.33.0 wrongly inverts the matrix (but maxima 5.27.0 does it correctly). +~~~~ M:matrix( [1,1,0,0,1], [-(a*sqrt(-delta^2*Ma^2*vx^2+a^2*delta^2+a^2)+a^2*delta)/(delta*Ma^2*rho*vx+a*Ma*rho),0,0,0,(a*sqrt(-delta^2*Ma^2*vx^2+a^2*delta^2+a^2)-a^2*delta)/(delta*Ma^2*rho*vx+a*Ma*rho)], @@ -9,5 +10,6 @@ ); Mi:ratsimp(invert(M)); +~~~~ The answer should be compact, but version 5.33.0 gives long triginometric expressions (also it gives a warning STYLE-WARNING: redefining MAXIMA::MAKE-MRING in DEFUN).
Robert Dodier
2014-07-29
The function to invert a matrix was changed some time ago in an attempt to run faster. However, that changes some results.
The old version of the invert
function is now the file share/matrix/invert.mac
. Try load(invert);
and then invert(M);
as above.
The old function uses the adjoint method while the new function uses LU decomposition + back substitution. It is likely that the invert function will be changed again in the near future.
Semyon Glazyrin
2014-07-31
Thank you!
Barton Willis
2014-08-07
Commit 707110a2b8e172cc20213b5c223b7f62364e1de2 (25 May 2014) fixed this bug.
Barton Willis
2014-08-07