Category: Functions Level: 201
f(x + T) = f(x): period T = 2, amplitude 1
A periodic function repeats one cycle forever. The period is the length of one cycle, and the amplitude is half the distance from the lowest value to the highest.
Draw one ramp from (0, −1) up to (2, 1). The left end is solid and the right end is hollow, because the next cycle owns that spot.
f(x) = x - 1 on 0 ≤ x < 2
Paste the same ramp every 2 units, left and right. Shifting the graph by 2 lands it on itself, so f(x + 2) = f(x).
f(x + 2) = f(x)
Measure from the start of one cycle to the start of the next: 2 units. That length is the period.
period T = 2
The ramp runs from −1 to 1. The midline sits halfway at 0, and the amplitude is the distance from the midline to the top: 1.
amplitude = (max - min)/2 = (1 - (-1))/2 = 1
Same recipe, new cycle: stay at 1 for one unit, then drop to −1 for one unit. Copy every 2 units. It switches like a light that someone keeps flicking.
g(x) = 1 on [0, 1), -1 on [1, 2), g(x + 2) = g(x)
One cycle is still 2 units long, and the wave still swings 1 above and below the midline. Two different shapes, same period, same amplitude.
square wave: period 2, amplitude 1
cd svg-generator python3 -m svgmath render periodic-functions --out /tmp/periodic-functions
Source: svgmath/diagrams/function_families.py