Periodic points and stability
A point of period n satisfies . For a polynomial map that is a polynomial equation, so its solutions are algebraic numbers and can be had exactly.
logistic(4).fixedPoints(); // 0 and 3/4, with multipliers 4 and −2
logistic(4).periodicPoints(2); // (5 ± √5)/8
logistic("3.2").cycles(2); // one attracting 2-cycle, multiplier 4/25
map("sin(pi*x)").periodicPointsIn(1, [0, 1]); // certified, for a map that is not a polynomial
Least period
The roots of include the points of every period dividing n. periodicPoints(n) removes them: it divides out the common factors with for each proper divisor d, then asks @ratmath/algebraic for the real roots of what is left. Each comes back as an algebraic number: a fraction when it is rational, a closed form such as (5 − √5)/8 when it is quadratic, and otherwise its minimal polynomial with an interval that can be refined without limit.
The multiplier
By the chain rule the derivative of is the same at every point of a cycle,
and this number, the multiplier, decides what nearby orbits do. If its absolute value is below 1 the cycle attracts them, above 1 it repels them. The multiplier is returned as an enclosure, and the stability is stated only when the enclosure settles it.
The borderline cases are where things change, so they are decided exactly. The multiplier is a polynomial in the root; it equals 1, −1 or 0 exactly when that polynomial minus the constant is divisible by the root's minimal polynomial, which is a finite computation with no rounding. A multiplier of exactly 0 is reported as "superattracting", and of exactly ±1 as "neutral": for r = 3 the fixed point 2/3 of the logistic map has multiplier −1, the moment of the first period doubling.
"Neutral" is the verdict of the linear test only. For those points the next terms decide, and the result carries nonlinear with a nonlinearReason. With multiplier −1 the Schwarzian derivative of at the point decides: negative attracts, positive repels. At r = 3, writing , becomes and its second iterate , so 2/3 attracts, slowly, and nonlinear is "attracting". With multiplier +1, gives "semistable" (attracting from one side only, as 0 for r = 1), and when the sign of decides.
Cycles
cycles(n) groups the points into orbits by applying f to each and seeing which point it lands on (the intervals are refined until that is unambiguous). Each cycle carries its Lyapunov exponent , which for a cycle is exact up to the enclosure of the logarithm.
Maps that are not polynomials
For any formula, periodicPointsIn(n, [a, b]) finds the zeros of in an interval with analytic's certified zero finder: each returned interval is proven to contain exactly one. The multiplier is enclosed along the enclosed cycle.
| call | returns |
|---|---|
| f.fixedPoints(), f.periodicPoints(n) | [{ value, text, period, multiplier, stability, exactMultiplier }] |
| f.cycles(n) | [{ period, points, values, multiplier, stability, lyapunov }] |
| f.periodicPointsIn(n, [a, b], { digits }) | [{ value, period, leastPeriod, multiplier, stability }] |
| f.iterate(n) | the coefficients of , constant term first |
| f.criticalPoints([a, b]) | where f′ = 0 |
@ratmath/chaos and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.