Agenda
Today
- Iterated maps, fractals, and chaos
Big idea: Simple deterministic rules can generate
surprisingly complicated behavior when repeated over and over.
Three examples:
- Newton-Raphson root-finding as a dynamical system
- Mandelbrot Set and fractals
- Logistic Map and population growth
Iterated Maps
Iterated maps
An iterated map repeatedly applies the same
rule:
Starting from an initial value
,
we generate an orbit
Computationally:
x = x0
for n in range(N):
x = F(x)
Today we will ask:
What happens after we apply
over and over again?
A simple linear example
Consider the iterated linear map
Starting from
,
the orbit is
The exact solution is therefore
Different values of
give qualitatively different long-time behavior. Starting from
:
convergence to
oscillatory convergence to
persistent oscillation
divergence
Fixed points
A fixed point
satisfies
meaning that the orbit is constant for all time.
For
the fixed point is
.
For
there are two fixed points:
.
If the orbit approaches
,
then
is a stable (attractive) fixed point.
If the orbit diverges from the fixed point, it is
repulsive.
Stability of a fixed point
Suppose we start close to a fixed point:
For small
we may Taylor expand:
Since
,
Therefore:
Stability in the linear example
Since
the fixed point
is stable when
and unstable when
and marginal when
A nonlinear example
For the linear example, it doesn’t matter what initial condition
you choose. The iterated map is globally stable or
unstable depending on the parameter
.
Things get more interesting for nonlinear maps.
Consider
The fixed points
satisfy
,
so we have two fixed points
Are these fixed points stable or unstable? Use the derivative
criterion
.
Cobweb plots
We can find and study fixed points visually in the
plane.
To do this, let’s split each step of the iterated map onto two
pieces:
Fixed points satisfy
.
This can be viewed as the intersection of these two
functions.
And long-term behavior can be viewed as “ping-ponging” back and forth
between these two functions.
Newton-Raphson as an Iterated Map
Newton-Raphson revisited
Newton-Raphson finds roots of
using
Define the Newton map
Then Newton-Raphson is simply
Every root
of
is a fixed point:
Root-finding in the complex plane
Consider finding roots of
The roots are complex
Q: can we find these roots via Newton-Raphson? From the previous
slide we obtain the Newton map:
or
Clearly the roots
are fixed points of this map.
Question: Given an initial guess
,
which root does Newton-Raphson find?
Demo: Newton-Raphson in the complex plane
For each starting point
run Newton-Raphson until it converges.
Color the starting point according to the root it reaches.
Algorithm:
- Make a grid of initial conditions
.
- Iterate Newton-Raphson at every point.
- Determine which root each point approaches.
- Assign each root a different color.
Basins of attraction
Each root has a basin of attraction:
Points in the same basin converge to the same root.
Source:
https://paulbourke.net/fractals/newtonraphson/
What happens near the boundary?
Points that begin very close together can converge to
different roots.
Zooming into the boundary reveals new structure at smaller and
smaller scales.
This is our first example of a fractal.
A useful working definition:
A fractal has nontrivial structure that persists as we examine it at
finer scales.
A lesson from Newton-Raphson
Newton-Raphson is:
- Deterministic
- Defined by a simple formula
- Easy to implement
Yet its global behavior can be extremely complicated.
The complexity does not come from randomness.
It comes from repeatedly applying a nonlinear map.
Simple rule + iteration
complex structure
Mandelbrot Set
An even simpler map
Consider
with
and
a complex number.
For each complex value of
,
generate the orbit
Then ask:
Does the orbit remain bounded, or does it escape to
infinity?
Demo: iterate
For one value of
:
z = 0
for n in range(N):
z = z*z + c
if abs(z) > 2:
break
Try several choices of
.
Observe:
- Some orbits escape rapidly.
- Some settle into simple behavior.
- Some remain bounded but behave in complicated ways.
The Mandelbrot set
The Mandelbrot set is the collection of parameters
for which the orbit remains bounded:
The Mandelbrot set, fractals, and self-similarity
Newton fractal vs. Mandelbrot set
| Fix the map |
Change the map |
| Vary the initial condition
|
Vary the parameter
|
| Ask: Which attractor? |
Ask: Bounded or unbounded? |
Both reveal complicated structure by running a simple algorithm many
times.
Computational strategy: Scan over many inputs,
iterate, then classify the long-time behavior.
Logistic Map
Population growth
Suppose
is the population during generation
,
normalized so that
With unlimited resources, we might expect
But unlimited exponential growth is unrealistic.
Growth should slow when the population becomes large.
The logistic map
A simple discrete model is
Interpretation:
For
and suitable initial conditions, the population remains between 0 and
1.
Question: What happens to the population after many
generations?
Fixed points of the logistic map
A fixed population satisfies
Therefore the two fixed points are
and
But finding fixed points is not enough.
We must also ask:
Is the fixed point stable?
Stability changes as
changes
For
we have
At the trivial fixed point
we have
,
so this point is stable for
.
At the nonzero fixed point
,
So stability
requires
At
,
the fixed point loses stability.
What replaces it?
Demo: change the growth parameter
Start from the same initial population, for example
Try:
Observe the long-time population.
From stability to oscillation
As
increases:
- A stable fixed population becomes unstable.
- The population begins alternating between two values.
- Then four values.
- Then eight.
- Eventually the motion becomes irregular.
This sequence is called period doubling:
The bifurcation diagram
For each
:
- Choose an initial condition
.
- Iterate many times to remove the transient behavior.
- Plot the next several values of
.
- Repeat for many values of
.
Deterministic chaos
In the chaotic regime, two nearby initial populations
can eventually produce very different trajectories.
The system is still completely deterministic.
There is no random number generator.
This is deterministic chaos:
simple equations + sensitivity to initial conditions +
long-time unpredictability
Review
Three maps, one idea
Newton-Raphson:
Which fixed point do we reach?
Mandelbrot:
Does the orbit remain bounded?
Logistic:
What long-time behavior emerges?
The computational pattern
For each problem:
- Choose a map
.
- Choose an initial condition.
- Iterate:
- Discard transient behavior when appropriate.
- Classify or visualize the long-time behavior.
- Repeat over many initial conditions or parameters.
A few lines of code can reveal structures that are very difficult to
anticipate analytically.
Takeaways
- An iterative numerical algorithm can be viewed as a
dynamical system.
- Fixed points can be attracting or repelling.
- Nonlinear iteration can generate fractal basin
boundaries.
- Changing a parameter can cause bifurcations and
qualitative changes in behavior.
- Deterministic systems can exhibit chaos and strong
sensitivity to initial conditions.
Simple deterministic rules can generate extraordinarily
complex behavior.