Function Minimizer

Return to the Math APIs page.
creator:  Peter Knipp

Background:

This API finds a local minimum of a multidimensional function if given the function's string representation. It uses Nelder-Mead method , as presented on page 292 of Chapter 10 of the 1987 edition of Numerical Recipes, by William Press, Brian Flannery, Saul Teukolsky, and william Vetterling. In addition to solving this optimization problem, this API also performs two more basic tasks that require the parsing of a string: expression evaluation and function evaluation .

Params:

Endpoints:

taskurl fragment(s)example(s)
evaluates an expression /evaluate-expression/:exprStr [6 - 5sin(4)] / (32 + 1)
evaluates a function /evaluate-function/:fnStr/:vars/:coords [x - 5sin(y)] / (z2 + 1)
evaluated at (x, y, z) = (6, 4, 3)
minimizes a function /minimize/:fnStr/:vars/random 4x4 + 2xy + 3y2 + 4x + 5y + 6
minimized with a random simplex
/minimize/:fnStr/:vars/:simplex same as above, but specifying a simplex
/minimize/:fnStr/:vars/random/40 same as first example, but reducing iteration-limit from 500 to 40

Notes: