FindInstance
✖
FindInstance

finds an instance over the domain dom. Common choices of dom are Complexes, Reals, Integers, and Booleans.
Details and Options


- FindInstance[expr,{x1,x2,…}] gives results in the same form as Solve: {{x1->val1,x2->val2,…}} if an instance exists, and {} if it does not.
- expr can contain equations, inequalities, domain specifications and quantifiers, in the same form as in Reduce.
- The statement expr can be any logical combination of:
-
lhs==rhs equations lhs!=rhs inequations lhs>rhs or lhs>=rhs inequalities expr∈dom domain specifications {x,y,…}∈reg region specification ForAll[x,cond,expr] universal quantifiers Exists[x,cond,expr] existential quantifiers - With exact symbolic input, FindInstance gives exact results.
- Even if two inputs define the same mathematical set, FindInstance may still pick different instances to return.
- The instances returned by FindInstance typically correspond to special or interesting points in the set.
- FindInstance[expr,vars] assumes by default that quantities appearing algebraically in inequalities are real, while all other quantities are complex.
- FindInstance[expr,vars,Integers] finds solutions to Diophantine equations.
- FindInstance[expr,vars,Booleans] solves Boolean satisfiability for expr.
- FindInstance[expr,vars,Reals] assumes that not only vars but also all function values in expr are real. FindInstance[expr&&vars∈Reals,vars] assumes only that the vars are real.
- FindInstance[…,x∈reg,Reals] constrains x to be in the region reg. The different coordinates for x can be referred to using Indexed[x,i].
- FindInstance may be able to find instances even if Reduce cannot give a complete reduction.
- By default, every time you run FindInstance with a given input, it will return the same output.
- FindInstance[expr,vars,dom,n] will return a shorter list if the total number of instances is less than n.
- The following options can be given:
-
Method Automatic method to use Modulus 0 modulus to assume for integers RandomSeeding 1234 how to seed randomness WorkingPrecision Infinity precision to use in internal computations
Examples
open allclose allBasic Examples (6)Summary of the most common use cases
Find a solution instance of a system of equations:

https://wolfram.com/xid/0bdo9j2he-2inxr

Find a real solution instance of a system of equations and inequalities:

https://wolfram.com/xid/0bdo9j2he-baeh0b

Find an integer solution instance:

https://wolfram.com/xid/0bdo9j2he-7wg78

Find Boolean values of variables that satisfy a formula:

https://wolfram.com/xid/0bdo9j2he-gei30x


https://wolfram.com/xid/0bdo9j2he-6cdwz

Find a point in a geometric region:

https://wolfram.com/xid/0bdo9j2he-m1hbjg


https://wolfram.com/xid/0bdo9j2he-b209ra

Scope (57)Survey of the scope of standard use cases
Complex Domain (11)

https://wolfram.com/xid/0bdo9j2he-ezsmap

A univariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-lerc4n

Five roots of a polynomial of a high degree:

https://wolfram.com/xid/0bdo9j2he-jik1b0

A multivariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-e137xc

Systems of polynomial equations and inequations:

https://wolfram.com/xid/0bdo9j2he-coyrmp

This gives three solution instances:

https://wolfram.com/xid/0bdo9j2he-byv5sk

If there are no solutions FindInstance returns an empty list:

https://wolfram.com/xid/0bdo9j2he-kdol8u

If there are fewer solutions than the requested number, FindInstance returns all solutions:

https://wolfram.com/xid/0bdo9j2he-bxjm5f

Five out of a trillion roots of a polynomial system:

https://wolfram.com/xid/0bdo9j2he-jddb0


https://wolfram.com/xid/0bdo9j2he-dqcpmy


https://wolfram.com/xid/0bdo9j2he-swnvu


https://wolfram.com/xid/0bdo9j2he-ei0sno


https://wolfram.com/xid/0bdo9j2he-uuuqt

In this case there is no solution:

https://wolfram.com/xid/0bdo9j2he-h4i66s

A solution in terms of transcendental Root objects:

https://wolfram.com/xid/0bdo9j2he-b9tu3w

Five roots of an unrestricted equation:

https://wolfram.com/xid/0bdo9j2he-bcvf0m

Systems of transcendental equations:

https://wolfram.com/xid/0bdo9j2he-befei3

https://wolfram.com/xid/0bdo9j2he-o6850c

https://wolfram.com/xid/0bdo9j2he-9rfynf

Three roots of a transcendental system:

https://wolfram.com/xid/0bdo9j2he-wl01fb

Real Domain (13)

https://wolfram.com/xid/0bdo9j2he-fskac

A univariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-dhq5bv

A univariate polynomial inequality:

https://wolfram.com/xid/0bdo9j2he-bjw1kd

A multivariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-mt2k2q

A multivariate polynomial inequality:

https://wolfram.com/xid/0bdo9j2he-dy7eco

Systems of polynomial equations and inequalities:

https://wolfram.com/xid/0bdo9j2he-bsu17f


https://wolfram.com/xid/0bdo9j2he-fhha9d

If there are no solutions FindInstance returns an empty list:

https://wolfram.com/xid/0bdo9j2he-cwb415

If there are fewer solutions than the requested number, FindInstance returns all solutions:

https://wolfram.com/xid/0bdo9j2he-eh6wl3

A quantified polynomial system:

https://wolfram.com/xid/0bdo9j2he-d6xrhv


https://wolfram.com/xid/0bdo9j2he-cdubtk


https://wolfram.com/xid/0bdo9j2he-dyni8


https://wolfram.com/xid/0bdo9j2he-fphl0y


https://wolfram.com/xid/0bdo9j2he-l2az10


https://wolfram.com/xid/0bdo9j2he-biwli8


https://wolfram.com/xid/0bdo9j2he-tfnsh


https://wolfram.com/xid/0bdo9j2he-obvohx

A solution in terms of transcendental Root objects:

https://wolfram.com/xid/0bdo9j2he-d640we


https://wolfram.com/xid/0bdo9j2he-ez8lus


https://wolfram.com/xid/0bdo9j2he-0hv9g


https://wolfram.com/xid/0bdo9j2he-s4nr6


https://wolfram.com/xid/0bdo9j2he-pu71op


https://wolfram.com/xid/0bdo9j2he-ky52px

Integer Domain (12)

https://wolfram.com/xid/0bdo9j2he-sz2ju

A linear system of equations and inequalities:

https://wolfram.com/xid/0bdo9j2he-fulreq


https://wolfram.com/xid/0bdo9j2he-m3798n

A univariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-km7sh0

A univariate polynomial inequality:

https://wolfram.com/xid/0bdo9j2he-36h74


https://wolfram.com/xid/0bdo9j2he-g1rl8c


https://wolfram.com/xid/0bdo9j2he-bk2dj1


https://wolfram.com/xid/0bdo9j2he-cwbm4i


https://wolfram.com/xid/0bdo9j2he-enjls9

If there are fewer solutions than the requested number, FindInstance returns all solutions:

https://wolfram.com/xid/0bdo9j2he-k5p27t


https://wolfram.com/xid/0bdo9j2he-hsrd0b


https://wolfram.com/xid/0bdo9j2he-ealuoj

A bounded system of equations and inequalities:

https://wolfram.com/xid/0bdo9j2he-jqvrli

A high-degree system with no solution:

https://wolfram.com/xid/0bdo9j2he-jjwul

Transcendental Diophantine systems:

https://wolfram.com/xid/0bdo9j2he-b6qb0s


https://wolfram.com/xid/0bdo9j2he-j84jjc

A polynomial system of congruences:

https://wolfram.com/xid/0bdo9j2he-cpi4z8

Modular Domains (5)

https://wolfram.com/xid/0bdo9j2he-cud08z

A univariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-7mc9q

A multivariate polynomial equation:

https://wolfram.com/xid/0bdo9j2he-ew4oo


https://wolfram.com/xid/0bdo9j2he-ggxdlv

A system of polynomial equations and inequations:

https://wolfram.com/xid/0bdo9j2he-dxz908

A quantified polynomial system:

https://wolfram.com/xid/0bdo9j2he-kzgfqy

Finite Field Domains (4)

https://wolfram.com/xid/0bdo9j2he-cfndqf


https://wolfram.com/xid/0bdo9j2he-f6gotk


https://wolfram.com/xid/0bdo9j2he-hef9nj


https://wolfram.com/xid/0bdo9j2he-dyppb

Systems of polynomial equations:

https://wolfram.com/xid/0bdo9j2he-fi2b3p


https://wolfram.com/xid/0bdo9j2he-fna1o8

Systems involving quantifiers:

https://wolfram.com/xid/0bdo9j2he-xqu6d


https://wolfram.com/xid/0bdo9j2he-bfs72u

Mixed Domains (3)
Mixed real and complex variables:

https://wolfram.com/xid/0bdo9j2he-mc1m3r

Find a real value of and a complex value of
for which
is real and less than
:

https://wolfram.com/xid/0bdo9j2he-bd6p0y

An inequality involving Abs[z]:

https://wolfram.com/xid/0bdo9j2he-galb24


https://wolfram.com/xid/0bdo9j2he-dzdu5p

Geometric Regions (9)
Find instances in basic geometric regions in 2D:

https://wolfram.com/xid/0bdo9j2he-bk1i0g

