Function: gmax - find floating-point approximations to the maximum of an expression on a real interval.

Calling sequence:

gmax( expr, x = a .. b);
gmax( expr, x = a .. b, 'x0');

Parameters:

expr - the expression, involving one variable

x - the variable (a name)

a, b - endpoints of the interval (real constants).

x0 - (optional) a name to use for saving the set of x values at which the maximum is attained.

Description:

Examples:

> gmax( sin(x) +x -x^2/2 , x = -1 .. 1 );

1.341470985

> gmax( sin(x) + x -x^2/2 , x = -1 .. 1, 'x0');

1.341470985

> x0;

{1.}

> gmax(sin(x) + x - x^2/2, x = -infinity .. infinity,'x0');

1.418827374

> x0;

{1.283428742}

> gmax(x^2-x^4,x=-2..2,'x0');

.2500000000

> x0;

{.7071067812, -.7071067812}

> gmax(1/x,x=0..infinity,'x0');

Float(infinity)

> x0;

{0.}

See also:

allsolve , convert(pwlist) , evalr , fsolve , gmin

Maple Advisor Database R. Israel 1998