 WitnessPoints - Maple Help

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 $p\ne 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 $\mathrm{variable}=\mathrm{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:

${\mathrm{|| a - x ||}}_{1}<{10}^{-d}{\mathrm{|| 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

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

WitnessPoints computes sample solutions of an equation:

 > $\mathrm{WitnessPoints}\left(\left[{x}^{2}+y+3=0\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{-3}\right]\right]$ (1)
 > $\mathrm{WitnessPoints}\left(\left[{\left({x}^{2}+{\left(y-1\right)}^{2}\right)}^{2}=0\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{1}\right]\right]$ (2)

or a system of equations

 > $\mathrm{WitnessPoints}\left(\left[{x}^{2}+{y}^{2},z-{x}^{3}=0\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{0}\right]\right]$ (3)

or a set of inequalities:

 > $\mathrm{evalf}\left(\mathrm{WitnessPoints}\left(\left[0<{x}^{2}+y+3,3{y}^{3}-{x}^{5}<10\right]\right)\right)$
 $\left[\left[{x}{=}{-3.}{,}{y}{=}{-11.}\right]{,}\left[{x}{=}{0.}{,}{y}{=}{-2.}\right]\right]$ (4)

The following example computes points on the interior and the exterior of the unit circle, with $x$-coordinates in the interval $\left[-1,1\right]$.

 > $\mathrm{WitnessPoints}\left(\left[{x}^{2}+{y}^{2}-1\ne 0,{x}^{2}<1\right],\left[x,y\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{-2}\right]{,}\left[{x}{=}{-}\frac{{1423656585}}{{1525870529}}{,}{y}{=}{-}\frac{{1}}{{2}}\right]{,}\left[{x}{=}{0}{,}{y}{=}{-}\frac{{1}}{{2}}\right]{,}\left[{x}{=}\frac{{1423656585}}{{1525870529}}{,}{y}{=}{-}\frac{{1}}{{2}}\right]{,}\left[{x}{=}{-}\frac{{1423656585}}{{1525870529}}{,}{y}{=}\frac{{1}}{{2}}\right]{,}\left[{x}{=}{0}{,}{y}{=}\frac{{1}}{{2}}\right]{,}\left[{x}{=}\frac{{1423656585}}{{1525870529}}{,}{y}{=}\frac{{1}}{{2}}\right]{,}\left[{x}{=}{0}{,}{y}{=}{2}\right]\right]$ (5)

In the following example, we check that a system with the equation ${x}^{2}<-1$ has no real solutions.

 > $\mathrm{WitnessPoints}\left(\left[{x}^{2}+{y}^{2}-1\ne 0,{x}^{2}<-1\right],\left[x,y\right]\right)$
 $\left[\right]$ (6)

The following example illustrates the precision of the computed solutions.

 > $\mathrm{sols20}≔\mathrm{WitnessPoints}\left(\left[{\left(x-3\right)}^{2}+{y}^{4}-y=0\right],\mathrm{digits}=20\right):$
 > $\mathrm{sols30}≔\mathrm{WitnessPoints}\left(\left[{\left(x-3\right)}^{2}+{y}^{4}-y=0\right],\mathrm{digits}=30\right):$
 > $\mathrm{sols50}≔\mathrm{WitnessPoints}\left(\left[{\left(x-3\right)}^{2}+{y}^{4}-y=0\right],\mathrm{digits}=50\right):$
 > $\mathrm{A20}≔\mathrm{eval}\left(⟨x,y⟩,\mathrm{sols20}\left[1\right]\right)$
 ${\mathrm{A20}}{≔}\left[\begin{array}{c}\frac{{22366435058122870896193141}}{{9671406556917033397649408}}\\ \frac{{24370417406302138235346345}}{{38685626227668133590597632}}\end{array}\right]$ (7)
 > $\mathrm{A30}≔\mathrm{eval}\left(⟨x,y⟩,\mathrm{sols30}\left[1\right]\right)$
 ${\mathrm{A30}}{≔}\left[\begin{array}{c}\frac{{96063107102745589648779753320559563}}{{41538374868278621028243970633760768}}\\ \frac{{104670145749936828015683713499914833}}{{166153499473114484112975882535043072}}\end{array}\right]$ (8)
 > $X≔\mathrm{eval}\left(⟨x,y⟩,\mathrm{sols50}\left[1\right]\right)$
 ${X}{≔}\left[\begin{array}{c}\frac{{28352824826395170252212036438729579929395810572048135085}}{{12259964326927110866866776217202473468949912977468817408}}\\ \frac{{30893174252911395094184913620218023688036361519846797823}}{{49039857307708443467467104868809893875799651909875269632}}\end{array}\right]$ (9)
 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\frac{\mathrm{Norm}\left(\mathrm{A20}-X,1.\right)}{\mathrm{Norm}\left(\mathrm{A20},1.\right)}$
 ${3.639830510}{×}{{10}}^{{-26}}$ (10)
 > $\frac{\mathrm{Norm}\left(\mathrm{A30}-X,1.\right)}{\mathrm{Norm}\left(\mathrm{A30},1.\right)}$
 ${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.

 > $\mathrm{WitnessPoints}\left(\left[yz,xy-{z}^{2}\right],\left[x,y,z\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{0}\right]{,}\left[{x}{=}{18}{,}{y}{=}{0}{,}{z}{=}{0}\right]\right]$ (12)
 > $\mathrm{WitnessPoints}\left(\left[yz,xy-{z}^{2}\right],\left[x,y,z\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{0}\right]{,}\left[{x}{=}{75}{,}{y}{=}{0}{,}{z}{=}{0}\right]\right]$ (13)
 > $\mathrm{seed}≔123456789$
 ${\mathrm{seed}}{≔}{123456789}$ (14)
 > $\mathrm{randomize}\left(\mathrm{seed}\right):$
 > $\mathrm{WitnessPoints}\left(\left[yz,xy-{z}^{2}\right],\left[x,y,z\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{0}\right]{,}\left[{x}{=}{79}{,}{y}{=}{0}{,}{z}{=}{0}\right]\right]$ (15)
 > $\mathrm{randomize}\left(\mathrm{seed}\right):$
 > $\mathrm{WitnessPoints}\left(\left[yz,xy-{z}^{2}\right],\left[x,y,z\right]\right)$
 $\left[\left[{x}{=}{0}{,}{y}{=}{0}{,}{z}{=}{0}\right]{,}\left[{x}{=}{79}{,}{y}{=}{0}{,}{z}{=}{0}\right]\right]$ (16)

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

 > $\mathrm{WitnessPoints}\left(\left[x<0,x=3\right]\right)$