Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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⁡(−x2+2x,x)=1\displaystyle \operatorname{max\_value}(-x^{2}+2 x, x) = 1
    max_value(-x^2 + 2x, x)

    In the solver, max_value(-x^2 + 2x, x) gives 1.

    Open in the solver
  • max_value⁡([x2+y2,x+2y≤8,3x+y≤9,x≥0,y≥0,[x,y]∈Z],[x,y])=16\displaystyle \operatorname{max\_value}(\left[ x^{2}+y^{2}, x+2 y \le 8, 3 x+y \le 9, x \ge 0, y \ge 0, \left[ x, y \right] \in \mathbb{Z} \right], \left[ x, y \right]) = 16
    max_value([x^2 + y^2, x + 2y <= 8, 3x + y <= 9, x >= 0, y >= 0, [x, y] : integer], [x, y])

    In the solver, max_value([x^2 + y^2, x + 2y <= 8, 3x + y <= 9, x >= 0, y >= 0, [x, y] : integer], [x, y]) gives 16.

    Open in the solver
  • 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.