# find_instance 函数

满足条件的一个点；不存在时为空列表。

## 怎么写

### find_instance(condition, variables, domain)

在实数或整数上求解；曲边区域的点会以分数形式给出，并满足该条件。

**condition**

条件；多个条件用 and 连接。接受一个条件，真或假。

**variables**

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

**domain**

## 示例

- $\displaystyle \begin{cases} x+y > 10 \\ x-y < 2 \\ x < 5 \end{cases} \; (x, y) = (\frac{9}{2}, 6)$

  `find_instance(x + y > 10 and x - y < 2 and x < 5, [x, y], real)`

  在求解器中，`find_instance(x + y > 10 and x - y < 2 and x < 5, [x, y], real)` 的结果是 `[[x -> 9/2, y -> 6]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=find_instance%28x%20%2B%20y%20%3E%2010%20and%20x%20-%20y%20%3C%202%20and%20x%20%3C%205%2C%20%5Bx%2C%20y%5D%2C%20real%29)
- $\displaystyle \begin{cases} x^{2}+y^{2} = 1 \\ x > \frac{3}{5} \\ y > \frac{3}{5} \end{cases} \; (x, y) = (\frac{21}{29}, \frac{20}{29})$

  `find_instance(x^2 + y^2 = 1 and x > 3/5 and y > 3/5, [x, y], real)`

  在求解器中，`find_instance(x^2 + y^2 = 1 and x > 3/5 and y > 3/5, [x, y], real)` 的结果是 `[[x -> 21/29, y -> 20/29]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=find_instance%28x%5E2%20%2B%20y%5E2%20%3D%201%20and%20x%20%3E%203%2F5%20and%20y%20%3E%203%2F5%2C%20%5Bx%2C%20y%5D%2C%20real%29)
- $\displaystyle \begin{cases} x^{2}+y^{2} = 50 \\ x > y \\ y > 0 \end{cases} \; (x, y) = (7, 1)$

  `find_instance(x^2 + y^2 = 50 and x > y and y > 0, [x, y], integer)`

  在求解器中，`find_instance(x^2 + y^2 = 50 and x > y and y > 0, [x, y], integer)` 的结果是 `[[x -> 7, y -> 1]]`。

  [在求解器中打开](https://zh.hilberon.com/?q=find_instance%28x%5E2%20%2B%20y%5E2%20%3D%2050%20and%20x%20%3E%20y%20and%20y%20%3E%200%2C%20%5Bx%2C%20y%5D%2C%20integer%29)

## 相关函数

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

  从起始值出发，用数值方法求一个根。
- [eliminate](https://zh.hilberon.com/library/eliminate)

  从方程组中消去变量，留下只含其他变量的方程。
- [least_squares](https://zh.hilberon.com/library/least_squares)

  A x = b 的最小二乘解。
- [solve_identity](https://zh.hilberon.com/library/solve_identity)

  找出使方程对变量的每个取值都成立的参数值。
- [linear_solve](https://zh.hilberon.com/library/linear_solve)

  求解由矩阵和右端项给出的线性方程组 A x = b。
- [solve_all](https://zh.hilberon.com/library/solve_all)

  描述方程和不等式的完整解集。

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