next up previous contents
Next: selectLB Up: Function Reference Previous: evalLB2expr   Contents

calcLB



  
Purpose 		 
Calculates a LB in terms of the definitions for each generator of an algebra of vector fields.


Syntax e:=calcLB(x,listgen,listgendef,vars);

Description
This function performs an explicit calculation of Lie bracket of vector fields, i.e. calculates the Jacobians of the vector fields and makes the appropriate multiplications between the Jacobians and the vector fields. To this end, the function requires a list with the names of the symbolic variables that represent the vector fields, a list with the actual definitions of the corresponding vector fields, and an array with the variables in terms of which the vector fields are defined.


Arguments $x$ A pure Lie bracket.
$listgen$ $\textstyle \parbox{0.64\textwidth}{List of Lie algebra 
 generators (indeterminates). e.g. $[f0, f1, f2]$.}$
$listgendef$ % latex2html id marker 10244
$\textstyle \parbox{0.64\textwidth}{\mbox{}\\ 
 Lis...
...definition of each
 indeterminate should be stored in a vector type.
 e.g. Let}$
       
        > f0d:=vector([-x2,a*x1]);
        > f1d:=vector([x1*x2,x2]);
        > f2d:=vector([0;2*x1^2]);

then $listgen$ should be $[f0d,f1d,f2d]$.
$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$.}$

Example
The following examples show respectively the implicit and explicit evaluation of a second order and a third order Lie bracket. In the following example the Lie brackets z1 and z2 are defined first. Note that z1 is defined in terms of Lie elements f0 and f1, while z2 is expressed in terms of the Lie elements g0, g1 and g2. The explicit evaluations of the brackets z1 and z2 are given in z1e and z2e, respectively. Next the definitions for the g's are given, but not for the f's. Notice that once the linalg package has been loaded, the evaluation of z2e, using Maple's eval, actually calculates (fully evaluates) the Lie bracket according to the definitions of the g's, while the eval(z1e) returns an error, obviously because the f's have not been explicitly defined. However, using calcLB at the end of this example, the bracket z1 is explicitly calculated. The arguments to calcLB are z=[f0,f1] a list containing the elements in terms of which the bracket z1 is defined, a second list with the corresponding definitions of f0 and f1 given respectively in g0 and g1, and finally the array x of variables in terms of which the g's are defined.
> z1:=f0&*f1;
> z2:=g1&*(g0&*g2);
> z1e:=evalLB2expr(z1,x)[2];
> z2e:=evalLB2expr(z2,x)[2];

                           z1 := f0~ &* f1~

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


  z1e := matadd(multiply(jacobian(f1~, x), f0~),

        -multiply(jacobian(f0~, x), f1~))


  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); # Just to show that it cannot be evaluated without
>            # the proper definitions for the vector fields...
Error, (in jacobian) wrong number (or type) of arguments

> eval(z2e);

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

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

> # z[1..2] are the first to components of the previously 
> # defined z:=phb(3,4); (see the example for the phb function, 
> # in which z[1..2] corresponds to the list '[f0, f1]'). 
> calcLB(z1,z[1..2],[g0,g1],x);

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


Notes
This function invokes the procedure evalLB2expr in order to perform the calculation, but does not require to load the linalg package.


See Also evalLB2expr.

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