コンテンツへスキップ

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

    方程式と不等式の完全な解集合を記述します。