Precalculus · F.TF.B.5

Periodic functions

A swing ride at a carnival goes out and back, out and back, all evening. If you know one trip exactly, do you know every moment of the ride?

Where you are 8 in Trigonometric functions and their graphs

Why this exists

Many quantities come back to where they were and then do the same thing again: the position of a carnival swing ride, the color of a stoplight, the height of a point on a turning wheel. For such a quantity a long table is wasteful. One full repetition, together with its length, already tells everything.

Periodicity and the periodicity identities showed that each trigonometric value comes back after a full turn. This lesson names the idea for any function: what it means to repeat, what one repetition is, and how long it lasts.

Definition

A function f is periodic when some positive number P shifts the input without changing the output:

f(x + P) = f(x)

for every x in the domain, with x + P in the domain exactly when x is. Such a P is a repeat shift of f.

The period of a periodic function is its smallest repeat shift, when a smallest one exists. On a graph it is a horizontal length, measured along the input axis.

A cycle is the part of the graph over any input interval exactly one period long, such as a \le x < a + P. Any starting point a gives a cycle.

The outputs need not be numbers. A stoplight’s color as a function of time is periodic too.

Intuition

Think of a cycle as a tile. Cut out the graph over one period, make copies, and lay them end to end in both directions. The result is the whole graph, and nothing in it is new.

−2 2 4 6 8 10 3 x y
P = 4
Figure 1One cycle (shaded) is the whole function. Lay copies of it end to end, each P = 4 units wide, and the graph is complete.

Sliding the graph right by P moves every tile onto the next one, so the shifted graph sits exactly on the original. That is what f(x + P) = f(x) says. Any shorter slide leaves some point out of place.

Results

Multiples of a repeat shift. If P is a repeat shift of f, then f(x + nP) = f(x) for every integer n, negative ones included.

Every repeat shift is a multiple of the period. If f has period P, its repeat shifts are exactly P, 2P, 3P, \ldots

One cycle decides everything. If f has period P, then f(x) = f(x - nP) for every integer n. Choosing n so that x - nP lands in one known cycle gives f(x).

Combining two cycles. If f has period p, g has period q, and p and q are whole numbers of the same unit with least common multiple L, then the pair of outputs \big(f(x), g(x)\big) has period exactly L. Their sum and product repeat after L as well, but L need not be their period: it can be shorter, or missing altogether, as in Exercise 14, where \sin x and \sin(x + \pi) both have period 2\pi and their sum is 0.

Sine, cosine, secant and cosecant have period 2\pi; tangent and cotangent have period \pi, as Periodicity and the periodicity identities proves.

Why it is true

Multiples. f(x + 2P) = f\big((x + P) + P\big) = f(x + P) = f(x), and so on for any positive n. For -P, put x - P in place of x: f(x) = f\big((x - P) + P\big) = f(x - P).

Every repeat shift is a multiple. Let s be a repeat shift and n the largest integer with nP \le s. Then r = s - nP satisfies 0 \le r < P, and f(x + r) = f(x + s - nP) = f(x). If r > 0 it would be a repeat shift smaller than the period, so r = 0 and s = nP.

Combining. A shift leaves the pair unchanged exactly when it is a repeat shift of f and of g, so it is a multiple of p and of q. The smallest positive common multiple is L.

Worked examples

Example 1

Reading the period from a graph

The function g in the figure above is made of straight pieces and repeats forever in both directions. Find its period, and find g(29.5), g(-5.5) and g(43).

Solution

The pattern from x = 0 to x = 4 is: up from 0 to 3, level at 3, down to 0, level at 0. The same pattern runs from 4 to 8, so 4 is a repeat shift.

Nothing smaller works. The graph is at height 3 only on the flat tops 1 \le x \le 2, 5 \le x \le 6, and so on, one every 4 units. A repeat shift must carry the top over [1, 2] onto a top, so it is a multiple of 4. The period is P = 4. Half a cycle fails, for example: g(0) = 0 but g(2) = 3.

Now reduce each input into the cycle 0 \le x < 4 by removing multiples of 4:

\begin{aligned} g(29.5) &= g(29.5 - 28) = g(1.5) = 3 \\ g(-5.5) &= g(-5.5 + 8) = g(2.5) = 1.5 \\ g(43) &= g(43 - 40) = g(3) = 0 \end{aligned}

On the falling piece from (2, 3) to (3, 0) the height drops 3 per unit, so g(2.5) = 1.5.

Example 2

Reading the period from a table

Tenoch rides a carnival swing ride whose gondola swings east and west of the ride’s center. His east position x(t), in meters (negative means west), recorded each second from t = 0 to t = 12, is

