\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)
(%i1) |
LieScalar
(
[
l
]
)
:
=
block
(
[
f
,
h
,
x
,
k
,
Lfh
]
,
if ( length ( l ) < 3 ) or ( length ( l ) > 4 ) then error ( "Aufruf mit 3 oder 4 Argumenten." ) , f : l [ 1 ] , /* Vektorfeld */ h : l [ 2 ] , /* Skalarfeld */ x : l [ 3 ] , /* Variable */ if length ( l ) = 3 then k : 1 else k : l [ 4 ] , if not ( nonnegintegerp ( k ) ) then error ( "Ordnung k muss natürliche Zahl sein." ) , if k = 0 then return ( h ) else Lfh : jacobian ( [ h ] , x ) . f , return ( LieScalar ( f , Lfh , x , k − 1 ) ) ) $ |
(%i4) |
f
:
[
sin
(
x3
)
,
cos
(
x3
)
,
0
]
$
h : x1 ^ 2 + x2 ^ 2 $ x : [ x1 , x2 , x3 ] $ |
(%i5) | LieScalar ( f , h , x ) ; |
\[\operatorname{ }2 \ensuremath{\mathrm{x1}} \sin{\left( \ensuremath{\mathrm{x3}}\right) }+2 \ensuremath{\mathrm{x2}} \cos{\left( \ensuremath{\mathrm{x3}}\right) }\]
(%i7) |
LieScalar
(
f
,
h
,
x
,
2
)
;
trigsimp ( % ) ; |
\[\operatorname{ }2 {{\sin{\left( \ensuremath{\mathrm{x3}}\right) }}^{2}}+2 {{\cos{\left( \ensuremath{\mathrm{x3}}\right) }}^{2}}\]
\[\operatorname{ }2\]
(%i8) | LieScalar ( f , h , x , 3 ) ; |
\[\operatorname{ }0\]
Created with wxMaxima.