numeric_minimize function
The minimum of an expression found numerically, with the point where it is reached.
How to write it
numeric_minimize(expr, variables)
In a bounded region the search is global, whole unknowns included; a pole answers -inf.
- 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_minimize([sin(3x) + (x - 1)^2/10, x >= -10, x <= 10], x)In the solver,
Open in the solvernumeric_minimize([sin(3x) + (x - 1)^2/10, x >= -10, x <= 10], x)gives[-0.9681275146103557, [x -> 1.5583849056881718]].numeric_minimize([(x - 2.3)^2 + sin(y), x >= -10, x <= 10, y >= -5, y <= 5, y : integer], [x, y])In the solver,
Open in the solvernumeric_minimize([(x - 2.3)^2 + sin(y), x >= -10, x <= 10, y >= -5, y <= 5, y : integer], [x, y])gives[-0.9589242746631385, [x -> 2.3, y -> 5]].numeric_minimize([1/x + x, x >= -1, x <= 2], x)In the solver,
Open in the solvernumeric_minimize([1/x + x, x >= -1, x <= 2], x)gives[-inf, [x -> 0]].
Functions its examples use
- sin
Sine of an angle in radians.
Related functions
- minimize
The minimum of an expression and the point where it is reached.
- max_value
The maximum value of an expression.
- numeric_maximize
The maximum of an expression found numerically, with the point where it is reached.
- maximize
The maximum of an expression and the point where it is reached.
- min_value
The minimum value of an expression.