next up previous contents
Next: calcLB Up: Function Reference Previous: cbhexp   Contents

evalLB2expr



  
Purpose 		
Evaluate a LB to a symbolic or Maple expression.


Syntax e:=evalLB2expr(x,vars);

Description
The command evalLB2expr, takes a Lie monomial as input (cf. simpLB, p. [*] and returns two expressions with the expansion of the Lie bracket according to its definition involving the partial derivatives of the vector fields. The first expression of the output displays an implicit evaluation of the bracket (i.e. the derivatives are not actually computed). The second expression corresponds to a form in terms of the Jacobians that are not evaluated until the explicit definition of the vector fields takes place.


Arguments $x$ A pure Lie bracket.
$vars$ $\textstyle \parbox{0.64\textwidth}{Array or vector of variables
 in terms of wh...
...n)$. Where $fi_j$\ is the $j^\textit{th}$\ element of
 the indeterminate $fi$.}$

Examples
The following examples show respectively the implicit and explicit evaluation of a second order and a third order Lie bracket.
 
> z1:=g0&*g1;
> z2:=g1&*(g0&*g2);
> evalLB2expr(z1,x)[1];z1e:=evalLB2expr(z1,x)[2];
> evalLB2expr(z2,x)[1];z2e:=evalLB2expr(z2,x)[2];

                            z1 := g0 &* g1


                        z2 := g1 &* (g0 &* g2)


                       /d    \      /d    \
                       |-- g1| g0 - |-- g0| g1
                       \dx   /      \dx   /


  z1e := matadd(multiply(jacobian(g1, x), g0),

        -multiply(jacobian(g0, x), g1))

  /d  //d    \      /d    \   \\
  |-- ||-- g2| g0 - |-- g0| g2|| g1
  \dx \\dx   /      \dx   /   //

           /d    \ //d    \      /d    \   \
         - |-- g1| ||-- g2| g0 - |-- g0| g2|
           \dx   / \\dx   /      \dx   /   /


  z2e := matadd(multiply(jacobian(matadd(

        multiply(jacobian(g2, x), g0), -multiply(jacobian(g0, x), g2))

        , x), g1), -multiply(jacobian(g1, x), matadd(

        multiply(jacobian(g2, x), g0), -multiply(jacobian(g0, x), g2))))

> g0:=vector([-x2,u^2*x1]);
> g1:=vector([tan(x1),tan(x2)]);
> g2:=vector([x2,1]);
> x:=[x1,x2];

                                [      2   ]
                          g0 := [-x2, u  x1]


                       g1 := [tan(x1), tan(x2)]


                            g2 := [x2, 1]


                            x := [x1, x2]

> with(linalg,jacobian,multiply,matadd);

                     [jacobian, multiply, matadd]

> eval(z1e);
> eval(z2e);

  [             2                            2   2       2        ]
  [-(1 + tan(x1) ) x2 + tan(x2), (1 + tan(x2) ) u  x1 - u  tan(x1)]

  [ 2                       2    2
  [u  tan(x1) - (1 + tan(x1) ) (u  x1 + 1),

          2                       2   2   ]
        -u  tan(x2) + (1 + tan(x2) ) u  x2]


Notes
The following issues must be considered when using evalLB2expr:
  • The input Lie bracket must be a pure bracket.
  • Note the functions jacobian, multiply and matadd (from the linalg package) shouldn't be in the Maple environment before calling evalLB2expr, otherwise they must be unassigned using unassign.
  • The Lie algebra generators must be free of assumptions. The vector type assumption might be a frequent cause of problems if the user forgets to remove this or any other assumption from the variable. The reason for having assumption-free variables is that the function jacobian from the linalg package cannot handle variables on which some previous assumption was made.
  • To obtain a fully (explicitly) evaluated Lie bracket it is necessary to load the linalg package or at least the functions within this package shown in the above example.
  • The invocation of the commands should follow this particular order: define the Lie monomial, calculate its expansion with evalLB2expr, define the corresponding generators, load the linalg package (jacobian, multiply and matadd commands), and finally, evaluate the expansion via eval.


Operator Substitution
It's worth to mention that this function is simple thanks to the capability of Maple for performing operator substitution. The code for this routine is perhaps a good example on how to perform an operator substitution.

next up previous contents
Next: calcLB Up: Function Reference Previous: cbhexp   Contents
Miguel Attilio Torres-Torriti 2004-05-31