RootFinding
EnclosingBox
enclose a point in a box avoiding real polynomial constraints
Calling Sequence
Parameters
Description
Examples
EnclosingBox(constraints, point, output=format)
EnclosingBox(constraints, pointlist, output=format)
EnclosingBox(constraints, variables, values, output=format)
EnclosingBox(constraints, variables, valueslist, output=format)
EnclosingBox(decomposition, output=format)
constraints
-
polynomial or list of polynomials; the constraints
point
list or set of coordinates of the form name=numeric
pointlist
list of list (or set) of coordinates of the form name=numeric
variables
list of names
values
list of numeric values; the coordinates
valueslist
list of list of numeric values; the coordinates
decomposition
decomposition data structure (returned from CellDecomposition)
format
(optional) type of output: either list or plot
The EnclosingBox function computes a rectangular box containing a point defined by point or by variables and values. The main property of the returned box is that its interior has an empty intersection with the real roots of the polynomials given in constraints.
The box returned is maximal in the sense that the borders of the box contain at least one real root of the constraint polynomials.
constraints is a polynomial p (or a list of polynomials p1,...,pk) with rational coefficients. EnclosingBox computes a box that contains no real root of p (or, for a list, no real root of any of the polynomials p1,...,pk) in its interior.
In the EnclosingBox(constraints, variables, values) calling sequence, variables is a list of variable names v1,...,vn and values is a list of numerical values r1,...,rn. These are used to specify a point, described by the coordinates v1=r1,...,vn=rn.
pointlist and valueslist can be used to specify a list of points. In this case, an enclosing box will be computed for each point.
In the last calling sequence, decomposition is a data structure returned by the command CellDecomposition. The constraints are taken from the field decomposition:-DiscriminantVariety and the points coordinates are taken from decomposition:-SamplePoints
You can specify the output format. If output = list, the output is a box described by a set of intervals of the form name=rational,rational where name is a variable and the two numerics are the bound of the interval. This is the default.
If output=plot and the number of variable is less than or equal to 3, then the output is a plot that displays the point, the enclosing box, and the constraints.
with⁡RootFinding:
The following example shows the box enclosing the origin inside a circle:
p≔x2+y2−1
inbox≔EnclosingBox⁡p,x=0,y=0:
evalf⁡inbox
x=−0.7071067811,0.7071067811,y=−0.7071067812,0.7071067812
A second box, outside the circle:
outbox≔EnclosingBox⁡p,x=1,y=1:
evalf⁡outbox
x=0.7071067812,Float⁡∞,y=0.7071067812,Float⁡∞
Compute and display both boxes together with the circle.
EnclosingBox⁡p,x=0,y=0,x=1,y=1,output=plot
Alternatively, use the following calling sequence, specifying variables and values individually:
evalf⁡EnclosingBox⁡p,x,y,0,0,1,1,output=list
x=−0.7071067811,0.7071067811,y=−0.7071067812,0.7071067812,x=0.7071067812,Float⁡∞,y=0.7071067812,Float⁡∞
This example uses EnclosingBox in connection with WitnessPoints to cover all the connected open cells.
pts≔WitnessPoints⁡p≠0
pts≔x=−2,y=0,x=0,y=−2,x=0,y=0,x=0,y=2,x=2,y=0
EnclosingBox⁡p,pts,output=plot
This example uses EnclosingBox on the output from CellDecomposition.
with⁡Parametric:
dec≔CellDecomposition⁡x6+a⁢y2−a=0,a3⁢x6+a⁢y2−b=0,x,y:
EnclosingBox⁡dec,output=plot
See Also
CellDecomposition
Parametric
WitnessPoints
Download Help Document