Sponsored links: Algebra eBooks
 

Related

ratmx

Run Example
(%i1)ratmx;
(%o1)                                false
(%i2) f(x,y,z):=(x^3*y+y^3*z+z^3*x)^2;
                                      3      3      3   2
(%o2)                 f(x, y, z) := (x  y + y  z + z  x)
(%i3) xx:diff(diff(f(x,y,z),x),x);
                    3      2   2              3    3      3
(%o3)           2 (z  + 3 x  y)  + 12 x y (x z  + y  z + x  y)
(%i4) xy:diff(diff(f(x,y,z),x),y);
              2     3    3      3            2      3    3      2
(%o4)      6 x  (x z  + y  z + x  y) + 2 (3 y  z + x ) (z  + 3 x  y)
(%i5) yx:diff(diff(f(x,y,z),y),x);
              2     3    3      3            2      3    3      2
(%o5)      6 x  (x z  + y  z + x  y) + 2 (3 y  z + x ) (z  + 3 x  y)
(%i6) yy:diff(diff(f(x,y,z),y),y);
                      2      3 2              3    3      3
(%o6)           2 (3 y  z + x )  + 12 y z (x z  + y  z + x  y)
(%i7) xz:diff(diff(f(x,y,z),x),z);
              2     3    3      3              2    3    3      2
(%o7)      6 z  (x z  + y  z + x  y) + 2 (3 x z  + y ) (z  + 3 x  y)
(%i8) yz:diff(diff(f(x,y,z),y),z);
              2     3    3      3            2      3        2    3
(%o8)      6 y  (x z  + y  z + x  y) + 2 (3 y  z + x ) (3 x z  + y )
(%i9) zx:diff(diff(f(x,y,z),z),x);
              2     3    3      3              2    3    3      2
(%o9)      6 z  (x z  + y  z + x  y) + 2 (3 x z  + y ) (z  + 3 x  y)
(%i10) zz:diff(diff(f(x,y,z),z),z);
                        2    3 2              3    3      3
(%o10)          2 (3 x z  + y )  + 12 x z (x z  + y  z + x  y)
(%i11) hesM:matrix([xx,xy, xz],[yx,yy, yz], [zx,zy, zz]);
                [          3      2   2              3    3      3          ]
                [      2 (z  + 3 x  y)  + 12 x y (x z  + y  z + x  y)       ]
                [                                                           ]
(%o11)  Col 1 = [    2     3    3      3            2      3    3      2    ]
                [ 6 x  (x z  + y  z + x  y) + 2 (3 y  z + x ) (z  + 3 x  y) ]
                [                                                           ]
                [    2     3    3      3              2    3    3      2    ]
                [ 6 z  (x z  + y  z + x  y) + 2 (3 x z  + y ) (z  + 3 x  y) ]
         [    2     3    3      3            2      3    3      2    ]
         [ 6 x  (x z  + y  z + x  y) + 2 (3 y  z + x ) (z  + 3 x  y) ]
         [                                                           ]
 Col 2 = [            2      3 2              3    3      3          ]
         [      2 (3 y  z + x )  + 12 y z (x z  + y  z + x  y)       ]
         [                                                           ]
         [                            zy                             ]
         [    2     3    3      3              2    3    3      2    ]
         [ 6 z  (x z  + y  z + x  y) + 2 (3 x z  + y ) (z  + 3 x  y) ]
         [                                                           ]
 Col 3 = [    2     3    3      3            2      3        2    3  ]
         [ 6 y  (x z  + y  z + x  y) + 2 (3 y  z + x ) (3 x z  + y ) ]
         [                                                           ]
         [              2    3 2              3    3      3          ]
         [      2 (3 x z  + y )  + 12 x z (x z  + y  z + x  y)       ]
(%i12) Determinant(hesM);
                               3      2   2              3    3      3
(%o12) Determinant(matrix([2 (z  + 3 x  y)  + 12 x y (x z  + y  z + x  y), 
   2     3    3      3            2      3    3      2
6 x  (x z  + y  z + x  y) + 2 (3 y  z + x ) (z  + 3 x  y), 
   2     3    3      3              2    3    3      2
6 z  (x z  + y  z + x  y) + 2 (3 x z  + y ) (z  + 3 x  y)], 
    2     3    3      3            2      3    3      2
[6 x  (x z  + y  z + x  y) + 2 (3 y  z + x ) (z  + 3 x  y), 
      2      3 2              3    3      3
2 (3 y  z + x )  + 12 y z (x z  + y  z + x  y), 
   2     3    3      3            2      3        2    3
6 y  (x z  + y  z + x  y) + 2 (3 y  z + x ) (3 x z  + y )], 
    2     3    3      3              2    3    3      2
[6 z  (x z  + y  z + x  y) + 2 (3 x z  + y ) (z  + 3 x  y), zy, 
        2    3 2              3    3      3
2 (3 x z  + y )  + 12 x z (x z  + y  z + x  y)]))
(%i13) 
Run Example
T:matrix([0,0,6,0],[0,36,31,0],[0,0,0,1],[216,372,158,0]);
                             [  0    0    6   0 ]
                             [                  ]
                             [  0   36   31   0 ]
(%o1)                        [                  ]
                             [  0    0    0   1 ]
                             [                  ]
                             [ 216  372  158  0 ]
(%i2) ratmx:true;
(%o2)                                true
(%i3) invert(T);
                           [ 487      31       1  ]
                           [ ----   - ---  0  --- ]
                           [ 3888     648     216 ]
                           [                      ]
                           [   31    1            ]
                           [ - ---   --    0   0  ]
(%o3)                      [   216   36           ]
                           [                      ]
                           [   1                  ]
                           [   -      0    0   0  ]
                           [   6                  ]
                           [                      ]
                           [   0      0    1   0  ]
(%i4) 
Run Example
? ratmx;

 -- Option variable: ratmx
     Default value: `false'

     When `ratmx' is `false', determinant and matrix addition,
     subtraction, and multiplication are performed in the
     representation of the matrix elements and cause the result of
     matrix inversion to be left in general representation.

     When `ratmx' is `true', the 4 operations mentioned above are
     performed in CRE form and the result of matrix inverse is in CRE
     form.  Note that this may cause the elements to be expanded
     (depending on the setting of `ratfac') which might not always be
     desired.


(%o1)                                true
(%i2) 

Related Help

Help for Ratmx