0,\ 4,\ 6,\ 4,\ 0,\ -4,\ -6,\ -4,\ 0,\ 4,\ 6,\ 4,\ 0

Find the period, and his position at t = 50 and t = 75, assuming the pattern continues.

Solution

The readings from t = 8 on copy those from t = 0, so 8 is a repeat shift. Shift 4 fails even though x(0) = x(4) = 0: x(1) = 4 but x(5) = -4. Passing the center going east and going west are different moments of the swing. Every other shift from 1 to 7 moves the 6 at t = 2 onto a value that is not 6. The period is 8 seconds.

To find x(50), remove six cycles: 50 - 48 = 2, so x(50) = x(2) = 6. For x(75), remove nine: 75 - 72 = 3, so x(75) = x(3) = 4.

A table can rule a shift out but never prove one in: that the ride keeps repeating between and beyond the readings is an assumption about the ride.

Example 3

A sawtooth

The fractional part f(x) = x - \lfloor x \rfloor uses the Step functions and the greatest integer function. Show that f has period 1, and find f(7.25) and f(-2.6).

Solution

Adding 1 to x adds 1 to the greatest integer below it: \lfloor x + 1 \rfloor = \lfloor x \rfloor + 1. So

f(x + 1) = (x + 1) - (\lfloor x \rfloor + 1) = x - \lfloor x \rfloor = f(x)

and 1 is a repeat shift. For 0 < p < 1, f(0) = 0 but f(p) = p \ne 0, so no smaller shift works and the period is 1.

−2 −1 1 2 3 x y
y = 1
Figure 2The sawtooth f(x) = x - \lfloor x \rfloor. Each tooth starts at a filled dot and ends at an open one.

Then f(7.25) = 7.25 - 7 = 0.25. Since \lfloor -2.6 \rfloor = -3 (the greatest integer below -2.6 is -3, not -2), f(-2.6) = -2.6 - (-3) = 0.4. The teeth are the shape of a repeating signal that rises steadily and then resets.

Example 4

A stoplight

Atzin times the stoplight near the carnival: green for 40 seconds, then yellow for 5, then red for 45, then green again. Measure t in seconds from the moment the light turns green. What color is it at t = 1{,}000 and at t = 1{,}250? How many full cycles does it run in one hour?

Solution

One cycle is green, yellow, red, so the period is 40 + 5 + 45 = 90 seconds. In the cycle 0 \le t < 90 the light is green for 0 \le t < 40, yellow for 40 \le t < 45 and red for 45 \le t < 90.

Since 1{,}000 = 11 \cdot 90 + 10, the light at t = 1{,}000 shows its color at t = 10: green. Since 1{,}250 = 13 \cdot 90 + 80, it shows the color at t = 80: red.

One hour is 3{,}600 seconds and \displaystyle \frac{3{,}600}{90} = 40, so the light runs 40 full cycles.

Example 5

A period shorter than expected

Find the period of h(x) = |\sin x|.

Solution

Sine has period 2\pi, so 2\pi is a repeat shift of h. But a half turn already works. From Periodicity and the periodicity identities, \sin(x + \pi) = -\sin x, so

h(x + \pi) = |\sin(x + \pi)| = |-\sin x| = h(x)

To see that nothing smaller works, take 0 < p < \pi: h(0) = 0, while \sin p > 0, so h(p) \ne 0. The period is \pi. The absolute value folds the negative half of each sine cycle up onto the positive half.

Example 6

Two cycles at once

Sota watches the same swing ride. The gondola has period 8 seconds, and the ride’s colored lights run a pattern with period 6 seconds. At t = 0 the gondola is at the center heading east and the lights are starting their pattern. When is the whole scene next exactly as it was at t = 0?

Solution

The scene is the pair (gondola position, light pattern). By the result on combining cycles, a shift leaves the pair unchanged only when it is a multiple of 8 and a multiple of 6. Of the multiples 8, 16, 24, \ldots, the first that is a multiple of 6 is 24. So the scene first repeats at t = 24 seconds, after \displaystyle \frac{24}{8} = 3 gondola cycles and \displaystyle \frac{24}{6} = 4 light cycles.

Example 7

A wiggle that is not periodic

Show that k(x) = x + \sin x is not periodic, even though \sin x is.

Solution

Suppose some P > 0 were a repeat shift. Then k(P) = k(0) = 0, that is, P + \sin P = 0. If 0 < P \le \pi then \sin P \ge 0, so P + \sin P > 0. If P > \pi then \sin P \ge -1, so P + \sin P \ge P - 1 > 0. Either way P + \sin P \ne 0, so no repeat shift exists.

x y
\pi
2\pi
3\pi
4\pi
y = x
y = x + \sin x
Figure 3y = x + \sin x wiggles in a regular way but keeps climbing, so it never repeats.

The graph wiggles around y = x with the rhythm of sine, but k(x + 2\pi) = x + 2\pi + \sin x = k(x) + 2\pi: every 2\pi it is 2\pi higher. A regular rhythm is not enough; the outputs themselves must come back.

Boundaries

Not every periodic function has a period. A constant function satisfies c(x + P) = c(x) for every P > 0, so there is no smallest repeat shift.

Equal heights are not enough. Two points at the same height are a period apart only if the whole graph matches under that shift.

Data shows a pattern, not a proof. A table covers finitely many inputs. That a real quantity keeps repeating is part of the model; tides and daylight are only nearly periodic.

The domain must repeat too. A function defined only for 0 \le x \le 10 cannot be periodic, because 10 + P is outside its domain.

Two cycles may never line up. Lengths 1 and \displaystyle \sqrt{2} have no common multiple, since \displaystyle m = n\sqrt{2} has no solution in positive integers, so the pair of two such cycles is not periodic.

Where this goes next

The first periodic graphs studied in detail are the graphs of sine and cosine, where one cycle is one trip around the unit circle. Amplitude, period and phase shift names how tall a wave is, how long a cycle lasts and how far it is shifted; Finding the period from the equation reads the period from a formula, and Writing an equation from a wave reads a cycle off a picture.

Repeating quantities such as tides and daylight become models built from one measured cycle. And because a periodic function takes each output again and again, it is never one to one, which is why inverse trigonometric functions keep only one slice of a cycle.

Exercises

Reading a period from data

Assume each pattern continues.

  1. The values of a function at x = 0, 1, 2, \ldots, 10 are 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2. Find its period.
  2. The values of a function at x = 0, 1, 2, \ldots, 12 are 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0. Find its period.
  3. On a smaller swing ride, Atzin’s east position w(t) in meters at t = 0, 1, 2, \ldots, 10 seconds is 5, 3, -3, -5, -3, 3, 5, 3, -3, -5, -3. Find the period, w(40) and w(75).

Using a known period

  1. A function f has period 5, with f(2) = 7 and f(3) = -1. Find f(12), f(-8) and f(23).
  2. A function q has period 3 and q(x) = x^2 for 0 \le x < 3. Find q(7.5), q(-1) and q(10).
  3. With f(x) = x - \lfloor x \rfloor, find f(12.7), f(-0.3) and f(-5).
  4. Let \displaystyle r(x) = x - 2\left\lfloor \frac{x}{2} \right\rfloor. Show that r(x + 2) = r(x), and find r(5.5) and r(-0.5).
  5. A second stoplight is green for 35 seconds, yellow for 4, then red for 41. With t measured from the start of green, what color is it at t = 500, t = 517 and t = 1{,}000?
  6. The warning light on the swing ride is on for 0.2 seconds, then off for 0.6 seconds, over and over, starting with on at t = 0. Is it on or off at t = 4.1? At t = 10.1?
  7. Tenoch’s favorite swing ride has period 9 seconds. How many full cycles does it make in 3 minutes? After 135 seconds, where is the gondola in its cycle?

Periods of formulas

  1. Find the period of |\cos x|.
  2. Find the period of \sin^2 x.
  3. Find the period of 3 - 2\cos x.
  4. Let m(x) = \sin x + \sin(x + \pi). Is m periodic? Does it have a period?

Combining cycles

  1. A swing ride’s gondola has period 10 seconds and its light pattern has period 4 seconds. Both start together at t = 0. When is the whole scene next as it was at t = 0?
  2. Sota notices the ride’s music loop lasts 18 seconds, and the gondola of another swing ride has period 12 seconds. If both start together, when do they next start together, and how many cycles has each made?

Reasoning

  1. Show that if f(x + P) = f(x) for every x, then f(x - P) = f(x) and f(x + 3P) = f(x).
  2. Explain why a constant function is periodic but has no period.
  3. Show that f(x) = x^2 is not periodic.
  4. Looking at the values in Exercise 1, Sota says the period is 2 because the value is 4 at both x = 1 and x = 3. Explain what is wrong.
  5. Show that \sin|x| is not periodic.
  6. If f has period P and g is any function whose domain contains every output of f, explain why g\big(f(x)\big) repeats after P. Must P be its period?
Answers
  1. Period 4. Shifting by 4 copies the list (1, 4, 2, 4 repeats). Shift 2 fails: the value at 0 is 1 but at 2 it is 2. Shifts 1 and 3 fail at x = 0 too, since the values at 1 and 3 are 4.
  2. Period 6. The block 0, 2, 2, 0, -2, -2 repeats. Shift 3 fails, since the value at 1 is 2 but at 4 it is -2; shifts 1, 2, 4 and 5 fail at x = 0 or x = 1.
  3. Period 6 seconds. w(40) = w(40 - 36) = w(4) = -3 and w(75) = w(75 - 72) = w(3) = -5.
  4. f(12) = f(12 - 10) = f(2) = 7; f(-8) = f(-8 + 10) = f(2) = 7; f(23) = f(23 - 20) = f(3) = -1.
  5. q(7.5) = q(1.5) = 2.25; q(-1) = q(2) = 4; q(10) = q(1) = 1.
  6. f(12.7) = 12.7 - 12 = 0.7; f(-0.3) = -0.3 - (-1) = 0.7; f(-5) = -5 - (-5) = 0.
  7. \displaystyle \left\lfloor \frac{x + 2}{2} \right\rfloor = \left\lfloor \frac{x}{2} + 1 \right\rfloor = \left\lfloor \frac{x}{2} \right\rfloor + 1, so \displaystyle r(x + 2) = x + 2 - 2\left\lfloor \frac{x}{2} \right\rfloor - 2 = r(x). Then r(5.5) = 5.5 - 2 \cdot 2 = 1.5 and r(-0.5) = -0.5 - 2(-1) = 1.5.
  8. Period 35 + 4 + 41 = 80; green for 0 \le t < 35, yellow for 35 \le t < 39, red for 39 \le t < 80. 500 = 6 \cdot 80 + 20: green. 517 = 6 \cdot 80 + 37: yellow. 1{,}000 = 12 \cdot 80 + 40: red.
  9. Period 0.8 seconds, on for 0 \le t < 0.2 in each cycle. 4.1 = 5(0.8) + 0.1: on. 10.1 = 12(0.8) + 0.5: off.
  10. 3 minutes is 180 seconds, and \displaystyle \frac{180}{9} = 20 full cycles. 135 = 15 \cdot 9, so after 135 seconds the gondola is exactly where it started, moving the same way.
  11. Period \pi. |\cos(x + \pi)| = |-\cos x| = |\cos x|. For 0 < p < \pi, the value at \displaystyle x = \frac{\pi}{2} is 0, but \displaystyle \cos\left(\frac{\pi}{2} + p\right) \ne 0.
  12. Period \pi. \sin^2(x + \pi) = (-\sin x)^2 = \sin^2 x. For 0 < p < \pi, \sin^2 0 = 0 but \sin^2 p > 0.
  13. Period 2\pi. It repeats after 2\pi because cosine does. Its largest value, 5, occurs only where \cos x = -1, at x = \pi + 2\pi n; a repeat shift must carry x = \pi to another such point, so it is a multiple of 2\pi.
  14. \sin(x + \pi) = -\sin x, so m(x) = 0 for every x. It is periodic (every P > 0 is a repeat shift) but has no period, since there is no smallest positive repeat shift.
  15. The least common multiple of 10 and 4: t = 20 seconds (two gondola cycles, five light cycles).
  16. The least common multiple of 12 and 18 is 36 seconds; the gondola has made 3 cycles and the music 2 loops.
  17. Put x - P in place of x: f(x) = f\big((x - P) + P\big) = f(x - P). And f(x + 3P) = f(x + 2P) = f(x + P) = f(x), using the definition three times.
  18. c(x + P) = c(x) for every P > 0, so it is periodic. Half of any positive repeat shift is a smaller one, so no smallest exists.
  19. If P > 0 were a repeat shift, then P^2 = f(0 + P) = f(0) = 0, so P = 0, a contradiction.
  20. A repeat shift must match every point, not one pair. Shifting by 2 sends x = 0, value 1, to x = 2, value 2. The period is 4.
  21. For x \ge 0 it equals \sin x, so a repeat shift P must work for sine at every x \ge 0; at \displaystyle x = \frac{\pi}{2} that forces P = 2\pi k with k \ge 1. But at \displaystyle x = -\frac{\pi}{2} the value is \displaystyle \sin\frac{\pi}{2} = 1, while at \displaystyle 2\pi k - \frac{\pi}{2} > 0 it is \displaystyle \sin\left(2\pi k - \frac{\pi}{2}\right) = -1. So no P works.
  22. g\big(f(x + P)\big) = g\big(f(x)\big) because the inside is unchanged. P need not be the period: with f = \sin and g the absolute value, |\sin x| has period \pi, smaller than 2\pi.
kg1128 · updated 2026-10-20 · CC-BY-SA-4.0