# numeric_minimize 函数

数值求得的表达式最小值，以及取得该值的点。

## 怎么写

### numeric_minimize(expr, variables)

在有界区域内搜索是全局的，整数未知量也包括在内；遇到极点会返回 -inf。

**expr**

目标函数，或先写目标函数再写其条件，放在括号中。接受一个表达式或一个列表。

**variables**

一个变量，或变量列表，例如 \[x, y\]。接受一个变量或变量列表。

## 示例

- $\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)`

  在求解器中，`numeric_minimize([sin(3x) + (x - 1)^2/10, x >= -10, x <= 10], x)` 的结果是 `[-0.9681275146103557, [x -> 1.5583849056881718]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=numeric_minimize%28%5Bsin%283x%29%20%2B%20%28x%20-%201%29%5E2%2F10%2C%20x%20%3E%3D%20-10%2C%20x%20%3C%3D%2010%5D%2C%20x%29)
- $\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])`

  在求解器中，`numeric_minimize([(x - 2.3)^2 + sin(y), x >= -10, x <= 10, y >= -5, y <= 5, y : integer], [x, y])` 的结果是 `[-0.9589242746631385, [x -> 2.3, y -> 5]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=numeric_minimize%28%5B%28x%20-%202.3%29%5E2%20%2B%20sin%28y%29%2C%20x%20%3E%3D%20-10%2C%20x%20%3C%3D%2010%2C%20y%20%3E%3D%20-5%2C%20y%20%3C%3D%205%2C%20y%20%3A%20integer%5D%2C%20%5Bx%2C%20y%5D%29)
- $\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)`

  在求解器中，`numeric_minimize([1/x + x, x >= -1, x <= 2], x)` 的结果是 `[-inf, [x -> 0]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=numeric_minimize%28%5B1%2Fx%20%2B%20x%2C%20x%20%3E%3D%20-1%2C%20x%20%3C%3D%202%5D%2C%20x%29)

## 示例中用到的函数

- [sin](https://zh.hilberon.com/library/sin)

  角度的正弦，角度以弧度计。

## 相关函数

- [minimize](https://zh.hilberon.com/library/minimize)

  表达式的最小值以及取到最小值的位置。
- [max_value](https://zh.hilberon.com/library/max_value)

  表达式的最大值。
- [numeric_maximize](https://zh.hilberon.com/library/numeric_maximize)

  数值求得的表达式最大值，以及取得该值的点。
- [maximize](https://zh.hilberon.com/library/maximize)

  表达式的最大值以及取得该值的点。
- [min_value](https://zh.hilberon.com/library/min_value)

  表达式的最小值。

---
Source: https://zh.hilberon.com/library/numeric_minimize
