sample real connected components of a polynomial system
WitnessPoints(sys, vars, digits=d)
list of equations or list of inequations and strict inequalities
(optional) list of names; the indeterminates
(optional) positive integer; number of significant digits
The function WitnessPoints returns at least one point in each connected component of the real solutions of sys.
The system sys is either:
a list of polynomial equations with rational coefficients
or, a list of polynomial inequations of the form p≠q and strict inequalities of the form p>q with rational coefficients
The output is a list of points with rational coordinates.
A point is represented by a list of equations of the form variable=rational.
When sys is a list of equations, then each point of the output is a rational approximation of a solution of sys, the precision of which is controlled by the option digits=d (default value: Digits). More precisely, if a is a point returned by the command WitnessPoints, then there exists a solution x of sys such that:
|| a - x ||1<10−d⁢|| a ||1
When the list of names vars is provided, it must contain all the indeterminates appearing in sys. In this case, the coordinates of the points returned by WitnessPoints are ordered according to vars.
Several points can belong to the same connected component.
For some inputs, repeated execution of the command WitnessPoints may return different outputs due to the use of randomization in the implementation. A way to keep the function deterministic is to use the command randomize with a fixed seed (see Examples below).
WitnessPoints computes sample solutions of an equation:
or a system of equations
or a set of inequalities:
The following example computes points on the interior and the exterior of the unit circle, with x-coordinates in the interval −1,1.
In the following example, we check that a system with the equation x2<−1 has no real solutions.
The following example illustrates the precision of the computed solutions.
sols20 ≔ WitnessPoints⁡x−32+y4−y=0,digits=20:
sols30 ≔ WitnessPoints⁡x−32+y4−y=0,digits=30:
sols50 ≔ WitnessPoints⁡x−32+y4−y=0,digits=50:
A20 ≔ eval⁡x,y,sols201
A30 ≔ eval⁡x,y,sols301
X ≔ eval⁡x,y,sols501
In the next example we give a seed to the rand function in order to transform the command WitnessPoints in a deterministic function.
seed ≔ 123456789
The command doesn't handle mixed equations and inequalities/inequations.
Error, (in RootFinding:-WitnessPoints) WitnessPoints does not handle mixed equations and inequalities/inequations
Download Help Document
What kind of issue would you like to report? (Optional)