https://wolfram.com/xid/0bdo9j2he-hmr065


https://wolfram.com/xid/0bdo9j2he-okukv

Find instances in basic geometric regions in 3D:

https://wolfram.com/xid/0bdo9j2he-gnofuq

https://wolfram.com/xid/0bdo9j2he-hvv7n2


https://wolfram.com/xid/0bdo9j2he-edimni

Find a point in the projection of a region:

https://wolfram.com/xid/0bdo9j2he-b9wofb

https://wolfram.com/xid/0bdo9j2he-hmfpb8

https://wolfram.com/xid/0bdo9j2he-c27vxo


https://wolfram.com/xid/0bdo9j2he-cstveu

https://wolfram.com/xid/0bdo9j2he-jh63ov

A parametrically defined region:

https://wolfram.com/xid/0bdo9j2he-juwcyb

https://wolfram.com/xid/0bdo9j2he-zehgc


https://wolfram.com/xid/0bdo9j2he-mi7sv6

https://wolfram.com/xid/0bdo9j2he-cp80z


https://wolfram.com/xid/0bdo9j2he-la3oq9

Regions dependent on parameters:

https://wolfram.com/xid/0bdo9j2he-9d869w

https://wolfram.com/xid/0bdo9j2he-i98t6t

Find values of parameters ,
, and
for which the circles contain the given points:

https://wolfram.com/xid/0bdo9j2he-b4gh8g

https://wolfram.com/xid/0bdo9j2he-kcwhx


https://wolfram.com/xid/0bdo9j2he-f52ji9

Use to specify that
is a vector in
:

https://wolfram.com/xid/0bdo9j2he-cnu18n

https://wolfram.com/xid/0bdo9j2he-7ktet


https://wolfram.com/xid/0bdo9j2he-i3d948

https://wolfram.com/xid/0bdo9j2he-b4yyjq

Options (3)Common values & functionality for each option
Modulus (1)
RandomSeeding (1)
Finding instances often involves random choice from large solution sets:

https://wolfram.com/xid/0bdo9j2he-dvu7hg

By default, FindInstance chooses the same solutions each time:

https://wolfram.com/xid/0bdo9j2he-e9illv

Use RandomSeedingAutomatic to generate potentially new instances each time:

https://wolfram.com/xid/0bdo9j2he-cmt633

WorkingPrecision (1)
Finding an exact solution to this problem is hard:

https://wolfram.com/xid/0bdo9j2he-dci37

With a finite WorkingPrecision, FindInstance is able to find an approximate solution:

https://wolfram.com/xid/0bdo9j2he-f3chqt

Applications (11)Sample problems that can be solved with this function
Geometric Problems (6)
The region ℛ is a subset of if is empty. Show that Disk[{0,0},{2,1}] is a subset of Rectangle[{-2,-1},{2,1}]:

https://wolfram.com/xid/0bdo9j2he-18g7a

https://wolfram.com/xid/0bdo9j2he-c2c6yf


https://wolfram.com/xid/0bdo9j2he-dplxmk

Show that Rectangle[] is a not a subset of Disk[{0,0},7/5]:

https://wolfram.com/xid/0bdo9j2he-bml62m

https://wolfram.com/xid/0bdo9j2he-hsmtn2


https://wolfram.com/xid/0bdo9j2he-g0uhww

Show that Cylinder[]⊆Ball[{0,0,0},2]:

https://wolfram.com/xid/0bdo9j2he-bthjls

https://wolfram.com/xid/0bdo9j2he-ba7xve


https://wolfram.com/xid/0bdo9j2he-fn0f55

Show that Cylinder[]⊈Ball[{0,0,0},7/5]:

https://wolfram.com/xid/0bdo9j2he-n5bb1

https://wolfram.com/xid/0bdo9j2he-fmdady


https://wolfram.com/xid/0bdo9j2he-u33la

Find a point in the intersection of two regions:

https://wolfram.com/xid/0bdo9j2he-kzamk9


https://wolfram.com/xid/0bdo9j2he-iysr85

https://wolfram.com/xid/0bdo9j2he-i538ho

Find a counterexample to a geometric conjecture:

https://wolfram.com/xid/0bdo9j2he-ddll4f

https://wolfram.com/xid/0bdo9j2he-ebwtsw

Prove the conjecture using stronger assumptions:

https://wolfram.com/xid/0bdo9j2he-qq5l5

https://wolfram.com/xid/0bdo9j2he-brzx5r

Boolean Problems (2)
Prove that a statement is a tautology:

https://wolfram.com/xid/0bdo9j2he-cnkh7

https://wolfram.com/xid/0bdo9j2he-jgc5jb

This can be proven with TautologyQ as well:

