max_value function
The maximum value of an expression.
How to write it
max_value(expr, variables)
The greatest value over every real value of the variables.
- expr
- Any expression: a number, a formula, a list or a matrix. Takes an expression.
- variables
- A variable, or a list of variables such as [x, y]. Takes a variable, or a list of variables.
max_value(expr, variables)
The greatest value under conditions, without the point.
- expr
- The objective first, then its conditions, in brackets. Takes a list.
- variables
- A variable, or a list of variables such as [x, y]. Takes a variable, or a list of variables.
Examples
max_value(-x^2 + 2x, x)In the solver,
Open in the solvermax_value(-x^2 + 2x, x)gives1.max_value([x^2 + y^2, x + 2y <= 8, 3x + y <= 9, x >= 0, y >= 0, [x, y] : integer], [x, y])In the solver,
Open in the solvermax_value([x^2 + y^2, x + 2y <= 8, 3x + y <= 9, x >= 0, y >= 0, [x, y] : integer], [x, y])gives16.
Related functions
- min_value
The minimum value of an expression.
- 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.
- numeric_maximize
The maximum 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.