numeric_maximize function
The maximum of an expression found numerically, with the point where it is reached.
How to write it
numeric_maximize(expr, variables)
In a bounded region the search is global; a note says when it stopped before proving it.
- expr
- The objective, or the objective first and then its conditions, in brackets. Takes an expression, or a list.
- variables
- A variable, or a list of variables such as [x, y]. Takes a variable, or a list of variables.
Examples
numeric_maximize([x*sin(x), x >= 0, x <= 20], x)In the solver,
Open in the solvernumeric_maximize([x*sin(x), x >= 0, x <= 20], x)gives[18.258905014552553, [x -> 20.0]].
Functions its examples use
- sin
Sine of an angle in radians.
Related functions
- maximize
The maximum of an expression and the point where it is reached.
- numeric_minimize
The minimum of an expression found numerically, with the point where it is reached.
- minimize
The minimum of an expression and the point where it is reached.
- max_value
The maximum value of an expression.
- min_value
The minimum value of an expression.