Separate a settling-in path from its long-run pattern.
By the end: Test periodic behavior without mistaking a short record for proof.
A repeating sequence is not a fixed point
A period-two cycle alternates between two distinct states. Each maps to the other, and two updates return to the starting state. A fixed point also returns after two updates, but its smallest period is one. Always ask for the smallest repeating length.
At r = 3.2, typical interior starts approach values about 0.5130 and 0.7995. The first few updates may look irregular because the trajectory has not yet settled. This initial portion is a transient.
Solve a return condition and remove shorter periods
To search for a two-cycle, define a return rule g that applies the original update twice. If f is one logistic update, g(x) means f applied to f(x). A solution of g(x) = x returns after two updates. It is not automatically a two-cycle because every fixed point of f also satisfies that equation. The distinction concerns the smallest positive number of updates that returns the state. Looking only at the return equation without testing shorter returns combines different kinds of motion in the same set of solutions.
For the logistic map, expanding the return equation gives a fourth-degree polynomial. Its factors have a useful interpretation. The difference g(x) minus x equals −x times the quantity r x minus r plus one, times the quadratic r squared x squared minus r times r plus one times x plus r plus one. The first factor gives zero, and the next gives the familiar nonzero fixed point. The remaining quadratic contains the candidates for a genuine two-cycle. Factoring separates these candidates before any numerical iteration is needed.
Name the quadratic factor
g(x) means f(f(x)), two updates. Q is an abbreviation for this quadratic, not another dynamical variable.
Factor the return difference
Setting this product to zero retains fixed points as well as the two-cycle candidates.
A return can hide a shorter period
Candidate at r = 3.3
One update
Two updates
0
0
0
23/33
23/33
23/33
a ≈ 0.479427020
b ≈ 0.823603283
a
b ≈ 0.823603283
a ≈ 0.479427020
b
Every row returns after two updates, but only the last two rows change after one update. They are the phases of one two-cycle. The first two rows have smallest period one; displayed cycle decimals approximate exact algebraic roots.
Solving that quadratic gives two possible values. Their common denominator is 2r, and their numerators are r plus one minus or plus the square root of the product r minus three times r plus one. The square root is real for r greater than three in our parameter range. At r = 3 the two formulas coincide, so they do not yet describe two distinct phases. Above three they separate. Real roots must still fall inside the allowed state interval and must map to one another under f.
Use r = 3.3 for a new worked example. The lower root a is approximately 0.479427020, and the upper root b is approximately 0.823603283. Applying 3.3 times a times one minus a gives b, while applying the same rule to b gives a. Neither is the nonzero fixed point, approximately 0.696969697. These substitutions establish the two-step structure independently of observing a rounded late trace. The displayed decimals are approximations to algebraic roots, so numerical substitution will retain a small rounding residual rather than an exact printed equality.
Find the two-cycle candidates
a is the lower cycle state and b the upper. All quantities are dimensionless. These are roots after removing fixed-point factors.
Substitute r = 3.3
Test each one-step destination
The equalities concern the algebraic roots, not their rounded printed decimals. Neither state is individually fixed.
There are two phases in this cycle, not two separate cycles. Starting at a produces a, b, a, b, while starting at b produces b, a, b, a. The ordered trajectories differ at each matching update, but they visit the same pair of states. A phase identifies where the state lies within the repeating sequence. A period identifies the number of updates needed for a complete return. Keeping those meanings separate becomes necessary when comparing two runs that approach the same cycle from different starting values.
The same cycle with two phases
State x, dimensionless
Update n, dimensionless
Solid: Start a
Dashed: Start b
At r = 3.3 these two trajectories visit the same algebraic pair with opposite phase over four updates. Connected segments join discrete states; they do not imply intermediate states between updates. Values are mathematical cycle approximations, not observations or a time average.
The average of the two cycle states is also not a replacement state for predicting the sequence. At r = 3.3 the average is approximately 0.651515152. Applying the rule to that average gives approximately 0.749242424, rather than the same average or either cycle value. Nonlinearity prevents replacing a changing state by its mean without changing the calculation. A mean can summarize the pair, but it loses phase and does not obey the original scalar recurrence as a steady state. This is a mathematical example, not a measured weather average.
Stability belongs to the whole cycle
To test a cycle, follow a perturbation through all its updates. Multiply the local slopes around one complete period. The product, rather than either slope alone, determines first-order contraction over that period.
A temporary expansion can be followed by a stronger contraction. This is why a single step with slope magnitude above one does not establish sustained divergence. The lab shows both the initial path and late values; they answer different questions.
Track error through both phases
A local slope tells how a small signed input error changes during one update. For the logistic map, the slope at x is r times one minus twice x. This expression follows by expanding f(x + e) minus f(x), then keeping the term proportional to e. For a two-cycle, the reference state changes after the first update. The first error must be measured from b if the starting reference was a. Comparing both stages with a alone would combine ordinary cycle motion with the small disturbance we want to track.
At r = 3.3, the local slopes at a and b are approximately +0.135781669 and −2.135781669. Starting close to a, a small error first contracts strongly without changing sign. Starting close to b, a small error first expands and changes sign. After two updates both routes have encountered both slopes. Their product is −0.29, so the return error contracts and reverses sign at first order. This sign reversal concerns deviations sampled at the same phase, not the alternation between the lower and upper cycle states themselves.
Multiply both local slopes
M is the dimensionless first-order error factor per two-update return, not per update.
Evaluate the return factor
Track one small return error
This is the linear estimate from +0.001 at a; quadratic corrections make the finite-displacement result different.
Follow a perturbation around the cycle
Reference phase
Local slope
Linear error from +0.001 at a
Start at a
Not applied
+0.001
Arrive at b
+0.135781669
+0.000135782
Return to a
−2.135781669
−0.000290000
For r = 3.3, multiply the error by the slope at the departing phase on each update. These are first-order estimates over one return, not exact finite-displacement errors. The net factor is the product −0.29, despite one expanding step.
Take a starting displacement of 0.001 above a. The linear estimate gives an error about 0.000135782 relative to b after one update, then −0.000290000 relative to a after two. The nonlinear calculation instead gives approximately 0.000132482 and −0.000283010. The difference comes from the squared-error corrections in each update. These calculations use the same perturbed start and the same two cycle references. They show why a return multiplier is a useful small-error estimate while still falling short of an exact finite-displacement rule.
The order of the slopes changes the intermediate error, although multiplication gives the same two-step product. Start 0.001 above b instead. The first linearized error is approximately −0.002135782 relative to a, already larger than the initial error. The next linearized error is again −0.000290000 relative to b. Observing just the first step would produce the wrong diagnosis for the complete cycle. Stability belongs to repeated returns near the whole cycle. Temporary growth within a return interval can coexist with contraction measured at successive visits to the same phase.
The product of the two logistic slopes simplifies to −r squared plus 2r plus four for these two-cycle roots. At r = 3.1 it is +0.59, while at r = 3.4 it is −0.76. Both magnitudes are below one, but return errors behave differently in sign. The positive product predicts approach to a chosen phase from the same side at successive two-step returns. The negative product predicts alternating sides at those returns. Neither sign refers to whether the state itself goes from the low cycle value to the high one.
Same-phase errors contract
Linear error / initial error
Completed two-update returns k
Solid: r = 3.1
Dashed: r = 3.3
Each horizontal unit is two logistic updates, so the horizon is eight updates. Signed errors divide by their initial same-phase displacement. Lines connect discrete linearized return estimates, not exact nonlinear or within-return motion; positive and negative products give different approach directions.
The stability boundary occurs when that product reaches −1. Solving r squared minus 2r minus five equal to zero gives r = 1 plus the square root of six, approximately 3.449490, for the relevant positive root. Below that boundary and above three, the strict product test gives local attraction for the two-cycle. At the boundary the first-order test again needs higher-order analysis. Beyond it, the algebraic cycle roots can still exist while nearby trajectories cease to approach them. Existence and attraction remain separate even after replacing one-step returns with two-step returns.
Inspect the rules and their result
The logistic update
x is dimensionless and n counts updates. r is fixed within a run. We restrict 0 ≤ r ≤ 4 and 0 ≤ x ≤ 1.
Changing r restarts the run from x = 0.213; it does not continue the old run. The first sixty updates remain separate from the late sample.
Solid blue: r = 3.2.
Nonzero fixed point: 0.6875. Local error multiplier: -1.20. Its magnitude is at least one.
Update
Late value
893
0.513045
894
0.799455
895
0.513045
896
0.799455
897
0.513045
898
0.799455
899
0.513045
900
0.799455
Last eight values after 900 updates. Rounded near-repeats suggest a pattern; this is not a proof of an exact period.
Current x
Next x
After two updates
0.5130
0.7995
Approximately 0.5130
0.7995
0.5130
Approximately 0.7995
Approximate period-two orbit at r = 3.2.
Separate settling from the repeating phases
The cycle lab starts at x = 0.213 whenever you change r. Unlike the stability version, it does not place the initial state a fixed distance from an equilibrium. Select the two-cycle preset, then move the slider to r = 3.3 to compare with the additional worked example. The first sixty-update trace includes the initial approach as well as later motion. The last-eight table comes from a separate run reaching update 900. These are two windows on the same specified recurrence, not consecutive pieces of one displayed animation.
At r = 3.3 the first update from 0.213 is 0.5531823. The next values are approximately 0.815666422 and 0.496170544. They do not equal the cycle roots, but soon the upper and lower visits approach the corresponding roots. The early overshoots belong to the transient. They are not evidence that the cycle has a changing period. Since the initial state was not exactly on the cycle, exact repetition was not required at the start. Attraction concerns what later returns do to a displacement from the cycle.
The approach contains overshoots
State x, dimensionless
Update n, dimensionless
Solid: From 0.213
The fixed parameter is r = 3.3 and the initial state is 0.213. Thirteen samples include twelve updates, with an early transient before near-alternation. Connected points join computed discrete states, not continuous motion; this short trace alone cannot certify an exact period.
Compare updates with the same parity to inspect the approach without the large jump between phases. In this example, the even updates from update two onward approach b, while the odd updates from update three onward approach a. Reading every second update is sampling a return map. It changes the sequence you inspect, not the underlying update rule. If only the even samples were supplied, their near-constant late values could resemble a fixed point. The original one-step record is needed to show that a second phase occurs between those samples.
The cycle's two-step multiplier also predicts how this same-parity settling proceeds once errors are small. Because the product is −0.29 at r = 3.3, the even-phase deviations alternate sides and shrink by about a factor of 0.29 per return. The deviations at odd updates behave similarly around the other root. There are two updates per return, so this factor cannot be called a per-update reduction. A record with fewer returns offers less evidence about the rate, even if it contains the same number of plotted points through denser sampling within each return.
The preset at r = 3.5 offers a contrast using the actual controls. Its late values organize around four phases rather than the pair derived for r = 3.3. The two-cycle roots do not disappear merely because typical late trajectories visit a four-cycle instead. Their attraction has changed. The same distinction already appeared for a repelling fixed point. A late trace describes the attractor reached by this selected start after a finite run. It is not an inventory of every periodic or exceptional solution admitted by the mathematical rule.
Compare the same phase
Update n
State x
Error from b
2
0.815666422
-0.007936861
4
0.824951606
+0.001348323
6
0.823183974
-0.000419309
8
0.823722161
+0.000118878
Even updates in this r = 3.3 run approach the upper algebraic root b. Signed errors subtract that same reference, revealing alternating overshoots hidden by the large phase jump. Sampling every second update inspects returns and omits the intervening lower states.
Changing to the period-three-window preset at r = 3.83 shows why period should be read from the sequence rather than inferred from parameter size. A larger r need not mean a larger smallest period or a less regular late sample. The model carries no random input, and each preset recomputes from the same start. Apparent disorder and subsequent regularity therefore arise under different deterministic rules. These finite comparisons motivate questions about periodic windows, but neither the first sixty updates nor eight printed late values alone proves the exact long-run period at an arbitrary slider setting.
Finite records require caution
A computer stores finitely many states. A deterministic calculation on that finite set must eventually repeat if continued indefinitely. Such repetition can be a numerical artifact rather than a cycle of the underlying real-number system.
Conversely, not seeing a repeat in sixty updates does not prove nonperiodicity. Use a trace to form a hypothesis, then use analytic results, precision comparisons, and longer observations to investigate it.
Distinguish numerical recurrence from mathematical periodicity
A computer recurrence operates on stored numbers rather than all real numbers. If the rule is deterministic, the parameter stays fixed, and the set of possible stored states is finite, an indefinitely continued calculation must eventually revisit a stored state. From the first repeated state onward, the future stored sequence repeats because the next operation is the same. This is a counting argument about a finite numerical system. It does not establish that the corresponding real-number logistic trajectory has the same period, or that the repeated numerical cycle attracts nearby real states.
A small rounding example makes the mechanism visible without imitating the lab implementation. Use r = 3.3, start at 0.21, and round the output to the nearest hundredth after every update. The stored sequence begins 0.21, 0.55, 0.82, 0.49, 0.82. Once 0.82 reappears, the same rounded rule sends it to 0.49 again. This finite arithmetic model enters an exact stored two-cycle. Its pair differs from the mathematical roots approximately 0.479427020 and 0.823603283. Deliberate hundredth rounding is a different recurrence, not an undocumented control in the lab.
Rounding changes the recurrence
Update
Unrounded output from stored input
Stored to hundredth
1
0.54747
0.55
2
0.81675
0.82
3
0.48708
0.49
4
0.82467
0.82
This deliberately coarse arithmetic example starts at 0.21 with r = 3.3 and rounds after every update. It is not the lab algorithm. Repeating stored 0.82 guarantees the same rounded continuation, but does not certify the exact real-number cycle.
Display rounding has another effect even when the internal calculation keeps more digits. States 0.47943 and 0.47947 both print as 0.479 to three decimal places, yet their next outputs at r = 3.3 differ. A repeated label therefore does not imply a repeated stored state. Conversely, a stored state can repeat without the corresponding real trajectory repeating exactly. These are two distinct limits on interpreting a numerical table. The lab's late rows round for readability, so they support a pattern comparison rather than an exact algebraic certificate of periodicity.
Roundoff is not physical noise. Rounding changes the represented number through an arithmetic convention; a noisy physical input would change the modeled system through a separately specified process. Near an attracting cycle, small arithmetic disturbances may remain small because return errors contract. That does not make the disturbances measurements of environmental variability. Near a repelling trajectory, arithmetic differences can grow without any physical disturbance being introduced. When comparing numerical traces, the relevant questions include the precision and arithmetic rule as well as the initial state and parameter, even though all computations remain deterministic.
A periodic candidate can be tested more strongly by substituting it into the rule and checking shorter returns. For the derived r = 3.3 pair, algebra identifies two distinct real roots after the fixed-point factors have been removed. The slope product then addresses local attraction. A finite late trace provides a separate implementation check against those results. Agreement links several kinds of evidence, but it does not turn finite observation into a proof for every parameter. At a parameter without a derived cycle, a small return difference is a useful numerical diagnostic, not an exact-period claim.
Equal labels can conceal unequal states
Internal input
Printed to 3 decimals
Next output at r = 3.3
0.47943
0.479
0.823603688
0.47947
0.479
0.823609113
Difference 0.00004
Same label
Difference ≈ 0.000005425
Both inputs receive the same three-decimal label while their computed next states differ. These one-update substitutions distinguish display rounding from rounding the recurrence after each step. The small difference is arithmetic in a teaching map, not an estimate of physical measurement noise.
Finally, the horizon and sampling interval belong in any description of irregular or repeating behavior. Sixty updates with no visible repeat excludes only repeats detectable in that record at its displayed precision. A long cycle could exceed the window, and a long transient could precede a shorter attracting cycle. Sampling every second update could hide alternating phases, while coarse labels could merge distinct ones. These possibilities do not make the trace useless. They specify which conclusions it supports and which need algebraic analysis or additional numerical checks under explicitly stated precision and sampling choices.
Exercises
Find the smallest period
The repeating sequence is 0.2, 0.7, 0.2, 0.7. Is its smallest period four?
Hint
Look for an earlier return with the same continuation.
Worked answer
Step
0
1
2
3
4
Value
0.2
0.7
0.2
0.7
0.2
One cycle contains two distinct phases.
No. Its smallest period is two. Four is also a return time, but calling it the period would conceal the shorter cycle.
Combine local effects
A hypothetical two-cycle has local slopes 2 and 0.2. Do errors necessarily grow after a complete cycle?
Hint
Multiply rather than add the slopes.
Worked answer
Stage
Approximate error
Start
0.001
After slope 2
0.002
After slope 0.2
0.0004
Track one small error through both phases.
The product is 0.4, so sufficiently small errors contract over a complete cycle in the first-order test. One expanding step does not contradict stable two-step behavior.
Sources and further reading
Selected reference passages support the definitions and modeling distinctions below. The examples, explanations, and implementations are original. Terminology and assumptions are stated within each lesson; source review is not an independent audit of this course. Optional links are not runtime dependencies.