https://wolfram.com/xid/0bdo9j2he-bjptch

Show that a statement is not a tautology; get a counterexample:

https://wolfram.com/xid/0bdo9j2he-n3zxso

https://wolfram.com/xid/0bdo9j2he-71fwl

This can be done with SatisfiabilityInstances as well:

https://wolfram.com/xid/0bdo9j2he-hoyuyw

Integer Problems (3)

https://wolfram.com/xid/0bdo9j2he-c02

Find Pythagorean triples when they exist:

https://wolfram.com/xid/0bdo9j2he-ca1

Two instances are now found when :

https://wolfram.com/xid/0bdo9j2he-f4a

Find Pythagorean quadruples and visualize the result:

https://wolfram.com/xid/0bdo9j2he-oelkxj

Generate all solutions for and visualize the result:

https://wolfram.com/xid/0bdo9j2he-e2amr6

https://wolfram.com/xid/0bdo9j2he-jv035h

Show that there are no 2×2 magic squares with all numbers unequal:

https://wolfram.com/xid/0bdo9j2he-sn7

Properties & Relations (10)Properties of the function, and connections to other functions
Solution instances satisfy the input system:

https://wolfram.com/xid/0bdo9j2he-dzxbnb

https://wolfram.com/xid/0bdo9j2he-hmyujc

Use RootReduce to prove that algebraic numbers satisfy equations:

https://wolfram.com/xid/0bdo9j2he-g15zel

https://wolfram.com/xid/0bdo9j2he-k9wb60


https://wolfram.com/xid/0bdo9j2he-f63am

When there are no solutions, FindInstance returns an empty list:

https://wolfram.com/xid/0bdo9j2he-cir882

If there are fewer solutions than the requested number, FindInstance returns all solutions:

https://wolfram.com/xid/0bdo9j2he-pd8xoh

To get a complete description of the solution set use Reduce:

https://wolfram.com/xid/0bdo9j2he-ggoj


https://wolfram.com/xid/0bdo9j2he-w9ka8

To get a generic solution of a system of complex equations use Solve:

https://wolfram.com/xid/0bdo9j2he-bq9gxk

Solving a sum of squares representation problem:

https://wolfram.com/xid/0bdo9j2he-dj8idy

Use SquaresR to find the number of solutions to sum of squares problems:

https://wolfram.com/xid/0bdo9j2he-d7krq4

Solving a sum of powers representation problem:

https://wolfram.com/xid/0bdo9j2he-lmovaw

Use PowersRepresentations to enumerate all solutions:

https://wolfram.com/xid/0bdo9j2he-bphba6

Find instances satisfying a Boolean statement:

https://wolfram.com/xid/0bdo9j2he-n3ujd

https://wolfram.com/xid/0bdo9j2he-bboqf5

Use SatisfiabilityInstances to obtain solutions represented as Boolean vectors:

https://wolfram.com/xid/0bdo9j2he-d07u3s

FindInstance shows that the polynomial is non-negative:

https://wolfram.com/xid/0bdo9j2he-b2qs46

https://wolfram.com/xid/0bdo9j2he-cqgp6y

Use PolynomialSumOfSquaresList to represent as a sum of squares:

https://wolfram.com/xid/0bdo9j2he-gucy7i


https://wolfram.com/xid/0bdo9j2he-bmrxo2

The Motzkin polynomial is non-negative, but is not a sum of squares:

https://wolfram.com/xid/0bdo9j2he-ltua3e

https://wolfram.com/xid/0bdo9j2he-be5pc


https://wolfram.com/xid/0bdo9j2he-2zhfo


Wolfram Research (2003), FindInstance, Wolfram Language function, https://reference.wolfram.com/language/ref/FindInstance.html (updated 2024).
Text
Wolfram Research (2003), FindInstance, Wolfram Language function, https://reference.wolfram.com/language/ref/FindInstance.html (updated 2024).
Wolfram Research (2003), FindInstance, Wolfram Language function, https://reference.wolfram.com/language/ref/FindInstance.html (updated 2024).
CMS
Wolfram Language. 2003. "FindInstance." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/FindInstance.html.
Wolfram Language. 2003. "FindInstance." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/FindInstance.html.
APA
Wolfram Language. (2003). FindInstance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindInstance.html
Wolfram Language. (2003). FindInstance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindInstance.html
BibTeX
@misc{reference.wolfram_2025_findinstance, author="Wolfram Research", title="{FindInstance}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/FindInstance.html}", note=[Accessed: 27-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_findinstance, organization={Wolfram Research}, title={FindInstance}, year={2024}, url={https://reference.wolfram.com/language/ref/FindInstance.html}, note=[Accessed: 27-March-2025
]}