Topic

Periodic points and stability

A point of period n satisfies fn(x)=xf^n(x) = x. 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 fn(x)−xf^n(x) - x include the points of every period dividing n. periodicPoints(n) removes them: it divides out the common factors with fd(x)−xf^d(x) - x 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 fnf^n is the same at every point of a cycle,

(fn)′(x0)=f′(x0) f′(x1)⋯f′(xn−1), (f^n)'(x_0) = f'(x_0)\,f'(x_1)\cdots f'(x_{n-1}),

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 Sg=g′′′/g′−32(g′′/g′)2Sg = g^{\prime\prime\prime}/g' - \tfrac32 (g''/g')^2 of g=fng = f^n at the point decides: negative attracts, positive repels. At r = 3, writing x=23+ux = \tfrac23 + u, ff becomes u↦−u−3u2u \mapsto -u - 3u^2 and its second iterate u−18u3−27u4u - 18u^3 - 27u^4, so 2/3 attracts, slowly, and nonlinear is "attracting". With multiplier +1, g′′≠0g'' \ne 0 gives "semistable" (attracting from one side only, as 0 for r = 1), and when g′′=0g'' = 0 the sign of g′′′g^{\prime\prime\prime} 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 1nlog⁡∣multiplier∣\tfrac1n\log|\text{multiplier}|, 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 fn(x)−xf^n(x) - x 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.

callreturns
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 fnf^n, constant term first
f.criticalPoints([a, b])where f′ = 0
Try itEdit the code and run it with @ratmath/chaos and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs