# find_instance function

A point that meets a condition, or an empty list when there is none.

## How to write it

### find_instance(condition, variables, domain)

Over the reals or the integers; a point of a curved region comes as fractions that meet it.

**condition**

The condition; join several with and. Takes a condition, true or false.

**variables**

A variable, or a list of variables such as \[x, y\]. Takes a variable, or a list of variables.

**domain**

## Examples

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

  In the solver, `find_instance(x + y > 10 and x - y < 2 and x < 5, [x, y], real)` gives `[[x -> 9/2, y -> 6]]`.

  [Open in the solver](https://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)`

  In the solver, `find_instance(x^2 + y^2 = 1 and x > 3/5 and y > 3/5, [x, y], real)` gives `[[x -> 21/29, y -> 20/29]]`.

  [Open in the solver](https://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)`

  In the solver, `find_instance(x^2 + y^2 = 50 and x > y and y > 0, [x, y], integer)` gives `[[x -> 7, y -> 1]]`.

  [Open in the solver](https://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)

## Related functions

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

  Find a root numerically, from a starting value.
- [eliminate](https://hilberon.com/library/eliminate)

  Eliminate variables from a system of equations, leaving equations in the others.
- [least_squares](https://hilberon.com/library/least_squares)

  The least-squares solution of A x = b.
- [solve_identity](https://hilberon.com/library/solve_identity)

  Find the values of the parameters that make an equation true for every value of the variable.
- [linear_solve](https://hilberon.com/library/linear_solve)

  Solve a linear system A x = b given by its matrix and right-hand side.
- [solve_all](https://hilberon.com/library/solve_all)

  Describe the complete solution set of equations and inequalities.

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