next up previous contents
Next: The Minimum Function Up: Mathematical Functions Previous: The Maximum Function

Maximize Function

Calling Sequence:
f, r, tol)
f, r)
f : procedure
r : ${\tt real} \ldots {\tt real}$
tol : ${\tt real} \geq 0$

Returns: A list of length 2 of the form [x, f(x)].

Synopsis: This function finds the maximum [x, f(x)] of a convex function f over a range r within an absolute accuracy of tol. If tol is not given as a parameter, the result is of machine accuracy.


> MaximizeFunc(x -> sin(x), 0..1);
> z := proc(x) return(x^2 - 3*x); end;
> MaximizeFunc(z, -2..0);

See also: MinimizeFunc, Minimize2DFunc, DisconMinimize, NBody

Gaston Gonnet