Sponsored links: Algebra eBooks
 

Related

trace

trace(?sdiff);

diff(f(x)*g(x),x);

Calculate

trace

P:(2*x-7*y)^2+(2*x+7*...

trace(?sexpand);

expand(P);

Calculate

trace

trace(?sdiff);

diff(f(x)*g(x),x);

Calculate

trace

P:(2*x-7*y)^2+(2*x+7*...

trace(?sexpand);

expand(P);

Calculate

trace

Run Example
(%i1)H: matrix ([h11, h12], [h21, h22]);
                                 [ h11  h12 ]
(%o1)                            [          ]
                                 [ h21  h22 ]
(%i2) B: matrix ([b1, 0], [0, b2]);
                                  [ b1  0  ]
(%o2)                             [        ]
                                  [ 0   b2 ]
(%i3) D: matrix ([d1, 0], [0, d2]);
                                  [ d1  0  ]
(%o3)                             [        ]
                                  [ 0   d2 ]
(%i4) A: H . B . transpose (H) . D;
       [             2            2                                   ]
       [    b2 d1 h12  + b1 d1 h11      b2 d2 h12 h22 + b1 d2 h11 h21 ]
(%o4)  [                                                              ]
       [                                            2            2    ]
       [ b2 d1 h12 h22 + b1 d1 h11 h21     b2 d2 h22  + b1 d2 h21     ]
(%i5) expand(mat_trace(A^3));
        3   3    6          2   3    2    4       2      3    4    2
(%o5) b2  d2  h22  + 3 b1 b2  d2  h21  h22  + 3 b1  b2 d2  h21  h22
     3   3    6     3   3    6          2   3    2    4
 + b1  d2  h21  + b2  d1  h12  + 3 b1 b2  d1  h11  h12
       2      3    4    2     3   3    6
 + 3 b1  b2 d1  h11  h12  + b1  d1  h11
(%i6) 
Run Example
H: matrix ([h11, h12], [h21, h22]);
                                 [ h11  h12 ]
(%o1)                            [          ]
                                 [ h21  h22 ]
(%i2) B: matrix ([b1, 0], [0, b2]);
                                  [ b1  0  ]
(%o2)                             [        ]
                                  [ 0   b2 ]
(%i3) D: matrix ([d1, 0], [0, d2]);
                                  [ d1  0  ]
(%o3)                             [        ]
                                  [ 0   d2 ]
(%i4) A: H . B . transpose (H) . D;
       [             2            2                                   ]
       [    b2 d1 h12  + b1 d1 h11      b2 d2 h12 h22 + b1 d2 h11 h21 ]
(%o4)  [                                                              ]
       [                                            2            2    ]
       [ b2 d1 h12 h22 + b1 d1 h11 h21     b2 d2 h22  + b1 d2 h21     ]
(%i5) C: A . A;
(%o5) matrix([(b2 d1 h12 h22 + b1 d1 h11 h21) (b2 d2 h12 h22 + b1 d2 h11 h21)
             2            2 2
 + (b2 d1 h12  + b1 d1 h11 ) , (b2 d2 h12 h22 + b1 d2 h11 h21)
           2            2              2            2
 (b2 d2 h22  + b1 d2 h21 ) + (b2 d1 h12  + b1 d1 h11 )
 (b2 d2 h12 h22 + b1 d2 h11 h21)], [(b2 d1 h12 h22 + b1 d1 h11 h21)
           2            2              2            2
 (b2 d2 h22  + b1 d2 h21 ) + (b2 d1 h12  + b1 d1 h11 )
                                            2            2 2
 (b2 d1 h12 h22 + b1 d1 h11 h21), (b2 d2 h22  + b1 d2 h21 )
 + (b2 d1 h12 h22 + b1 d1 h11 h21) (b2 d2 h12 h22 + b1 d2 h11 h21)])
(%i6) expand(mat_trace(C));
        2   2    4             2    2    2       2          2    2
(%o6) b2  d2  h22  + 2 b1 b2 d2  h21  h22  + 2 b2  d1 d2 h12  h22
                                     2   2    4       2          2    2
 + 4 b1 b2 d1 d2 h11 h12 h21 h22 + b1  d2  h21  + 2 b1  d1 d2 h11  h21
     2   2    4             2    2    2     2   2    4
 + b2  d1  h12  + 2 b1 b2 d1  h11  h12  + b1  d1  h11
(%i7) 
Run Example
? trace;

 -- Function: trace (<f_1>, ..., <f_n>)
 -- Function: trace (all)
 -- Function: trace ()
     Given functions <f_1>, ..., <f_n>, `trace' instructs Maxima to
     print out debugging information whenever those functions are
     called.  `trace(f)$ trace(g)$' puts `f' and then `g' onto the list
     of functions to be traced; the list accumulates from one call to
     the next.

     `trace(all)' puts all user-defined functions (as named by the
     global variable `functions') on the list of functions to be traced.

     With no arguments, `trace' returns a list of all the functions
     currently being traced.

     The `untrace' function disables tracing.  See also `trace_options'.

     `trace' quotes its arguments. Thus, `f(x) := x^2$ g:f$ trace(g)$'
     does not put `f' on the trace list.

     When a function is redefined, it is removed from the timer list.
     Thus after `timer(f)$ f(x) := x^2$', function `f' is no longer on
     the timer list.

     If `timer (f)' is in effect, then `trace (f)' has no effect;
     `trace' and `timer' can't both be in effect for the same function.


  There are also some inexact matches for `trace'.
  Try `?? trace' to see them.

(%o1)                                true
(%i2) 

Related Help

Help for Trace