WitnessPoints - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


RootFinding

  

WitnessPoints

  

sample real connected components of a polynomial system

 

Calling Sequence

Parameters

Description

Notes

Examples

Calling Sequence

WitnessPoints(sys)

WitnessPoints(sys, vars)

WitnessPoints(sys, vars, digits=d)

Parameters

sys

-

list of equations or list of inequations and strict inequalities

vars

-

(optional) list of names; the indeterminates

d

-

(optional) positive integer; number of significant digits

Description

• 

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 pq 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<10d|| 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.

Notes

• 

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).

Examples

withRootFinding&colon;

WitnessPoints computes sample solutions of an equation:

WitnessPointsx2+y+3=0

x=0&comma;y=−3

(1)

WitnessPointsx2+y122=0

x=0&comma;y=1

(2)

or a system of equations

WitnessPointsx2+y2&comma;zx3=0

x=0&comma;y=0&comma;z=0

(3)

or a set of inequalities:

evalfWitnessPoints0<x2+y+3&comma;3y3x5<10

x=−3.&comma;y=−11.&comma;x=0.&comma;y=−2.

(4)

The following example computes points on the interior and the exterior of the unit circle, with x-coordinates in the interval −1&comma;1.

WitnessPointsx2+y210&comma;x2<1&comma;x&comma;y

x=0&comma;y=−2&comma;x=14236565851525870529&comma;y=12&comma;x=0&comma;y=12&comma;x=14236565851525870529&comma;y=12&comma;x=14236565851525870529&comma;y=12&comma;x=0&comma;y=12&comma;x=14236565851525870529&comma;y=12&comma;x=0&comma;y=2

(5)

In the following example, we check that a system with the equation x2<−1 has no real solutions.

WitnessPointsx2+y210&comma;x2<1&comma;x&comma;y

(6)

The following example illustrates the precision of the computed solutions.

sols20WitnessPointsx32+y4y=0&comma;digits=20&colon;

sols30WitnessPointsx32+y4y=0&comma;digits=30&colon;

sols50WitnessPointsx32+y4y=0&comma;digits=50&colon;

A20evalx&comma;y&comma;sols201

A202236643505812287089619314196714065569170333976494082437041740630213823534634538685626227668133590597632

(7)

A30evalx&comma;y&comma;sols301

A309606310710274558964877975332055956341538374868278621028243970633760768104670145749936828015683713499914833166153499473114484112975882535043072

(8)

Xevalx&comma;y&comma;sols501

X28352824826395170252212036438729579929395810572048135085122599643269271108668667762172024734689499129774688174083089317425291139509418491362021802368803636151984679782349039857307708443467467104868809893875799651909875269632

(9)

withLinearAlgebra&colon;

NormA20X&comma;1.NormA20&comma;1.

3.639830510×10−26

(10)

NormA30X&comma;1.NormA30&comma;1.

5.423126944×10−36

(11)

In the next example we give a seed to the rand function in order to transform the command WitnessPoints in a deterministic function.

WitnessPointsyz&comma;xyz2&comma;x&comma;y&comma;z

x=0&comma;y=0&comma;z=0&comma;x=18&comma;y=0&comma;z=0

(12)

WitnessPointsyz&comma;xyz2&comma;x&comma;y&comma;z

x=0&comma;y=0&comma;z=0&comma;x=75&comma;y=0&comma;z=0

(13)

seed123456789

seed123456789

(14)

randomizeseed&colon;

WitnessPointsyz&comma;xyz2&comma;x&comma;y&comma;z

x=0&comma;y=0&comma;z=0&comma;x=79&comma;y=0&comma;z=0

(15)

randomizeseed&colon;

WitnessPointsyz&comma;xyz2&comma;x&comma;y&comma;z

x=0&comma;y=0&comma;z=0&comma;x=79&comma;y=0&comma;z=0

(16)

The command doesn't handle mixed equations and inequalities/inequations.

WitnessPointsx<0&comma;x=3

Error, (in RootFinding:-WitnessPoints) WitnessPoints does not handle mixed equations and inequalities/inequations

See Also

HasRealRoots

Parametric

randomize

RootFinding