AngouriMath

Navigation

← Back to list of members

RealSignChanges​(AngouriMath.​Core.​FastExpression,​AngouriMath.​MathS.​Settings.​NewtonSetting)

 Method (no overloads)

Summary

Extra starting points, read off the sign changes of the expression along the
real axis.

Remarks

The grid is two-dimensional, so its resolution along the real axis is only the
square root of what it costs: the default 10 x 10 lays real starting points 2
apart, and two roots closer together than that share one, so which of them gets
reached is left to where the iteration happens to go. A polynomial usually
survives that, its basins being interleaved across the whole plane -- the roots
of x*(x - 1/2)*(x + 1/2) all come back. An expression that is only real
on a small interval does not: outside [-1, 1] every starting point hands
arcsin a complex value and the iteration wanders off. That is
https://github.com/asc-community/AngouriMath/issues/115 -- arcsin(x) - x*pi/3 has roots at -1/2, 0 and 1/2, and only 0 came back. It is not a matter of
iterating harder: all three were already inside the region being searched.
A sign change is a far cheaper witness of a root than a Newton run is -- one
evaluation against the sixty an iteration to precision 30 costs. So the scan can
afford as many points as the whole grid has, StepCount multiplied out, which lays them 0.2 apart by default rather than 2, and it costs
a couple of percent of what the grid already spends. Newton then runs only from
the brackets, of which a well-behaved expression has a handful.
This is additive, not a replacement. A sign change witnesses a root of odd
multiplicity on an interval where the expression is real; it says nothing about
a repeated root like x^2, nor about any root off the real axis. Those stay
the grid's to find, and the grid is left as it was.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1953 pages online