Erable
implements the following functions:
der
with a list of variables at level 1 returns the
gradient of the expression at level 2 with respect to these variables.
'X+2*Y' { X Y } der
returns { 1 2 }
=
.
DIV
returns the divergence of a list-vector at level 2
with respect to a list of variables at level 1.
{ 'X+2*Y' 'X^2+3*Y^3'} { X Y } DIV
returns
'1+9*Y^2'
=
.
CURL
returns the rotationnal (same arguments as DIV
)
LAPL
returns the laplacian of a symbolic expression
at level 2 with respect to a list of variables at level 1 (same arguments
as der
, LAPL
is simply a shortcut for der DIV
)
HESS
returns at level 1 the hessian of a symbolic expression
with respect to a list of variables (same arguments as der
).
Level 2 is the gradient. This is
useful to find local minima and local maxima of a function: you
find first the solutions of gradient=0 (you may use the Gröbner
basis program of ALG48
to simplify this system and use
the SOLV
instruction to find all solutions), then you compute
with EXEC
the hessian at these critical points, and you find
the signature of the critical point using GAUSS
(in the other
directory: see section 14).
{ X Y } HESS
returns at level 2:
'X=-3*Y^2' EXEC
,
then 1 GET
to have the first coordinate:
Y SOLV
. This equation has two real solutions: 0 and
approximately
0.392026340842 giving two critical points. For
(0,0), the hessian is: