sample real connected components of a polynomial system - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Factorization and Solving Equations : Roots : RootFinding : RootFinding/WitnessPoints

RootFinding[WitnessPoints] - sample real connected components of a polynomial system

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&plus;y&plus;3&equals;0

x&equals;0&comma;y&equals;3

(1)

WitnessPointsx2&plus;y122&equals;0

x&equals;0&comma;y&equals;1

(2)

or a system of equations

WitnessPointsx2&plus;y2&comma;zx3&equals;0

x&equals;0&comma;y&equals;0&comma;z&equals;0

(3)

or a set of inequalities:

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

x&equals;3.&comma;y&equals;11.&comma;x&equals;0.&comma;y&equals;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&plus;y210&comma;x2<1&comma;x&comma;y

x&equals;0&comma;y&equals;2&comma;x&equals;14236565851525870529&comma;y&equals;12&comma;x&equals;0&comma;y&equals;12&comma;x&equals;14236565851525870529&comma;y&equals;12&comma;x&equals;14236565851525870529&comma;y&equals;12&comma;x&equals;0&comma;y&equals;12&comma;x&equals;14236565851525870529&comma;y&equals;12&comma;x&equals;0&comma;y&equals;2

(5)

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

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

(6)

The following example illustrates the precision of the computed solutions.

sols20:=WitnessPointsx32&plus;y4y&equals;0&comma;digits&equals;20&colon;

sols30:=WitnessPointsx32&plus;y4y&equals;0&comma;digits&equals;30&colon;

sols50:=WitnessPointsx32&plus;y4y&equals;0&comma;digits&equals;50&colon;

A20:=evalx&comma;y&comma;sols201

A20:=2236643505812287089619314196714065569170333976494082437041740630213823534634538685626227668133590597632

(7)

A30:=evalx&comma;y&comma;sols301

A30:=9606310710274558964877975332055956341538374868278621028243970633760768104670145749936828015683713499914833166153499473114484112975882535043072

(8)

X:=evalx&comma;y&comma;sols501

X:=28352824826395170252212036438729579929395810572048135085122599643269271108668667762172024734689499129774688174083089317425291139509418491362021802368803636151984679782349039857307708443467467104868809893875799651909875269632

(9)

withLinearAlgebra&colon;

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

3.63983051010-26

(10)

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

5.42312694410-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&equals;0&comma;y&equals;0&comma;z&equals;0&comma;x&equals;25&comma;y&equals;0&comma;z&equals;0

(12)

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

x&equals;0&comma;y&equals;0&comma;z&equals;0&comma;x&equals;98&comma;y&equals;0&comma;z&equals;0

(13)

seed:=123456789

seed:=123456789

(14)

randomizeseed&colon;

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

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

(15)

randomizeseed&colon;

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

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

(16)

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

WitnessPointsx<0&comma;x&equals;3

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

See Also

HasRealRoots, Parametric, randomize, RootFinding


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam