跳转到内容

This page is also in English.

Read it in English

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

Léela en español

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

日本語で読む

find_instance 函数

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

怎么写

find_instance(condition, variables, domain)

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

condition
条件;多个条件用 and 连接。接受一个条件,真或假。
variables
一个变量,或变量列表,例如 [x, y]。接受一个变量或变量列表。
domain

示例

  • {x+y>10x−y<2x<5  (x,y)=(92,6)\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]]。

    在求解器中打开
  • {x2+y2=1x>35y>35  (x,y)=(2129,2029)\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]]。

    在求解器中打开
  • {x2+y2=50x>yy>0  (x,y)=(7,1)\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]]。

    在求解器中打开
  • find_root

    从起始值出发,用数值方法求一个根。

  • eliminate

    从方程组中消去变量,留下只含其他变量的方程。

  • least_squares

    A x = b 的最小二乘解。

  • solve_identity

    找出使方程对变量的每个取值都成立的参数值。

  • linear_solve

    求解由矩阵和右端项给出的线性方程组 A x = b。

  • solve_all

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