EnclosingBox - Maple Help

RootFinding

 EnclosingBox
 enclose a point in a box avoiding real polynomial constraints

 Calling Sequence 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)

Parameters

 constraints - polynomial or list of polynomials; the constraints point - list or set of coordinates of the form $\mathrm{name}=\mathrm{numeric}$ pointlist - list of list (or set) of coordinates of the form $\mathrm{name}=\mathrm{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

Description

 • 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 ${p}_{1},\mathrm{...},{p}_{k}$) 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 ${p}_{1},\mathrm{...},{p}_{k}$) in its interior.
 • In the EnclosingBox(constraints, variables, values) calling sequence, variables is a list of variable names $\left[{v}_{1},\mathrm{...},{v}_{n}\right]$ and values is a list of numerical values $\left[{r}_{1},\mathrm{...},{r}_{n}\right]$.  These are used to specify a point, described by the coordinates ${v}_{1}={r}_{1},\mathrm{...},{v}_{n}={r}_{n}$.
 • 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 $\mathrm{name}=\left[\mathrm{rational},\mathrm{rational}\right]$ where $\mathrm{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.

Examples

 > $\mathrm{with}\left(\mathrm{RootFinding}\right):$

The following example shows the box enclosing the origin inside a circle:

 > $p≔{x}^{2}+{y}^{2}-1$
 ${p}{≔}{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}$ (1)
 > $\mathrm{inbox}≔\mathrm{EnclosingBox}\left(p,\left[x=0,y=0\right]\right):$
 > $\mathrm{evalf}\left(\mathrm{inbox}\right)$
 $\left[\left[{x}{=}\left[{-0.7071067811}{,}{0.7071067811}\right]{,}{y}{=}\left[{-0.7071067812}{,}{0.7071067812}\right]\right]\right]$ (2)

A second box, outside the circle:

 > $\mathrm{outbox}≔\mathrm{EnclosingBox}\left(p,\left[x=1,y=1\right]\right):$
 > $\mathrm{evalf}\left(\mathrm{outbox}\right)$
 $\left[\left[{x}{=}\left[{0.7071067812}{,}{Float}{}\left({\mathrm{\infty }}\right)\right]{,}{y}{=}\left[{0.7071067812}{,}{Float}{}\left({\mathrm{\infty }}\right)\right]\right]\right]$ (3)

Compute and display both boxes together with the circle.

 > $\mathrm{EnclosingBox}\left(p,\left[\left[x=0,y=0\right],\left[x=1,y=1\right]\right],\mathrm{output}='\mathrm{plot}'\right)$

Alternatively, use the following calling sequence, specifying variables and values individually:

 > $\mathrm{evalf}\left(\mathrm{EnclosingBox}\left(p,\left[x,y\right],\left[\left[0,0\right],\left[1,1\right]\right],\mathrm{output}='\mathrm{list}'\right)\right)$
 $\left[\left[{x}{=}\left[{-0.7071067811}{,}{0.7071067811}\right]{,}{y}{=}\left[{-0.7071067812}{,}{0.7071067812}\right]\right]{,}\left[{x}{=}\left[{0.7071067812}{,}{Float}{}\left({\mathrm{\infty }}\right)\right]{,}{y}{=}\left[{0.7071067812}{,}{Float}{}\left({\mathrm{\infty }}\right)\right]\right]\right]$ (4)

This example uses EnclosingBox in connection with WitnessPoints to cover all the connected open cells.

 > $\mathrm{pts}≔\mathrm{WitnessPoints}\left(p\ne 0\right)$
 ${\mathrm{pts}}{≔}\left[\left[{x}{=}{-2}{,}{y}{=}{0}\right]{,}\left[{x}{=}{0}{,}{y}{=}{-2}\right]{,}\left[{x}{=}{0}{,}{y}{=}{0}\right]{,}\left[{x}{=}{0}{,}{y}{=}{2}\right]{,}\left[{x}{=}{2}{,}{y}{=}{0}\right]\right]$ (5)
 > $\mathrm{EnclosingBox}\left(p,\mathrm{pts},\mathrm{output}='\mathrm{plot}'\right)$

This example uses EnclosingBox on the output from CellDecomposition.

 > $\mathrm{with}\left(\mathrm{Parametric}\right):$
 > $\mathrm{dec}≔\mathrm{CellDecomposition}\left(\left[{x}^{6}+a{y}^{2}-a=0,{a}^{3}{x}^{6}+a{y}^{2}-b=0\right],\left[x,y\right]\right):$
 > $\mathrm{EnclosingBox}\left(\mathrm{dec},\mathrm{output}='\mathrm{plot}'\right)$