FUNCTION: lagr - find the constrained extrema of a polynomial
                 using Lagrange's method

CALLING SEQUENCE:
   lagr(f,g,x,optns)

PARAMETERS:
   f     - polynomial function to be optimized
   g     - list or set of constraint polynomials (=0 assumed)
   x     - (optional) list of variables
   optns - (optional) string or set of strings for the options 

SYNOPSIS:
- The extrema will be computed by first constructing the Lagrangian,
  then calculating its Jacobian, solving its zeroes using polysolve,
   and finally selecting the zeroes which give the largest and smallest
   values of the function.

- The argument `verbose` will cause the Jacobian to be displayed.

- Any options will be passed on to polysolve.

- Before using lagr, polysolve must be read in with read(`groebner.mpl`).

EXAMPLES:
> lagr(x^3+2*x*y*z-z^2, [x^2+y^2+z^2-1]);

     [{y = 0, z = 0, x = 1}, 1, {z = 2/3, y = 1/3, x = -2/3}, -28/27]


SEE ALSO: polysolve, extrema