RootFinding
EvaluateAtRoot
evaluate polynomials or relations on polynomials at a real root
Calling Sequence
Parameters
Returns
Options
Description
Examples
Compatibility
EvaluateAtRoot( polys, rootdesc, opts )
EvaluateAtRoot( lcons, rootdesc, opts )
EvaluateAtRoot( scons, rootdesc, opts )
polys
-
list( polynom ); list of polynomials to evaluate the signs of at a real root
lcons
list( relation( polynom ) ); list of relations to evaluate the truth of
scons
set( relation( polynom ) ); set of relations to evaluate the truth of
rootdesc
a sequence box, sys, vars, or vbox, sys, altogether describing one real root of a system of polynomials sys
box
list of intervals; isolating box for a real root of sys
sys
list( polynom ); system of polynomials
vars
list( name ); variables for the system sys, with ordering corresponding to the intervals of box
vbox
list containing elements with type name = interval; simultaneously describes the isolating box for a real root of the system sys and the accompanying variables
opts
sequence of (optional) equations of the form keyword=value, where keyword is one of threshold, digits, output, strategy, accuracy, earlyterminate, or avoidsymbolic
Returns outputs corresponding to the elements specified in the list passed as value for output:
signs : list(identical(-1,0,1,{-1,1},{-1,0,1}); Signs for the polynomials passed to evaluate, with ordering corresponding to the ordering of each polynomial in polys. A set of signs such as {-1,1} will be returned where a low threshold precision (t) or avoidance of symbolic computation (v) do not allow the result to be determined precisely.
intervals : list of intervals; intervals about the given polynomials under evaluation at the real root. The ordering of the returned list matches that of the input list.
refinement: list of intervals; any refinement of the isolating box for the real root achieved during evaluation.
truth : boolean or list(boolean); when the lcons calling sequence is used, then this will be a list of boolean values - the truth values corresponding to each element of lcons under evaluation. When the scons calling sequence is used, then this will be a single boolean value corresponding to the conjunction of evaluable truth values from the set. The value FAIL will be returned as the truth output when a low threshold precision (threshold) or avoidance of symbolic computation (avoidsymbolic) do not allow the truth value to be determined precisely.
threshold : (optional) posint; threshold working precision that should not be exceeded (default infinity).
digits : (optional) posint; starting working precision to use (default maximum precision of any interval in box or vbox)
output : (optional) nonemptylist( symbol ); non-empty list of symbols from among truth, signs, refinement, and intervals defining the outputs returned and their sequential ordering. truth is only applicable for calling sequences for evaluation of relations, and intervals is only applicable when evaluating polynomials. See the Returns section for more information on each output. (default [signs] for polynomials, [truth] for constraints)
strategy : (optional) The symbol oracle or geometric; defines strategy to increase precision when there is scope for increased working precision to use in evaluation. The geometric strategy increases working precisions by a multiplicative factor, while the oracle strategy is a more complicated algorithm increasing working precisions based on the degree of polynomials for the system, the current precision, and the target precision. This is applicable to the polys calling sequence only. (default oracle)
accuracy : (optional) posint; defines a request for accuracy to achieve This is applicable to the polys calling sequence only. (default −∞)
earlyterminate : (optional) truefalse; controls early termination behavior of the procedure when a meaningful truth value is achieved amongst the list of constraints. This is applicable to the lcons calling sequence only. (default true)
avoidsymbolic : (optional) truefalse; controls whether symbolic computation should be avoided for purposes of greater efficiency in deducing whether a polynomial expression is exactly zero at a root description (default false). As a consequence, if this option is true, it may not be possible to determine whether a polynomial to evaluate vanishes at the given root specified by box or not. In this case an answer such as FAIL for truth or {-1,0,1} for signs may be produced.
EvaluateAtRoot is a multipurpose procedure to evaluate collections of polynomials or relations on polynomials at a real root.
Throughout, any interval can be represented by either a list or range of two rational numbers, i.e. [ rational, rational ] or rational .. rational. In other words, EvaluateAtRoot accepts and returns intervals under both such representations. A list or range of rationals represents an open real interval with rational endpoints with respect to one variable in this way.
Given a collection of polynomial relations, by default EvaluateAtRoot terminates upon evaluating any relation in the collection as false. When a list of relations lcons is passed, this early termination criteria can be turned off by using the option earlyterminate = false, which forces evaluation of the full list of polynomials.
When the parameter lcons is passed and the output truth is requested, any polynomials such that a sign cannot or is not reliably deduced will yield a truth value of FAIL. One scenario for this is where polynomials are skipped due to early termination.
Because truth values can only be mapped to an original relation for a collection with a fixed ordering, early termination isn't available with usage of the parameter scons.
If a truth value cannot be reliably determined given the parameters, then the return value will be FAIL.
The polynomials (or constraints of such) to evaluate must have variables such that the variables are specified in the root description, i.e. there is an interval for each variable.
Hence it is allowable to evaluate at an empty root description if and only if the polynomials or constraints do not contain any variables.
lcons≔x2−3<0,0<x2−2,0<x+4
lcons≔x2<3,0<x2−2,0<x+4
polys≔map⁡r↦lhs⁡r−rhs⁡r,lcons
polys≔x2−3,−x2+2,−4−x
sys≔x2−2;vars≔x;box≔1..2
sys≔x2−2
vars≔x
box≔1..2
s,box≔RootFinding:-EvaluateAtRoot⁡polys,box,sys,vars,output=signs,refinement,accuracy=20
s,box≔−1,0,−1,80737321755619039583310506563039414941570085775708990770823839524233143877797980545530986496..40368660877809519791655253281519707470785042892854495385411919762116571938898990272765493248
t,box≔RootFinding:-EvaluateAtRoot⁡lcons,box,sys,vars,output=truth,refinement,digits=30
t,box≔true,false,FAIL,1136276788042180458070828951474823657989790988021617205464301803469022129495137770981046170581301261101496891396417650688..90902143043374436645666316117985892639183279041729376437144096427752177035961102167848369364650410088811975131171341205504
t,box≔RootFinding:-EvaluateAtRoot⁡lcons,box,sys,vars,output=truth,refinement,digits=30,earlyterminate=false
t,box≔true,false,true,1460741119610710954571473490162359884261672472836437833193991718879756708123654433272144476462063870354965569624347616758910328999512347634358623676688012047497318823171316894051322637426162590488067364778518581413120551325743612687890989973504..73037055980535547728573674508117994213083623641821891659699585943987835406182721663607223823103193517748278481217380837955164499756173817179311838344006023748659411585658447025661318713081295244033682389259290706560275662871806343945494986752
sys≔x2+y+z−1,y2+x+z−1,z2+x+y−1
vars≔x,y,z
lcons≔0≤−17⁢x4⁢y−75⁢x3⁢y⁢z+80⁢x2⁢z2−44⁢y3⁢z+71⁢y⁢z3−82⁢y3,−62⁢x2⁢z3+97⁢x⁢y3⁢z−73⁢y⁢z4−56⁢x⁢y⁢z2+87⁢x⁢y<0,−23⁢x⁢y3⁢z+87⁢x⁢z4+72⁢x2⁢z2+37⁢x⁢y⁢z2+74⁢x⁢y2+6⁢y2≠0
d≔50
iso≔RootFinding:-Isolate⁡sys,vars,output=interval,digits=d
iso≔x=−924942879758680150910286902258589248300024263817316831383123885216472214589586756787577295904684780545900544,−36997715190347206036411476090343569932000970552692673091532495540865888858358347027150309183618739122183602176,y=−1849885759517360301820573804517178496600048527634633661766247770432944429179173513575154591809369561091801088,−1849885759517360301820573804517178496600048527634633657766247770432944429179173513575154591809369561091801088,z=−462471439879340075455143451129294624150012131908658415191561942608236107294793378393788647952342390272950272,−36997715190347206036411476090343569932000970552692673151532495540865888858358347027150309183618739122183602176,x=0,0,y=0,0,z=1,1,x=0,0,y=1,1,z=0,0,x=158695109325735721731113388683434656490654702725515741383123885216472214589586756787577295904684780545900544,25391217492117715476978142189349545038504752436082518656129982163463555433433388108601236734474956488734408704,y=507824349842354309539562843786990900770095048721650371312259964326927110866866776217202473468949912977468817408,507824349842354309539562843786990900770095048721650372712259964326927110866866776217202473468949912977468817408,z=507824349842354309539562843786990900770095048721650371512259964326927110866866776217202473468949912977468817408,507824349842354309539562843786990900770095048721650372112259964326927110866866776217202473468949912977468817408,x=1,1,y=0,0,z=0,0
vbox≔iso1
vbox≔x=−924942879758680150910286902258589248300024263817316831383123885216472214589586756787577295904684780545900544,−36997715190347206036411476090343569932000970552692673091532495540865888858358347027150309183618739122183602176,y=−1849885759517360301820573804517178496600048527634633661766247770432944429179173513575154591809369561091801088,−1849885759517360301820573804517178496600048527634633657766247770432944429179173513575154591809369561091801088,z=−462471439879340075455143451129294624150012131908658415191561942608236107294793378393788647952342390272950272,−36997715190347206036411476090343569932000970552692673151532495540865888858358347027150309183618739122183602176
RootFinding:-EvaluateAtRoot⁡lcons,vbox,sys,digits=d
true,false,FAIL
RootFinding:-EvaluateAtRoot⁡lcons,vbox,sys,earlyterminate=false
true,false,true
polys≔17⁢x4⁢y+75⁢x3⁢y⁢z−80⁢x2⁢z2+44⁢y3⁢z−71⁢y⁢z3+82⁢y3,−62⁢x2⁢z3+97⁢x⁢y3⁢z−73⁢y⁢z4−56⁢x⁢y⁢z2+87⁢x⁢y,−23⁢x⁢y3⁢z+87⁢x⁢z4+72⁢x2⁢z2+37⁢x⁢y⁢z2+74⁢x⁢y2+6⁢y2
RootFinding:-EvaluateAtRoot⁡polys,vbox,sys,digits=d
−1,1,−1
constraints≔convert⁡lcons,set
constraints≔−23⁢x⁢y3⁢z+87⁢x⁢z4+72⁢x2⁢z2+37⁢x⁢y⁢z2+74⁢x⁢y2+6⁢y2≠0,0≤−17⁢x4⁢y−75⁢x3⁢y⁢z+80⁢x2⁢z2−44⁢y3⁢z+71⁢y⁢z3−82⁢y3,−62⁢x2⁢z3+97⁢x⁢y3⁢z−73⁢y⁢z4−56⁢x⁢y⁢z2+87⁢x⁢y<0
RootFinding:-EvaluateAtRoot⁡constraints,vbox,sys,digits=d
false
box≔map2⁡op,2,vbox
box≔−924942879758680150910286902258589248300024263817316831383123885216472214589586756787577295904684780545900544,−36997715190347206036411476090343569932000970552692673091532495540865888858358347027150309183618739122183602176,−1849885759517360301820573804517178496600048527634633661766247770432944429179173513575154591809369561091801088,−1849885759517360301820573804517178496600048527634633657766247770432944429179173513575154591809369561091801088,−462471439879340075455143451129294624150012131908658415191561942608236107294793378393788647952342390272950272,−36997715190347206036411476090343569932000970552692673151532495540865888858358347027150309183618739122183602176
r,s,box≔RootFinding:-EvaluateAtRoot⁡polys,box,sys,vars,digits=2⁢d,output=refinement,signs,intervals
r,s,box≔−108144442656389720287892686503299625750266470517602057918170992372939437925586808570723010022087166639374479489484355608421114884561136888556243290994469299069799978201927583742360321890761754986543214231552,−108144442656389720287892686503299625750266470517602057918170992372939437925586808570723010022087166639354479489484355608421114884561136888556243290994469299069799978201927583742360321890761754986543214231552,−8448784582530446897491616133070283261739568009187660774857108779135893587936469419587735157975559893734996011596528190789960035633881941845650710894291398982812329702559247987190014771576210832368861184,−108144442656389720287892686503299625750266470517602057918170992372939437925586808570723010022087166639354479489484355608421114884561136888556243290994469299069799978201927583742360321890761754986543214231552,−8448784582530446897491616133070283261739568009187660774857108779135893587936469419587735157975559893734996011596528190789960035633881941845650710894291398982812329702559247987190014771576210832368861184,−108144442656389720287892686503299625750266470517602057918170992372939437925586808570723010022087166639354479489484355608421114884561136888556243290994469299069799978201927583742360321890761754986543214231552,−1,1,−1,−21075868769458907307757921873653071143788485756990876726820200947247168087240839488064888462971434535117087896287367280659160173649356416916821636178853222159576332862577757806245124400183696695492608,−1053793438472945365387896093682653557189424287849543836341010047362358404362041974403244423148571726758543948143683640329580086824678208458410818089426611079788166431288878903122562200091848347746304,235291445032698489994565823497872896899660655237078550830533514600601091764715817106384624230802313469136703170298938245273281389194851335334573089430825777276610662900622062449960995201469573563940864,941165780130793959978263293991491587598642620948314203322134058402404367058863268425538496923209253919546812681195752981093125556779405341338292357723303109106442651602488249799843980805878294255763456,−17445221201261452837814346713278061547856053835870423290807012867266664340239993815056679196303360736368351585149469122636640694597425667667286544715412888638305331450311031224980497600734786781970432,−27912353922018324540502954741244898476569686137392677265291220587626662944383990104090686714085377177571093625362391505962186251113558810682676584715446606218212885303204976499599687961611756588511526912
In the following example, the unique root of sys contained in sysroot is actually an exact root of the non-strict inequality in cons.
vars≔x,y
sys≔−7⁢x5+22⁢x4−55⁢x3−94⁢x2+87⁢x−56,−10⁢y5+62⁢y4−82⁢y3+80⁢y2−44⁢y+71
sysroot≔−228940483906911495144115188075855872,−5723512097672786736028797018963968,33890209128933370368744177664,677804182578693140737488355328
cons≔434⁢x9−2043⁢x8+6055⁢x7−1085⁢x6−10004⁢x5+17167⁢x4−6842⁢x3+11542⁢x2−6997⁢x≤−4648,0<−50⁢y5+23⁢y4+75⁢y3−92⁢y2+6⁢y+74
consSet≔convert⁡cons,set
consSet≔434⁢x9−2043⁢x8+6055⁢x7−1085⁢x6−10004⁢x5+17167⁢x4−6842⁢x3+11542⁢x2−6997⁢x≤−4648,0<−50⁢y5+23⁢y4+75⁢y3−92⁢y2+6⁢y+74
By default, EvaluateAtRoot uses symbolic computation to prove that the first constraint is satisfied:
CodeTools:-Usage⁡RootFinding:-EvaluateAtRoot⁡cons,sysroot,sys,vars
memory used=1.28MiB, alloc change=0 bytes, cpu time=30.00ms, real time=30.00ms, gc time=0ns
true,false
CodeTools:-Usage⁡RootFinding:-EvaluateAtRoot⁡consSet,sysroot,sys,vars
memory used=446.05KiB, alloc change=0 bytes, cpu time=8.00ms, real time=8.00ms, gc time=0ns
When specifying the avoidsymbolic option and giving a maximum value of 100 for the floating point precision, the underlying numerical computation will not be able to prove that the first constraint is satisfied, and therefore FAIL is returned:
CodeTools:-Usage⁡RootFinding:-EvaluateAtRoot⁡cons,sysroot,sys,vars,avoidsymbolic=true,threshold=100
memory used=134.16KiB, alloc change=0 bytes, cpu time=3.00ms, real time=3.00ms, gc time=0ns
FAIL,false
Nevertheless, in the following calling sequence, where we are only interested in the truth value of the logical conjunction of the two constraints, this weaker result is still sufficient, since the 2nd constraint, and therefore the whole conjunction, is false:
CodeTools:-Usage⁡RootFinding:-EvaluateAtRoot⁡consSet,sysroot,sys,vars,avoidsymbolic=true,threshold=100
memory used=122.52KiB, alloc change=0 bytes, cpu time=4.00ms, real time=4.00ms, gc time=0ns
The RootFinding:-EvaluateAtRoot command was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
The RootFinding:-EvaluateAtRoot command was updated in Maple 2024.
The avoidsymbolic option was introduced in Maple 2024.
For more information on Maple 2024 changes, see Updates in Maple 2024.
See Also
Isolate
RefineRoot
Download Help Document