Loop Logic Slides Loop Logic
Introduction to Recursive Functions & Iteration
The Infinite Question
"Pick a number. Square it. Add the original number back. Now take that result and repeat the process... forever."
Start with 1:
1 → 2 → 6 → 42...
Start with 0:
0 → 0 → 0 → 0...
Start with -1:
-1 → 0 → -1 → 0...
Defining Iteration
Iteration is the repeated application of a function or process.
zn+1 = f(zn)
The output of one step becomes the input for the next.
Feedback Loop
The Complex Transition
Real Numbers
Movement along a single line.
Predictable: Grow, shrink, or bounce.
Complex Numbers
Movement in a 2D plane.
Chaotic: Spirals, orbits, and escapes.
The Mandelbrot Core
To find the Mandelbrot Set, we iterate this specific function:
f(z) = z2 + c
z (The Variable)
Usually starts at (0 + 0i).
c (The Parameter)
The specific point in the complex plane we are testing.
Quick Check
If \( f(z) = z^2 + 1 \) and we start with \( z_0 = 0 \):
Step 1: 0^2 + 1 = 1
Step 2: 1^2 + 1 = 2
Next Step?
The next result is 5. We are ready to head into the complex plane.
Iteration Station Worksheet Iteration Station
Recursive Functions & Complexity
Name:
Date:
Iteration is the process of repeating a function. We use the notation \( z_{n+1} = f(z_n) \), where the output of one step becomes the input for the next.
1 Real Number Warm-up
Given the function \( f(x) = x^2 - 1 \), calculate the first 4 iterations for the given starting values \( x_0 \).
Trial A: \( x_0 = 1 \)
f(x₀)
f(x₁)
f(x₂)
Trial B: \( x_0 = 2 \)
f(x₀)
f(x₁)
f(x₂)
2 Moving to the Complex Plane
Recall: \( (a + bi)^2 = a^2 - b^2 + 2abi \)
Problem: Let \( f(z) = z^2 + (1 + i) \). Find the first two iterations starting at \( z_0 = 0 \).
Step 1: Calculate \( z_1 = f(z_0) \)
Step 2: Calculate \( z_2 = f(z_1) \)
3 Escape or Containment?
Compare your results from Part 1. In Trial A, the numbers stayed small (bounded). In Trial B, the numbers grew rapidly (escaped to infinity).
Predict: Based on your calculation in Part 2, do you think that orbit will escape or stay bounded? Why?
Recursive Roots Teacher Guide Recursive Roots
Teacher Facilitation Guide | Lesson 1
Instructional Sequence
05m
The Hook
Present the squaring challenge. Ask students to mentally compute the first few steps for x=1 and x=0.5. Notice the divergent behavior (1 grows, 0.5 shrinks).
15m
Direct Instruction: Loop Logic
Use the slides to define iteration and recursive functions. Focus on the transition to complex numbers. Remind students that \( i^2 = -1 \).
25m
Guided Lab: Iteration Station
Students work through the Iteration Station worksheet. Circulate and check Part 2 calculations—this is where most arithmetic errors occur.
Discussion Prompts
"Why does the value of \( c \) act like a 'steering wheel' for the function?"
"What is the difference between an orbit that stays near the origin and one that zooms off to infinity?"
"Predict: Is there a starting number that stays perfectly still?" (Answer: Fixed points where f(z) = z).
Common Misconceptions
Squaring Errors
Students often calculate \((1+i)^2\) as \(1^2 + i^2 = 1 - 1 = 0\), forgetting the middle term \(2i\).
Notation Confusion
Ensure they distinguish between \(z_n\) (the n-th term) and \(z \times n\).
Materials Checklist
Loop Logic Slides
Iteration Station Worksheet
Calculators (Optional)
Standards Alignment
HSN-CN.A.2: Use the relation i^2 = -1 and the commutative, associative, and distributive properties to add, subtract, and multiply complex numbers.
Orbit Navigator Slides Orbit Navigator
Tracking Paths Through the Complex Plane
The Orbit
An orbit is the sequence of points generated by repeatedly applying a function.
"The path a point takes as it is transformed again and again."
Start Point
z₀ = 0
Sequence
{z₀, z₁, z₂, z₃ ...}
Plotting Movement
Imaginary (i)
Real
Three Destinies:
Fixed/Bounded
Stays trapped in a circle or cycle.
Escaping
Grows infinitely large.
Chaotic
Moves unpredictably without escaping.
The Computation
Remember, squaring a complex number isn't just squaring two parts!
(a + bi)2 = (a2 - b2) + (2ab)i
Example: (1 + i)2
1² - 1² + 2(1)(1)i = 2i
Example: (0 + 0.5i)2
0² - (0.5)² + 0i = -0.25
Path Finder Lab
In your workshop today, you will track the destiny of three different complex numbers. Which ones will escape, and which will stay forever?
Start Calculating
Path Finder Lab Path Finder Lab
Tracking Complex Destinies
NAME:
PERIOD:
Calculus Rulebook
zn+1 = zn2 + c
Start with \( z_0 = 0 \). Plug it in to find \( z_1 \). Plug \( z_1 \) in to find \( z_2 \), and so on.
The Escape Rule
If the magnitude of any \( z_n \) becomes greater than 2 , the point will eventually escape to infinity.
Experiment Alpha: \( c = i \)
Start: 0 + 0i
z₁ = 0² + i
z₂ = z₁² + i
z₃ = z₂² + i
Experiment Beta: \( c = 1 \)
Start: 0 + 0i
z₁ = 0² + 1
z₂ = z₁² + 1
z₃ = z₂² + 1
Experiment Gamma: \( c = -1 \)
Start: 0 + 0i
z₁ = 0² - 1
z₂ = z₁² - 1
z₃ = z₂² - 1
Final Verdict
Experiment Orbit Behavior (Cycle, Grows, Constant?) Inside or Outside Set? Alpha (c = i) Beta (c = 1) Gamma (c = -1)
Path Finder Key Path Finder Answer Key
Teacher Reference Only
Experiment Alpha: c = i
z₁
0 + i
z₂
-1 + i
(-i)² + i = -1 + i
z₃
-i
(-1+i)² + i = (1-1-2i)+i = -i
Next step z₄ = -i² + i = -1 + i. The orbit cycles between -1+i and -i.
Experiment Beta: c = 1
z₁
1
z₂
2
z₃
5
Clearly escaping. Since |z₂| = 2, it is guaranteed to escape.
Experiment Gamma: c = -1
z₁
-1
z₂
0
z₃
-1
Perfect Cycle: -1, 0, -1, 0... This point is "In the Set".
Final Verdict Summary
Experiment Orbit Behavior Inside or Outside? Alpha (c = i) 2-Cycle (-1+i, -i) INSIDE Beta (c = 1) Diverges to ∞ OUTSIDE Gamma (c = -1) 2-Cycle (-1, 0) INSIDE
Mandelbrot Map Slides Mandelbrot Map
Defining the Boundary of Infinite Complexity
What is the Set?
The Mandelbrot Set is the set of all complex numbers \( c \) for which the orbit of \( z_0 = 0 \) under the iteration \( f(z) = z^2 + c \) remains bounded.
In the Set: Bounded Orbit
Outside the Set: Escapes to ∞
The "2" Rule
Mathematically, if the magnitude of any number in the orbit exceeds 2, it is guaranteed to escape.
|zn| > 2
This is the "Point of No Return".
Safety Zone
EXIT
Testing c = -0.5
z₀
0
z₁
-0.5
z₂
-0.25
(-.5)² - .5
z₃
-0.4375
Verdict: Bounded! c = -0.5 is IN the set.
Why the pretty colors?
The Black center is the set itself (the bounded points).
The Colors outside represent how fast the point escaped.
Escaped in 2 steps
Escaped in 5 steps
Escaped in 20 steps
Never escaped
Boundary Patrol Worksheet Boundary Patrol
Classification of Complex Points
Investigator:
Mission Briefing
Your job is to classify four test points in the complex plane. You must perform the iteration \( z_{n+1} = z_n^2 + c \) until the orbit either escapes (|z| > 2) or shows signs of stability (cycling or shrinking).
Point A: \( c = 0.5 \)
Pure Real
z₀ = 0 |z₀| = 0
z₁ = 0.5 |z₁| = 0.5
In Set
Out of Set
Point B: \( c = -2 \)
Pure Real
z₀ = 0 |z₀| = 0
In Set
Out of Set
Point C: \( c = -0.1 + 0.1i \)
Complex
Hint: |z₁| is very small.
In Set
Out of Set
Point D: \( c = 0.3 + 0.5i \)
Complex
In Set
Out of Set
Reflect:
Which point was the hardest to classify? Why? Did any point surprise you by staying bounded or escaping quickly?
Escape Velocity Cheat Sheet Escape Velocity Cheat Sheet
Complex Modulus & Boundedness Reference
1. Magnitude (Modulus)
To check if a number "escapes" (>2), calculate its distance from zero.
|a + bi| = √(a² + b²)
If |z|² > 4, then |z| > 2 (it escapes!)
2. Boundedness Logic
|z| ≤ 2 : SAFE. Keep iterating.
|z| > 2 : ESCAPE. Stop calculation.
Squaring Reference Chart
| Input (z) | z² Calculation | Result (z²) | Modulus |z| |
| --- | --- | --- | --- |
| 0.5 + 0.5i | 0.25 - 0.25 + 0.5i | 0.5i | 0.707 |
| 1 + i | 1 - 1 + 2i | 2i | 2.0 (On Edge) |
| 0.2 - 0.4i | 0.04 - 0.16 - 0.16i | -0.12 - 0.16i | 0.447 |
| i | i² | -1 | 1.0 |
| -1 + i | 1 - 1 - 2i | -2i | 2.0 (On Edge) |
Radius 2
The "Mandelbrot Boundary" Tip
Most interesting activity happens near the boundary of the set. Points very deep inside (near 0) or very far outside (beyond 2 on the Real axis) are predictable. The "chaos" lives in the transitions!
Real Min: -2.0
Real Max: 0.47
Julia Twin Slides Julia Twins
Changing the Game: Fixing the Constant
Mandelbrot vs. Julia
Mandelbrot Set
f(z) = z2 + c
✅ Start at z₀ = 0
✅ Vary the value of c
One unique set.
Julia Set
f(z) = z2 + c
✅ Fix c as a constant
✅ Vary the start z₀
Infinite different sets.
The Julia Landscape
Every single point \( c \) in the Mandelbrot Set corresponds to a unique Julia Set.
c = 0
A perfect circle.
c = -1
Dendrite patterns.
c = 0.3 + 0.5i
Fractal dust.
The Great Connection
If \( c \) is INSIDE the Mandelbrot Set...
The Julia Set is connected (one piece).
If \( c \) is OUTSIDE the Mandelbrot Set...
The Julia Set is disconnected (dust).
Parameter Shift
In the next lab, you will fix \( c = -0.75 \) and test different starting points to see where the boundary of this specific Julia Set lies.
Parameter Shift Lab Parameter Shift Lab
Varying Origins for a Fixed Constant
Researcher:
Lab Constraints
For this entire lab, we fix the constant \( c = -0.75 \) . This value is inside the Mandelbrot Set, so we expect a connected Julia Set. Your task is to see which starting points (\( z_0 \)) stay bounded.
Function: f(z) = z² - 0.75
Test Case 1: \( z_0 = 0.5 \) Start with a real number
Calculations
z₁ = (.5)² - .75 =
z₂ = (z₁)² - .75 =
Outcome
Bounded
Escapes
Test Case 2: \( z_0 = 1.5 \) Start further from origin
Calculations
z₁ = (1.5)² - .75 =
z₂ = (z₁)² - .75 =
Outcome
Bounded
Escapes
Test Case 3: \( z_0 = i \) Start on imaginary axis
Calculations
z₁ = (i)² - .75 =
Hint: |z₁| = 1.75
Outcome
Bounded
Escapes
Critical Comparison
In Lesson 3, we varied \( c \) and started at \( 0 \). In Lesson 4, we fixed \( c \) and varied \( z_0 \). Based on your calculations above, which variable seems more "sensitive" to small changes: the constant \( c \) or the starting point \( z_0 \)?
Julia Set Strategies Julia Set Strategies
Teacher Facilitation Guide | Lesson 4
Instructional Sequence
10m
The Julia Transition
Explain the shift from "Testing Points in the Plane" (Mandelbrot) to "Testing Starting Locations for a Fixed Point" (Julia). Use the circle example (c=0) to ground them.
20m
The Great Connection
Discuss the relationship between the two sets. This is a profound mathematical connection: the Mandelbrot Set is like an "index" or "atlas" of all connected Julia Sets.
20m
Parameter Shift Lab
Students test starting points for c=-0.75. This specific value generates a "San Marco Dragon" fractal (though they are only calculating a few points).
Key Insights to Drive Home
"Every point on the complex plane belongs to the Mandelbrot Set, OR it defines its own Julia Set."
"The Mandelbrot Set acts as a map of the Julia Sets' behavior."
"Fractals aren't just one image; they are a family of relationships."
Calculation Support
In Case 3 (z₀ = i):
z₁ = i² - 0.75 = -1 - 0.75 = -1.75
z₂ = (-1.75)² - 0.75 = 3.0625 - 0.75 = 2.3125
|z₂| > 2 (Escapes!)
Quick Check
If students ask why we always start Mandelbrot at 0: starting at 0 is the "critical point" of the function f(z)=z²+c. It is the point whose orbit determines if any part of the Julia Set is connected.
Visual Aid Tip
If you have access to a fractal generator online (like Geogebra), show a "Julia/Mandelbrot Explorer" where moving the mouse on the Mandelbrot Set updates the Julia Set live.
Chaos Architect Project Chaos Architect
Fractal Generation Project
MAPPING INFINITY
The Objective
You are a human graphics processor. Your task is to generate a low-resolution Pixel Map of the boundary of the Mandelbrot Set. By calculating the stability of 24 specific points on a coordinate grid, you will reveal the emergent shape of the most famous fractal in mathematics.
Your Workflow:
1 Assign the coordinate of each grid cell as your constant \( c \) .
2 Iterate \( f(z) = z^2 + c \) starting at \( z_0 = 0 \).
3 Check for escape at each step. If |z| > 2 , the cell is OUT.
4 Color the grid: Black if the point stays bounded after 3 iterations; Shaded if it escapes quickly.
Project Requirements
Show work for 5 "Critical Points"
Complete the 4x6 Pixel Map
Label the Real & Imaginary axes
Identify the "Main Cardioid" area
Scoring Rubric
Accuracy 40 pts
Points are correctly categorized as In or Out of the set.
Arithmetic Proof 30 pts
Calculations for 5 sample points are clear and correct.
Visual Representation 30 pts
Grid is neatly colored and labeled appropriately.
Architect's Quote
"Bottomless wonders spring from simple rules, repeated without end."
Pixel Plotter Sheet Pixel Plotter Sheet
The Grid of Infinity
NAME:
Critical Point Calculations
Choose any 5 points from the grid and show your work for 3 iterations each.
The Mandelbrot Scan (z₀ = 0)
+1.0i +0.5i 0.0i -0.5i -1.0i
-1.5, 1.0
-1.0, 1.0
-0.5, 1.0
0.0, 1.0
0.5, 1.0
1.0, 1.0
-1.5, 0.5
-1.0, 0.5
-0.5, 0.5
0.0, 0.5
0.5, 0.5
1.0, 0.5
-1.5, -0.5
-1.0, -0.5
-0.5, -0.5
0.0, -0.5
0.5, -0.5
1.0, -0.5
-1.5, -1.0
-1.0, -1.0
-0.5, -1.0
0.0, -1.0
0.5, -1.0
1.0, -1.0
-1.5 -1.0 -0.5 0.0 0.5 1.0
Architect's Post-Analysis
Look at your colored grid. Describe the shape that is forming. Does it look symmetrical? On which axis? If you had a 1000x1000 grid instead of 4x6, what features would you expect to see appearing near the edges?
Fractal Finale Exit Ticket Fractal Finale
Exit Ticket | End of Sequence
Student ID:
01 Which of the following defines the Mandelbrot Set?
The set of points \( c \) where the orbit of \( z_{n+1} = z_n^2 + c \) starting at \( z_0 = 0 \) is unbounded.
The set of points \( c \) where the orbit of \( z_{n+1} = z_n^2 + c \) starting at \( z_0 = 0 \) is bounded.
The set of points \( z_0 \) where the orbit of \( z_{n+1} = z_n^2 + 1 \) remains constant.
02 If an orbit reaches a value of \( z_n = 1.5 + 1.5i \), is it guaranteed to escape to infinity? Explain using the Modulus Rule.
03 Essential Question Reflection: How can a single, simple arithmetic rule like \( f(z) = z^2 + c \) generate infinite visual complexity?