Course Test · University: upper level
Dynamical systems and chaos: RatMath answers
The same twenty exercises, answered with RatMath Core and the Shelf libraries only. The code below was run when this page was built; its output is shown as printed, and compared with the independent answer.
Agrees 20
Libraries used here: core, chaos. In this code each library is in scope under its own name (linalg.det, stats.tTest), and Core's names (R, Rational, …) are in scope directly.
- 1.Fixed points and stabilityAgreesFind the fixed points of the logistic map and classify them.Independent answer: or . : (repelling), : the linear test is inconclusive there (the boundary where the period doubling starts). Writing , is and is , so attracts, slowly (equivalently, the Schwarzian derivative is negative).RatMath code
chaos.logistic(3).fixedPoints().map((p) => [p.text, p.stability, p.nonlinear ?? null])Output[["0", "repelling", null], ["2/3", "neutral", "attracting"]]
has multiplier exactly , so the linear test says"neutral"; the higher-order terms (the Schwarzian derivative) then decide that it attracts.Fix: ratmath/chaos#10, neutral fixed points classified beyond the linear test (nonlinear, by the Schwarzian derivative) - 2.MultipliersAgreesFor , find the non-zero fixed point and its multiplier.Independent answer; : attracting, with orbits spiralling in (alternating sides).RatMath code
chaos.logistic("5/2").derivativeAt("3/5")Output-1/2
- 3.Period-2 orbitsAgreesFind the 2-cycle of and its stability.Independent answerDivide by : , . The multiplier is : repelling.RatMath code
chaos.logistic(4).periodicPoints(2).map((p) => [p.text, p.stability])Output[["(5 − √5)/8", "repelling"], ["(5 + √5)/8", "repelling"]]
- 4.Period doublingAgreesAt which do the first two period doublings of the logistic map occur?Independent answerThe fixed point loses stability when : . The 2-cycle has multiplier , which is at .RatMath code
chaos.periodDoubling(chaos.logistic(), { parameter: "r", levels: 2, start: [2.9, 0.6] }).parametersOutput[2.99999999999999999997:3.00000000000000000003, 3.449489742783178[09639:10001]]
- 5.Superstable cyclesAgreesFind the at which the logistic map has a superstable 2-cycle (the critical point has period 2).Independent answerwith : , i.e. : .RatMath code
chaos.superstable(chaos.logistic(), { parameter: "r", period: 2, range: [3, "7/2"] })[0]Output32951280099/10182505537:40730022148/12586269025
- 6.Lyapunov exponentAgreesWhat is the Lyapunov exponent of the logistic map at ?Independent answeris conjugate to the tent map with slope by , so for almost every orbit.RatMath code
const e = chaos.lyapunovExponent(chaos.logistic(4), { digits: 4 }); [e.value, e.invariance.proven]Output[0.693[09123838845071073:16811440211244592], true]
lyapunovExponentencloses against the invariant measure , which is the limit itself and not a finite average. The measure is invariant by the conjugacy with the tent map; ergodicity is taken from the theory.lyapunovstill gives the certified average along one orbit.Fix: ratmath/chaos#8, the escape test compares sizes, so long bounded orbits are not refusedFix: ratmath/chaos#9,lyapunovExponent: the exponent as a certified integral against the invariant density - 7.Tent map orbitsAgreesFind the orbit of under the tent map .Independent answer: eventually periodic with period 2.RatMath code
chaos.tent(2).orbit("1/5", 4)Output[1/5, 2/5, 4/5, 2/5, 4/5]
- 8.The doubling mapAgreesFind the orbit of under .Independent answer: the orbit repeats, period 3 with no preperiod.RatMath code
const d = chaos.doubling("1/7"); [d.orbit, d.preperiod, d.period]Output[[1/7, 2/7, 4/7], 0, 3]
- 9.Sharkovskii's theoremAgreesFor a continuous map of the line, does a 3-cycle force a 5-cycle? Does a 5-cycle force a 3-cycle?Independent answerSharkovskii's order starts : period 3 forces every period, but period 5 does not force period 3.RatMath code
[chaos.sharkovskii.forces(3, 5), chaos.sharkovskii.forces(5, 3)]Output[true, false]
- 10.The Hénon mapAgreesFind the fixed points of the Hénon map .Independent answerand : and . Both are saddles.RatMath code
chaos.henon().fixedPoints({ x: [-2, 2], y: [-2, 2] }).map((p) => [p.point[0], p.stability])Output[[-1.13135447708950[653834:298562], "saddle"], [0.63135447708950[398482:553914], "saddle"]]
- 11.Lorenz equilibriaAgreesFind the equilibria of the Lorenz system with , , , and classify them.Independent answerThe origin, and . At the origin the eigenvalues are and : a saddle. The other two are saddle-foci (one real negative eigenvalue and a complex pair with positive real part).RatMath code
const E = chaos.lorenz().equilibria({ x: [-30, 30], y: [-30, 30], z: [-10, 60] }); [E.complete, E.map((e) => e.kind), E.map((e) => e.point[2])]Output[true, ["saddle-focus", "saddle", "saddle-focus"], [26.99999999999998578914:27.00000000000001421086, -0.00000000000000000001:0.00000000000000000001, 26.99999999999998578914:27.00000000000001421086]]
- 12.The damped pendulumAgreesFor , classify the equilibria with .Independent answer: Jacobian , eigenvalues : a spiral sink. : , real eigenvalues of opposite sign: saddles.RatMath code
chaos.pendulum("1/2").equilibria({ x: [-4, 4], y: [-1, 1] }).map((e) => [e.point[0], e.kind])Output[[-3.14159265358979[666872:045146], "saddle"], [-0.00000000000000000001:0.00000000000000000001, "spiral sink"], [3.14159265358979[045146:666872], "saddle"]]
- 13.Arnold's cat mapAgreesFor the cat map on the torus, how many fixed points and how many points of period dividing 2 are there? What is its entropy?Independent answerThe number of points with is : and . The entropy is .RatMath code
const T = chaos.catMap(); [T.fixedPointCount(1), T.fixedPointCount(2), T.entropy().text]Output[1n, 5n, "log((3 + √5)/2)"]
- 14.Cantor setAgreesFind the box-counting dimension of the middle-thirds Cantor set.Independent answerTwo copies at scale : , .RatMath code
const d = chaos.cantor().dimension(); [d.formula, d.interval[0]]Output["log(2)/log(3)", 5682910006162749/9007199254740992]
- 15.Sierpinski triangleAgreesFind the similarity dimension of the Sierpinski triangle.Independent answerThree copies at scale : .RatMath code
const d = chaos.attractors.sierpinski().similarityDimension(); [d.formula, d.interval[0]]Output["log(3)/log(2)", 57104292221152067/36028797018963968]
- 16.Moran's equationAgreesA self-similar set has two pieces, scaled by and . Find its dimension.Independent answer. With : , , so .RatMath code
chaos.moran(["1/2", "1/4"]).interval[0]Output381663528263/549755813888
- 17.The Mandelbrot setAgreesAre and in the Mandelbrot set?Independent answer: , a bounded 2-cycle: inside. : escapes: outside ().RatMath code
[chaos.mandelbrotPoint("-1").verdict, chaos.mandelbrotPoint("1").verdict, chaos.mandelbrotPoint("1").escape]Output["inside", "outside", 3]
- 18.Game of LifeAgreesClassify the blinker and the glider in Conway's Game of Life.Independent answerThe blinker is an oscillator of period 2. The glider is a spaceship of period 4 that moves one cell diagonally each period (speed ).RatMath code
const L = (p) => chaos.life(chaos.patterns[p]).classify(); [L("blinker").kind, L("blinker").period, L("glider").kind, L("glider").period, L("glider").speed]Output["oscillator", 2, "spaceship", 4, "c/4"]
- 19.Sensitive dependenceAgreesFor the tent map , the points and start close. After how many steps are they more than apart?Independent answerWhile both stay on one side of each fold the distance doubles: needs , . The growth rate is per step.RatMath code
const s = chaos.sensitivity(chaos.tent(2), "1/3", "1/1000000"); [s.reaches, s.factor]Output[17, 2]
chaos.mapknows nomodorfloor, so the doubling map itself cannot be written as a formula;chaos.doublinghandles exact orbits only. - 20.ItinerariesAgreesUnder , write the first 6 symbols of the itinerary of (L if , R if ).Independent answer: L, R, R, L, R, R. Itinerary LRRLRR.RatMath code
chaos.itinerary(chaos.logistic(4), "1/5", 6)OutputLRRLRR