Next: Quadratic forms.
Up: Erable 3.024
Previous: The MMULT| instruction.
Multivariate analysis.
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.
Example:
'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.
Example:
{ '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).
Example:
f(X,Y)= X4+XY+Y3
{ X Y } HESS returns at level 2:
and at level 1:
To find critical points, you have to solve level 2=(0,0):
(4X3+Y,X+3Y2)=(0,0)
hence X=-3Y2. Swap level 2 and 1, type 'X=-3*Y^2' EXEC,
then 1 GET to have the first coordinate:
4(-3Y2)3+Y
then Y SOLV. This equation has two real solutions: 0 and
approximately
0.392026340842 giving two critical points. For
(0,0), the hessian is:
hence (0,0) is not an extremum (signature (1,1)). For the second point
(
Y=0.392026340842, X=-3Y2), the hessian is:
hence is not an extremum.
Next: Quadratic forms.
Up: Erable 3.024
Previous: The MMULT| instruction.
Bernard Parisse
1998-07-31