Skip to content

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

Léela en español

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

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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)210,x≥−10,x≤10],x)≈[−0.9681275146103557,[x→1.5583849056881718]]\displaystyle \operatorname{numeric\_minimize}\left(\left[ \sin(3 x)+\frac{(x-1)^{2}}{10}, x \ge -10, x \le 10 \right], x\right) \approx \left[ -0.9681275146103557, \left[ x \to 1.5583849056881718 \right] \right]
    numeric_minimize([sin(3x) + (x - 1)^2/10, x >= -10, x <= 10], x)

    In the solver, numeric_minimize([sin(3x) + (x - 1)^2/10, x >= -10, x <= 10], x) gives [-0.9681275146103557, [x -> 1.5583849056881718]].

    Open in the solver
  • numeric_minimize⁡([(x−2.3)2+sin⁡(y),x≥−10,x≤10,y≥−5,y≤5,y∈Z],[x,y])≈[−0.9589242746631385,[x→2.3,y→5]]\displaystyle \operatorname{numeric\_minimize}(\left[ (x-2.3)^{2}+\sin(y), x \ge -10, x \le 10, y \ge -5, y \le 5, y \in \mathbb{Z} \right], \left[ x, y \right]) \approx \left[ -0.9589242746631385, \left[ x \to 2.3, y \to 5 \right] \right]
    numeric_minimize([(x - 2.3)^2 + sin(y), x >= -10, x <= 10, y >= -5, y <= 5, y : integer], [x, y])

    In the solver, numeric_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]].

    Open in the solver
  • numeric_minimize⁡([1x+x,x≥−1,x≤2],x)≈[−∞,[x→0]]\displaystyle \operatorname{numeric\_minimize}\left(\left[ \frac{1}{x}+x, x \ge -1, x \le 2 \right], x\right) \approx \left[ -\infty, \left[ x \to 0 \right] \right]
    numeric_minimize([1/x + x, x >= -1, x <= 2], x)

    In the solver, numeric_minimize([1/x + x, x >= -1, x <= 2], x) gives [-inf, [x -> 0]].

    Open in the solver

Functions its examples use

  • sin

    Sine of an angle in radians.

  • 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.