matrix inversion in Ubuntu 14.04

2014-08-27
2014-09-09
  • Andres Cimino
    Andres Cimino
    2014-08-27

    I've just updated my ubuntu to the latest long term support version, and when I ran the following script in wxmaxima it kept calculating forever when it reached the inversion of the matrix l. Ubuntu 14.04 comes with wxmaxima 13.04.2, I tried reinstalling it from the software center

    l1:matrix([0,alpha_fcf,alpha_scsbeta_ysbx,alpha_scsbeta_zsbx,alpha_sabeta_y/sqrt(rho),alpha_sa*beta_z/sqrt(rho),alpha_f/rho]);
    l7:matrix([0,alpha_fcf,-alpha_scsbeta_ysbx,alpha_scsbeta_zsbx,alpha_sabeta_y/sqrt(rho),alpha_sa*beta_z/sqrt(rho),alpha_f/rho]);
    l3: matrix([0,-alpha_scs,-alpha_fcfbeta_ysbx,-alpha_fcfbeta_zsbx,-alpha_fabeta_y/sqrt(rho),-alpha_fa*beta_z/sqrt(rho),alpha_s/rho]);
    l5: matrix([0,alpha_scs,alpha_fcfbeta_ysbx,alpha_fcfbeta_zsbx,-alpha_fabeta_y/sqrt(rho),-alpha_fa*beta_z/sqrt(rho),alpha_s/rho]);
    l4:matrix([1, 0,0,0,0,0,-1/a^2]);
    l6:matrix([0, 0,beta_z,-beta_y,-beta_zsbx/sqrt(rho),beta_ysbx/sqrt(rho),0]);
    l2:matrix([0, 0,-beta_z,beta_y,-beta_zsbx/sqrt(rho),beta_ysbx/sqrt(rho),0]);
    l: matrix(
    [l1[1,1] ,l1[1,2], l1[1,3], l1[1,4],l1[1,5],l1[1,6],l1[1,7]],
    [l2[1,1] ,l2[1,2], l2[1,3], l2[1,4],l2[1,5],l2[1,6],l2[1,7]],
    [l3[1,1] ,l3[1,2], l3[1,3], l3[1,4],l3[1,5],l3[1,6],l3[1,7]],
    [l4[1,1] ,l4[1,2], l4[1,3], l4[1,4],l4[1,5],l4[1,6],l4[1,7]],
    [l5[1,1] ,l5[1,2], l5[1,3], l5[1,4],l5[1,5],l5[1,6],l5[1,7]],
    [l6[1,1], l6[1,2], l6[1,3], l6[1,4],l6[1,5],l6[1,6],l6[1,7]],
    [l7[1,1] ,l7[1,2], l7[1,3], l7[1,4],l7[1,5],l7[1,6],l7[1,7]]
    );

    r:ratsimp(invert(l));

    I also tested this script in another computer with older versions of ubuntu and wxmaxima, and it worked well.
    Does anyone know what happened? thanks!

     
  • There were some changes in matrix inversion functions in recent versions of maxima. Maybe you need to change the call to invert with invert_by_adjoin.