33 of 40 focal problems use RatMath for a calculation or a substantive step.
Direct calculation
26 · 65%
Assisted
7 · 17.5%
Worked by hand
7 · 17.5%
Using the packages
Exact orbits are excellent for short experiments. Denominators can grow rapidly, and a finite trajectory does not decide asymptotic behavior. A multiplier of magnitude one calls for nonlinear analysis.
Calculator interface
Offer exact, enclosed and floating orbits side by side with a bit budget and initial uncertainty. Attach a parameter and orbit dependence label to every Lyapunov estimate.
Each of the 40 focal problems has equal weight. Direct means the displayed package calculation answers the computational question after the inputs are set up. Assisted means it contributes a step and the worked solution supplies essential reasoning, interpretation or selection. Worked by hand means the guide relies on a construction, argument or judgment for that task. The helpful share combines direct and assisted days. Courses and instructors assign different mixes of problems. The percentages describe this syllabus.
Classroom inputs and practical limits
33 of 40 days include a checked executable example. On 7 days the measured size sweep exercises a named API used in the lesson. Each day identifies its tested inputs and the mathematical property checked. Hand-worked days give the input scale and the argument to verify.
Ranges across the five units
Days 1–8 · Maps and stability. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
Unit benchmark · chaos.logistic.orbit, exact iterations. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms).
Days 9–16 · Families and bifurcations. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
Unit benchmark · chaos.logistic.orbit, exact iterations. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms).
Days 17–24 · Flows. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
Unit benchmark · analytic.odeMethod, Euler steps. Largest passing sample 1,000 (292 ms, 90.4 MiB peak process RSS). The first sampled passing call above 100 ms used 300 (117 ms). The runs did not locate a ceiling for this family.
Days 25–32 · Chaos and coding. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
Unit benchmark · chaos.logistic.orbit, exact iterations. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms).
Days 33–40 · Fractals and discrete dynamics. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
Unit benchmark · chaos.cantor.stage, construction depth. Largest passing sample 18 (2,501 ms, 378.4 MiB peak process RSS). The first sampled passing call above one second used 18 (2,501 ms). The runs did not locate a ceiling for this family.
Accuracy notes (1)
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Find the fixed points of the logistic map and classify them.
Worked solution
The fixed points are 0 and . The first repels since its multiplier is 3. At the multiplier is −1, so the linear test is inconclusive. In the displaced coordinate , the second iterate is . For sufficiently small nonzero y this preserves the sign and strictly decreases the magnitude, giving local attraction.
Using RatMath
Read “neutral” as a multiplier classification. Use the second iterate to determine nonlinear stability.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(
chaos.logistic(3).fixedPoints().map((p) => [p.text, p.stability, p.nonlinear ?? null])
);
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 1.42 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.logistic · 20 passing test cases, 8 distinct argument descriptions
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 02 / 40 · Maps and stability
Multipliers
Direct calculation@ratmath/chaos
Problem
For , find the non-zero fixed point and its multiplier.
Worked solution
; : attracting, with orbits spiralling in (alternating sides).
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(String(chaos.logistic("5/2").derivativeAt("3/5")));
Checked output
-1/2
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 0.348 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.logistic · 20 passing test cases, 8 distinct argument descriptions
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 03 / 40 · Maps and stability
Period-2 orbits
Direct calculation@ratmath/chaos
Problem
Find the 2-cycle of and its stability.
Worked solution
Divide by : , . The multiplier is : repelling.
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(chaos.logistic(4).periodicPoints(2).map((p) => [p.text, p.stability]));
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 1.28 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.logistic · 20 passing test cases, 8 distinct argument descriptions
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 04 / 40 · Maps and stability
Tent map orbits
Direct calculation@ratmath/chaos
Problem
Find the orbit of under the tent map .
Worked solution
: eventually periodic with period 2.
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(chaos.tent(2).orbit("1/5", 4));
Checked output
[1/5, 2/5, 4/5, 2/5, 4/5]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 0.421 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.tent · 4 passing test cases, 1 distinct argument description
Implementation limit. Exact iterations default to a 200,000-bit budget. The first over-budget step depends on the map and seed. Source at the tested revision
Accuracy notes (1)
Runtime limit · BigInt capacity depends on the runtime. Bun 1.4.2 and Node both accepted 2^1048575 and 2^1048576. The latter shift failed on Bun 1.4.0. Core now declares Bun ≥1.4.2. Passing these two shifts only establishes a lower bound on capacity.
Day 05 / 40 · Maps and stability
The doubling map
Direct calculation@ratmath/chaos
Problem
Find the orbit of under .
Worked solution
: the orbit repeats, period 3 with no preperiod.
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
const d = chaos.doubling("1/7");
console.log([d.orbit, d.preperiod, d.period]);
Checked output
[[1/7, 2/7, 4/7], 0, 3]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 0.235 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.doubling · 1 passing test case, 3 distinct argument descriptions
Under , write the first 6 symbols of the itinerary of (L if , R if ).
Worked solution
: L, R, R, L, R, R. Itinerary LRRLRR.
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(chaos.itinerary(chaos.logistic(4), "1/5", 6));
Checked output
LRRLRR
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 0.371 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.itinerary · 1 passing test case, 3 distinct argument descriptions
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 07 / 40 · Maps and stability
Fixed versus periodic
Worked by hand
Problem
A map sends a→b→a with a≠b. Is a a fixed point of the map or its square?
Worked solution
It has least period two, so the second iterate fixes a while the first does not.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 08 / 40 · Maps and stability
Iteration in exact fractions
Direct calculation@ratmath/chaos
Problem
For f(x)=2x(1−x), find f(1/4).
Worked solution
The first iterate is 3/8.
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(String(chaos.logistic(2).orbit("1/4",1).at(-1)));
Checked output
3/8
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One- or two-dimensional maps, a parameter such as 0≤r≤4, and roughly 1–10 exact iterates before inspecting growth.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 0.160 ms on Node.
Same API, measured input family.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.logistic · 20 passing test cases, 8 distinct argument descriptions
Implementation limit. Exact iterations default to a 200,000-bit budget. The first over-budget step depends on the map and seed. Source at the tested revision
Accuracy notes (1)
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 09 / 40 · Families and bifurcations
Period doubling
Direct calculation@ratmath/chaos
Problem
At which do the first two period doublings of the logistic map occur?
Worked solution
The fixed point loses stability when : . The 2-cycle has multiplier , which is at .
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(
chaos.periodDoubling(chaos.logistic(), { parameter: "r", levels: 2, start: [2.9, 0.6] }).parameters
);
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 29.10 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.periodDoubling · 1 passing test case, 1 distinct argument description
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 10 / 40 · Families and bifurcations
Superstable cycles
Direct calculation@ratmath/chaos · @ratmath/core
Problem
Find the at which the logistic map has a superstable 2-cycle (the critical point has period 2).
Worked solution
with : , i.e. : .
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
import { range } from "@ratmath/core";
console.log(
String(chaos.superstable(chaos.logistic(), { parameter: "r", period: 2, range: [3, "7/2"] })[0])
);
Checked output
32951280099/10182505537:40730022148/12586269025
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 1.92 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Same API, measured input family.core.range · terms. Baseline test points across courses 1, 10, 100, 1,000. Check length and every consecutive integer from 1 through n.
Practical limit. Largest passing sample 1,000,000 (141 ms, 277.5 MiB peak process RSS). The first sampled passing call above 100 ms used 1,000,000 (141 ms). The runs did not locate a ceiling for this family. Keeping the entire result requires storage proportional to its length. Shortening the displayed list after construction still pays that cost.
Measured times, memory and outcomes
terms · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.173
75.5
10
Baseline
Passed
0.192
74.9
100
Baseline
Passed
0.269
74.7
1,000
Baseline
Passed
1.52
75.6
10,000
Stretch
Passed
5.29
80.9
100,000
Stretch
Passed
11.57
109.6
1,000,000
Stretch
Passed
141
277.5
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.superstable · 1 passing test case, 1 distinct argument description
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 11 / 40 · Families and bifurcations
Sharkovskii's theorem
Direct calculation@ratmath/chaos
Problem
For a continuous map of the line, does a 3-cycle force a 5-cycle? Does a 5-cycle force a 3-cycle?
Worked solution
Sharkovskii's order starts : period 3 forces every period, but period 5 does not force period 3.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log([chaos.sharkovskii.forces(3, 5), chaos.sharkovskii.forces(5, 3)]);
Checked output
[true, false]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
Focal example. The code above passed its displayed check in 0.179 ms on Node.
Same API, measured input family.chaos.sharkovskii.forces · period exponent k. Baseline test points across courses 1, 2, 3, 5. A period 2^k forces a period 2^(k−1) and the reverse implication fails.
Practical limit. Largest passing sample 30 (0.094 ms, 76.1 MiB peak process RSS). The runs did not locate a ceiling for this family. The period-forcing order concerns continuous interval maps. A period forced by a theorem need not be found by a short numerical orbit.
Measured times, memory and outcomes
period exponent k · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.113
75.8
2
Baseline
Passed
0.089
75.2
3
Baseline
Passed
0.147
74.2
5
Baseline
Passed
0.099
74.3
10
Stretch
Passed
0.167
75.2
20
Stretch
Passed
0.111
75.3
30
Stretch
Passed
0.094
76.1
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.sharkovskii.forces · 1 passing test case, 2 distinct argument descriptions
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(
chaos.henon().fixedPoints({ x: [-2, 2], y: [-2, 2] }).map((p) => [p.point[0], p.stability])
);
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 3.10 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.henon · 1 passing test case, 1 distinct argument description
For the cat map on the torus, how many fixed points and how many points of period dividing 2 are there? What is its entropy?
Worked solution
The number of points with is : and . The entropy is .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as chaos from "@ratmath/chaos";
const T = chaos.catMap();
console.log([T.fixedPointCount(1), T.fixedPointCount(2), T.entropy().text]);
Checked output
[1n, 5n, "log((3 + √5)/2)"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 2.83 ms on Node.
Same API, measured input family.chaos.catMap.fixedPointCount · iterate. Baseline test points across courses 1, 2, 3, 5, 10. Tr(A^n) satisfies T₀=2,T₁=3,Tₙ=3Tₙ₋₁−Tₙ₋₂. Fixed-point count equals Tₙ−2.
Practical limit. Largest passing sample 10,000 (35.52 ms, 88.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Repeated exact matrix powers grow in bit length with the iterate. The determinant formula counts fixed points of the iterate, including shorter periods.
Measured times, memory and outcomes
iterate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.237
75.4
2
Baseline
Passed
0.185
74.8
3
Baseline
Passed
0.223
74.8
5
Baseline
Passed
0.189
74.6
10
Baseline
Passed
0.220
74.7
100
Stretch
Passed
0.480
76.4
1,000
Stretch
Passed
1.22
77.4
10,000
Stretch
Passed
35.52
88.3
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Day 14 / 40 · Families and bifurcations
Eigenvalues and eigenvectors
Direct calculation@ratmath/linalg
Problem
Find the eigenvalues and eigenvectors of .
Worked solution
: with , with .
Using RatMath
Supply the matrix in row order. Keep exact roots in algebraic form when comparing multiplicities or reporting a stretch factor.
JavaScript module
import * as linalg from "@ratmath/linalg";
console.log(
linalg.eigenvectors([[4, 1], [2, 3]]).exact().map((e) => [e.value.toString(), e.vectors])
);
Checked output
[["2", [[[-1/2], [1]]]], ["5", [[[1], [1]]]]]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
For this problem type. Use 2×2 through 4×4 matrices for hand spectra, including repeated eigenvalues. An entry’s size alone gives little indication of root-isolation cost.
Focal example. The code above passed its displayed check in 1.68 ms on Node.
Related workload in this unit.linalg.eigenvalues.exact · matrix side. Baseline test points across courses 1, 2, 3, 4. An upper bidiagonal matrix has diagonal entries 1 through n as its full spectrum.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 18 (18.30 ms, 87.1 MiB peak process RSS). The runs did not locate a ceiling for this family. The triangular example has rational eigenvalues. General characteristic polynomials, repeated roots and algebraic root isolation are harder.
Measured times, memory and outcomes
matrix side · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
1.92
75.5
2
Baseline
Passed
6.14
75.2
3
Baseline
Passed
3.11
75
4
Baseline
Passed
7.05
76.1
6
Stretch
Passed
4.26
75.4
10
Stretch
Passed
7.90
78.4
18
Stretch
Passed
18.30
87.1
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
linalg.eigenvectors · 6 passing test cases, 4 distinct argument descriptions
For fᵣ(x)=x+r−x², how many real fixed points appear as r crosses zero?
Worked solution
Solve x²=r. Negative r has none, zero has one double solution and positive r has two.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 16 / 40 · Families and bifurcations
Transcritical exchange
Worked by hand
Problem
For the flow x′=rx−x², identify the two equilibrium branches.
Worked solution
They are x=0 and x=r. The derivative r−2x has opposite signs on the branches and they exchange stability at r=0.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Short-period cycles, periods 1, 2, 4 or 8 and a compact parameter interval; distinguish period from number of bifurcation levels.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 17 / 40 · Flows
Lorenz equilibria
Assisted@ratmath/chaos
Problem
Find the equilibria of the Lorenz system with , , , and classify them.
Worked solution
The 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).
Using RatMath
The code displays the z-coordinates and the stability types. Use the equilibrium equations to recover both signs of the nonzero x and y coordinates.
JavaScript module
import * as chaos from "@ratmath/chaos";
const E = chaos.lorenz().equilibria({ x: [-30, 30], y: [-30, 30], z: [-10, 60] });
console.log([E.complete, E.map((e) => e.kind), E.map((e) => e.point[2])]);
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
Focal example. The code above passed its displayed check in 8.41 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.lorenz · 4 passing test cases, 1 distinct argument description
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
Focal example. The code above passed its displayed check in 8.30 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.pendulum · 1 passing test case, 1 distinct argument description
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
For this problem type. Use a scalar ODE or a two-state system with a short time interval. Hand traces use a few steps and classroom comparisons commonly use 10–100.
Focal example. The code above passed its displayed check in 2.42 ms on Node.
Related workload in this unit.linalg.solve.exact · unknowns. Baseline test points across courses 1, 2, 4, 8. For dense I+J and b=(n+1)·1 every component of x must be one.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 128 (64.25 ms, 90.7 MiB peak process RSS). The runs did not locate a ceiling for this family. Solving a nonsingular system checks one solution. Singular or inconsistent systems require rank and consistency checks. Large denominators increase exact cost.
Measured times, memory and outcomes
unknowns · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
22.32
75.6
2
Baseline
Passed
2.28
75.3
4
Baseline
Passed
7.02
75.1
8
Baseline
Passed
2.47
75.3
16
Stretch
Passed
4.34
77.1
32
Stretch
Passed
8.06
79.4
64
Stretch
Passed
63.87
89.9
128
Stretch
Passed
64.25
90.7
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.linearSystem · 2 passing test cases, 9 distinct argument descriptions
Trace , determinant 1, discriminant : a stable spiral.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const L = analytic.linearSystem([[0, 1], [-1, -1]]);
console.log([L.kind, L.stability]);
Checked output
["stable spiral", "asymptotically stable"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
For this problem type. Use a scalar ODE or a two-state system with a short time interval. Hand traces use a few steps and classroom comparisons commonly use 10–100.
Focal example. The code above passed its displayed check in 1.26 ms on Node.
Related workload in this unit.linalg.solve.exact · unknowns. Baseline test points across courses 1, 2, 4, 8. For dense I+J and b=(n+1)·1 every component of x must be one.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 128 (64.25 ms, 90.7 MiB peak process RSS). The runs did not locate a ceiling for this family. Solving a nonsingular system checks one solution. Singular or inconsistent systems require rank and consistency checks. Large denominators increase exact cost.
Measured times, memory and outcomes
unknowns · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
22.32
75.6
2
Baseline
Passed
2.28
75.3
4
Baseline
Passed
7.02
75.1
8
Baseline
Passed
2.47
75.3
16
Stretch
Passed
4.34
77.1
32
Stretch
Passed
8.06
79.4
64
Stretch
Passed
63.87
89.9
128
Stretch
Passed
64.25
90.7
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.linearSystem · 2 passing test cases, 9 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
For this problem type. Use a scalar ODE or a two-state system with a short time interval. Hand traces use a few steps and classroom comparisons commonly use 10–100.
Focal example. The code above passed its displayed check in 53.33 ms on Node.
Related workload in this unit.analytic.odeMethod · Euler steps. Baseline test points across courses 1, 4, 10, 50. For y′=y and h=1/n, check the floating Euler iterate against exp(n log1p(1/n)) within 10⁻¹¹. Method error relative to e is separate.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000 (292 ms, 90.4 MiB peak process RSS). The first sampled passing call above 100 ms used 300 (117 ms). The runs did not locate a ceiling for this family. Smaller steps reduce Euler truncation error for a suitably stable problem. The teaching trace uses doubles. Stiff equations can require vastly smaller steps.
Measured times, memory and outcomes
Euler steps · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
51.00
90.3
4
Baseline
Passed
34.01
89.8
10
Baseline
Passed
36.24
89.6
50
Baseline
Passed
61.43
89.9
100
Stretch
Passed
66.45
90.3
300
Stretch
Passed
117
89.3
1,000
Stretch
Passed
292
90.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.planarSystem · 1 passing test case, 2 distinct argument descriptions
A real planar Jacobian has negative determinant. What does this imply locally at a hyperbolic equilibrium?
Worked solution
Its two eigenvalues are real and have opposite signs. The equilibrium is a saddle.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 23 / 40 · Flows
Conserved energy
Assisted@ratmath/symbolic
Problem
For x′=y, y′=−x, why do trajectories stay on circles?
Worked solution
The derivative of x²+y² is 2xy−2yx=0. The level curves of the conserved quantity are circles about the origin.
Using RatMath
Compare the two expressions symbolically. Work on their common domain, including any restrictions introduced by division.
JavaScript module
import * as symbolic from "@ratmath/symbolic";
console.log(String(symbolic.equal("2*x*y+2*y*(-x)","0")));
Checked output
equal (normal form)
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
Focal example. The code above passed its displayed check in 0.285 ms on Node.
Related workload in this unit.symbolic.expand · degree. Baseline test points across courses 1, 2, 4, 8. Sum the expanded coefficients at x=1 by direct substitution; result 2^n. Also check at x=0 and 2.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 128 (47.68 ms, 96.3 MiB peak process RSS). The runs did not locate a ceiling for this family. A univariate binomial has n+1 terms. With several variables the number of monomials can grow combinatorially even at modest degree.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
26.10
75.9
2
Baseline
Passed
3.05
75.5
4
Baseline
Passed
2.75
77.3
8
Baseline
Passed
4.23
79.5
16
Stretch
Passed
5.88
82.6
32
Stretch
Passed
6.12
87.9
64
Stretch
Passed
15.73
89.5
128
Stretch
Passed
47.68
96.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
symbolic.equal · 8 passing test cases, 28 distinct argument descriptions
{type="op", op="-", args=[Object, Object] (n=2)}, "x*exp(x)", {assume={x="x > 1"}} or {type="op", op="+", args=[Object, Object] (n=2)}, "1/(x^2+1)^2", {assume={x="x > 1"}} · every result differentiates back to the integrand
For , what is the largest step for which Euler's method does not grow?
Worked solution
Each step multiplies by ; needs . The stability interval for is .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const s = analytic.stability("euler");
console.log([s.interval, s.largestStep(-10)]);
Checked output
[[-2, 0], 1/5]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two or three states, a few equilibria and bounded initial data. A local stability test says little about distant trajectories.
Focal example. The code above passed its displayed check in 0.323 ms on Node.
Related workload in this unit.analytic.odeMethod · Euler steps. Baseline test points across courses 1, 4, 10, 50. For y′=y and h=1/n, check the floating Euler iterate against exp(n log1p(1/n)) within 10⁻¹¹. Method error relative to e is separate.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000 (292 ms, 90.4 MiB peak process RSS). The first sampled passing call above 100 ms used 300 (117 ms). The runs did not locate a ceiling for this family. Smaller steps reduce Euler truncation error for a suitably stable problem. The teaching trace uses doubles. Stiff equations can require vastly smaller steps.
Measured times, memory and outcomes
Euler steps · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
51.00
90.3
4
Baseline
Passed
34.01
89.8
10
Baseline
Passed
36.24
89.6
50
Baseline
Passed
61.43
89.9
100
Stretch
Passed
66.45
90.3
300
Stretch
Passed
117
89.3
1,000
Stretch
Passed
292
90.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.stability · 1 passing test case, 2 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 5,650 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.lyapunovExponent · 4 passing test cases, 5 distinct argument descriptions
Fixed · A display name no longer identifies a dynamical family. The custom identity map named “logistic” no longer receives the r=4 logistic exponent. The closed-form helper refuses the unrecognized formula. For the identity, log|f′|=0.
Day 26 / 40 · Chaos and coding
Sensitive dependence
Direct calculation@ratmath/chaos
Problem
For the tent map , the points and start close. After how many steps are they more than apart?
Worked solution
While both stay on one side of each fold the distance doubles: needs , . The growth rate is per step.
Using RatMath
Specify the map or flow and its parameter before choosing an initial state. Keep finite orbit data separate from conclusions about all subsequent iterates.
JavaScript module
import * as chaos from "@ratmath/chaos";
const s = chaos.sensitivity(chaos.tent(2), "1/3", "1/1000000");
console.log([s.reaches, s.factor]);
Checked output
[17, 2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
For this problem type. Use short exact orbits, often 3–12 iterations, from rational seeds. A classroom plot can need hundreds of approximate iterates and has a different precision contract.
Focal example. The code above passed its displayed check in 2.53 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.sensitivity · 1 passing test case, 1 distinct argument description
A 7 Hz sine is sampled at 10 Hz. What frequency does it appear to have?
Worked solution
The Nyquist frequency is 5 Hz; folds to Hz, and a sine comes back with its sign reversed: .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const a = analytic.alias(7, 10);
console.log([a.alias, a.sign, a.aliased]);
Checked output
[3, -1, true]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
For this problem type. Keep about 2–16 harmonics, nodes or modes in a worked example. For a transform specify interval, frequency convention and sampling rate.
Focal example. The code above passed its displayed check in 0.167 ms on Node.
Related workload in this unit.analytic.dft · sample count. Baseline test points across courses 2, 4, 8, 16. The DFT of a unit impulse is identically one in every frequency bin.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 256 (134 ms, 91.3 MiB peak process RSS). The first sampled passing call above 100 ms used 256 (134 ms). The runs did not locate a ceiling for this family. The result keeps one complex value per frequency. For signals with general phases, precision and transform length can dominate cost.
Measured times, memory and outcomes
sample count · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
2
Baseline
Passed
0.887
76.2
4
Baseline
Passed
0.815
75.4
8
Baseline
Passed
1.07
75.8
16
Baseline
Passed
2.08
75.7
32
Stretch
Passed
3.29
76.4
64
Stretch
Passed
17.10
79.6
128
Stretch
Passed
29.35
83.2
256
Stretch
Passed
134
91.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.alias · 1 passing test case, 3 distinct argument descriptions
Find the stationary distribution of the chain with transition matrix .
Worked solution
: .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as stats from "@ratmath/stats";
console.log(stats.markovChain([["0.9", "0.1"], ["0.5", "0.5"]]).stationary().distribution);
Checked output
{ "0": 5/6, "1": 1/6 }
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
For this problem type. Use about 2–10 states, nonnegative rational transition probabilities and rows summing to one. Vary the class structure when testing uniqueness.
Focal example. The code above passed its displayed check in 0.871 ms on Node.
Same API, measured input family.stats.markovChain.stationary · states. Baseline test points across courses 2, 3, 5, 10. A strictly positive uniform transition matrix has uniform stationary probabilities.
Practical limit. Largest passing sample 100 (655 ms, 144.2 MiB peak process RSS). The first sampled passing call above 100 ms used 50 (112 ms). The runs did not locate a ceiling for this family. An explicit transition matrix has n² entries. Check row sums, closed communicating classes and periodicity before interpreting a stationary law as a limit.
Measured times, memory and outcomes
states · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
2
Baseline
Passed
5.03
74.6
3
Baseline
Passed
1.61
75.6
5
Baseline
Passed
2.69
75
10
Baseline
Passed
16.48
77
20
Stretch
Passed
36.57
83.9
50
Stretch
Passed
112
92.9
100
Stretch
Passed
655
144.2
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
stats.markovChain · 2 passing test cases, 3 distinct argument descriptions
Prove that the logistic map 4x(1−x) sends [0,1] into [0,1].
Worked solution
The product is nonnegative on the interval and equals 1−4(x−1/2)², so its maximum is one. This range argument makes all subsequent real iterates in the interval well-defined.
Using RatMath
Compare the two expressions symbolically. Work on their common domain, including any restrictions introduced by division.
JavaScript module
import * as symbolic from "@ratmath/symbolic";
console.log(String(symbolic.equal("4*x*(1-x)","1-4*(x-1/2)^2")));
Checked output
equal (normal form)
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
Focal example. The code above passed its displayed check in 0.249 ms on Node.
Related workload in this unit.symbolic.expand · degree. Baseline test points across courses 1, 2, 4, 8. Sum the expanded coefficients at x=1 by direct substitution; result 2^n. Also check at x=0 and 2.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 128 (47.68 ms, 96.3 MiB peak process RSS). The runs did not locate a ceiling for this family. A univariate binomial has n+1 terms. With several variables the number of monomials can grow combinatorially even at modest degree.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
26.10
75.9
2
Baseline
Passed
3.05
75.5
4
Baseline
Passed
2.75
77.3
8
Baseline
Passed
4.23
79.5
16
Stretch
Passed
5.88
82.6
32
Stretch
Passed
6.12
87.9
64
Stretch
Passed
15.73
89.5
128
Stretch
Passed
47.68
96.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
symbolic.equal · 8 passing test cases, 28 distinct argument descriptions
{type="op", op="-", args=[Object, Object] (n=2)}, "x*exp(x)", {assume={x="x > 1"}} or {type="op", op="+", args=[Object, Object] (n=2)}, "1/(x^2+1)^2", {assume={x="x > 1"}} · every result differentiates back to the integrand
At r=4 does the logistic fixed orbit x=0 have Lyapunov exponent log 2?
Worked solution
Its derivative is always 4 and hence its exponent is log 4. The almost-everywhere value log 2 refers to a different statement.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 31 / 40 · Chaos and coding
Map identity
Worked by hand
Problem
For f(x)=x what is the Lyapunov exponent along any orbit?
Worked solution
Every iterate has derivative 1 and log 1=0. At the reviewed pin a user-assigned map name can select a theorem for a different formula, so derive this value from the derivative.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 32 / 40 · Chaos and coding
Floating point
Direct calculation@ratmath/analytic
Problem
What exact rational number does the double nearest to 0.1 equal? What is machine epsilon (the gap from 1 to the next double)?
Worked solution
; rounded to 53 significant bits it is , slightly above 0.1. Machine epsilon is .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log([analytic.floatParts(0.1).exact, analytic.floatParts(1).ulp]);
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Short itineraries or bounded orbit segments; an almost-everywhere exponent can differ from an exceptional orbit.
Focal example. The code above passed its displayed check in 0.355 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.floatParts · 1 passing test case, 1 distinct argument description
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
For this problem type. Use 2–8 similarity maps or construction depths typically 0–8. Compare dimension estimates with the number and ratios of pieces.
Focal example. The code above passed its displayed check in 0.360 ms on Node.
Related workload in this unit.chaos.cantor.stage · construction depth. Baseline test points across courses 0, 1, 3, 6. At stage n the middle-thirds construction consists of exactly 2^n intervals.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 18 (2,501 ms, 378.4 MiB peak process RSS). The first sampled passing call above one second used 18 (2,501 ms). The runs did not locate a ceiling for this family. The middle-thirds set has 2ⁿ surviving intervals at stage n. Drawing or retaining every interval therefore consumes exponential space.
Measured times, memory and outcomes
construction depth · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.156
75.4
1
Baseline
Passed
0.374
75.8
3
Baseline
Passed
0.405
76.1
6
Baseline
Passed
10.84
75.8
10
Stretch
Passed
13.82
90.6
14
Stretch
Passed
156
129.1
18
Stretch
Passed
2,501
378.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.cantor · 3 passing test cases, 2 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
For this problem type. Use 2–8 similarity maps or construction depths typically 0–8. Compare dimension estimates with the number and ratios of pieces.
Focal example. The code above passed its displayed check in 0.630 ms on Node.
Related workload in this unit.chaos.cantor.stage · construction depth. Baseline test points across courses 0, 1, 3, 6. At stage n the middle-thirds construction consists of exactly 2^n intervals.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 18 (2,501 ms, 378.4 MiB peak process RSS). The first sampled passing call above one second used 18 (2,501 ms). The runs did not locate a ceiling for this family. The middle-thirds set has 2ⁿ surviving intervals at stage n. Drawing or retaining every interval therefore consumes exponential space.
Measured times, memory and outcomes
construction depth · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.156
75.4
1
Baseline
Passed
0.374
75.8
3
Baseline
Passed
0.405
76.1
6
Baseline
Passed
10.84
75.8
10
Stretch
Passed
13.82
90.6
14
Stretch
Passed
156
129.1
18
Stretch
Passed
2,501
378.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.attractors.sierpinski · 4 passing test cases, 1 distinct argument description
A self-similar set has two pieces, scaled by and . Find its dimension.
Worked solution
. With : , , so .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(String(chaos.moran(["1/2", "1/4"]).interval[0]));
Checked output
381663528263/549755813888
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
For this problem type. Use 2–8 similarity maps or construction depths typically 0–8. Compare dimension estimates with the number and ratios of pieces.
Focal example. The code above passed its displayed check in 11.23 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Related workload in this unit.chaos.cantor.stage · construction depth. Baseline test points across courses 0, 1, 3, 6. At stage n the middle-thirds construction consists of exactly 2^n intervals.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 18 (2,501 ms, 378.4 MiB peak process RSS). The first sampled passing call above one second used 18 (2,501 ms). The runs did not locate a ceiling for this family. The middle-thirds set has 2ⁿ surviving intervals at stage n. Drawing or retaining every interval therefore consumes exponential space.
Measured times, memory and outcomes
construction depth · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.156
75.4
1
Baseline
Passed
0.374
75.8
3
Baseline
Passed
0.405
76.1
6
Baseline
Passed
10.84
75.8
10
Stretch
Passed
13.82
90.6
14
Stretch
Passed
156
129.1
18
Stretch
Passed
2,501
378.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.moran · 1 passing test case, 1 distinct argument description
: , a bounded 2-cycle: inside. : escapes: outside ().
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log(
[chaos.mandelbrotPoint("-1").verdict, chaos.mandelbrotPoint("1").verdict, chaos.mandelbrotPoint("1").escape]
);
Checked output
["inside", "outside", 3]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
Focal example. The code above passed its displayed check in 0.402 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.mandelbrotPoint · 1 passing test case, 5 distinct argument descriptions
Classify the blinker and the glider in Conway's Game of Life.
Worked solution
The blinker is an oscillator of period 2. The glider is a spaceship of period 4 that moves one cell diagonally each period (speed ).
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as chaos from "@ratmath/chaos";
const L = (p) => chaos.life(chaos.patterns[p]).classify();
console.log(
[L("blinker").kind, L("blinker").period, L("glider").kind, L("glider").period, L("glider").speed]
);
Checked output
["oscillator", 2, "spaceship", 4, "c/4"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
Focal example. The code above passed its displayed check in 1.52 ms on Node.
Related workload in this unit.chaos.logistic.orbit · exact iterations. Baseline test points across courses 0, 1, 3, 6, 10. At r=4 and x₀=1/3, compare with the unreduced integer recurrence p′=4p(q−p), q′=q².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 15 (174 ms, 88.4 MiB peak process RSS). Library refusal at 18, 20. The first sampled passing call above 100 ms used 15 (174 ms). For r=4 from 1/3 the reduced denominator squares each iterate. Exact integer growth can end a computation long before the orbit leaves [0,1].
Measured times, memory and outcomes
exact iterations · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
1.16
75.6
1
Baseline
Passed
0.793
75.7
3
Baseline
Passed
0.797
74.5
6
Baseline
Passed
0.889
74.8
10
Baseline
Passed
1.28
77.4
12
Stretch
Passed
3.36
76.7
15
Stretch
Passed
174
88.4
18
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
772
89
20
Stretch
Library refusal · ChaosError: the exact orbit needs more than 200000 binary digits by step 16; use enclosedOrbit for long orbits
712
88.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.life · 3 passing test cases, 9 distinct argument descriptions
What is the total length of the th stage of the Cantor construction? What is the measure of the Cantor set?
Worked solution
intervals of length : , e.g. at stage 3. The limit is 0, yet the set is uncountable.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as chaos from "@ratmath/chaos";
console.log([chaos.cantor().measure(3), chaos.cantor().stage(2).length]);
Checked output
[8/27, 4]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
For this problem type. Use 2–8 similarity maps or construction depths typically 0–8. Compare dimension estimates with the number and ratios of pieces.
Focal example. The code above passed its displayed check in 0.249 ms on Node.
Same API, measured input family.chaos.cantor.stage · construction depth. Baseline test points across courses 0, 1, 3, 6. At stage n the middle-thirds construction consists of exactly 2^n intervals.
Practical limit. Largest passing sample 18 (2,501 ms, 378.4 MiB peak process RSS). The first sampled passing call above one second used 18 (2,501 ms). The runs did not locate a ceiling for this family. The middle-thirds set has 2ⁿ surviving intervals at stage n. Drawing or retaining every interval therefore consumes exponential space.
Measured times, memory and outcomes
construction depth · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.156
75.4
1
Baseline
Passed
0.374
75.8
3
Baseline
Passed
0.405
76.1
6
Baseline
Passed
10.84
75.8
10
Stretch
Passed
13.82
90.6
14
Stretch
Passed
156
129.1
18
Stretch
Passed
2,501
378.4
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
chaos.cantor · 3 passing test cases, 2 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
For this problem type. Use 2–8 similarity maps or construction depths typically 0–8. Compare dimension estimates with the number and ratios of pieces.
Focal example. The code above passed its displayed check in 0.382 ms on Node.
Same API, measured input family.chaos.attractors.carpet.similarityDimension · requested bits. Baseline test points across courses 8, 16, 24, 40. For eight self-similar pieces of ratio 1/3, dimension d solves 3^d=8. Compare enclosure endpoints to log(8)/log(3) to floating precision.
Practical limit. Largest passing sample 256 (12.53 ms, 79.5 MiB peak process RSS). The runs did not locate a ceiling for this family. The formula assumes the specified contraction ratios and separation hypotheses. Requested bits control the computational accuracy, not validity of those hypotheses.
Measured times, memory and outcomes
requested bits · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
8
Baseline
Passed
3.64
75.7
16
Baseline
Passed
6.65
76.7
24
Baseline
Passed
3.47
75.9
40
Baseline
Passed
4.70
77.1
64
Stretch
Passed
4.74
77.9
128
Stretch
Passed
14.30
78.2
256
Stretch
Passed
12.53
79.5
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Day 40 / 40 · Fractals and discrete dynamics
Escape versus membership
Worked by hand
Problem
For z→z²+c with z₀=0 and c=2, why does the critical orbit escape?
Worked solution
It reaches 2 and then 6. Once above 2 on the positive axis, each subsequent value grows. A long bounded-looking finite prefix alone would not prove membership.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Fractal construction depths around 0–6, small cellular seeds and a finite observation window or escape budget.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.