Unit 8, lesson 111

Periodic Functions and Trigonometric Orthogonality

What periods, angular frequency and harmonics are, how an integral works as an inner product of functions, and why sines and cosines of different frequencies are orthogonal.

  • Theory part 221
  • Practice part 222
  • Periodic Functions and Orthogonality

A heartbeat, a vibrating string and the hum of a power line all repeat the same shape over and over. Functions that repeat are called periodic, and the simplest of them are sines and cosines. Before building other periodic functions out of these, you need one surprising fact. Over a full period, the product of two different harmonics always integrates to zero.

Key terms

Periodic functions

Definition A function ff defined on R\mathbb{R} is periodic with period T>0T > 0 if

f(x+T)=f(x)for every real x.f(x + T) = f(x) \qquad \text{for every real } x.

If TT is a period, so is every positive integer multiple nTnT. If ff is periodic with period TT and integrable over each bounded interval, its integral over any interval of length TT is the same,

∫cc+Tf(x) dx=∫0Tf(x) dxfor every real c.\int_c^{c+T} f(x) \, dx = \int_0^T f(x) \, dx \qquad \text{for every real } c.

In plain words Shift the graph sideways by TT and you get the same graph.

Example The functions sin⁡x\sin x and cos⁡x\cos x have period 2π2\pi, and so they also have periods 4π4\pi, 6π6\pi and so on. The fractional part x−⌊x⌋x - \lfloor x \rfloor, a sawtooth climbing from 00 toward 11 on each interval [n,n+1)[n, n + 1), has period 11.

Fundamental period

Definition The fundamental period of a periodic function is its smallest positive period, when one exists. Not every periodic function has one. A constant function has every T>0T > 0 as a period, so there is no smallest. If ff is continuous, periodic and not constant, then a fundamental period exists, and every period is an integer multiple of it.

In plain words It is the length of one full repeat. Most functions you meet have one, but constants are the exception.

Example The function sin⁡(3x)\sin(3x) has fundamental period 2π3\frac{2\pi}{3}, since

sin⁡(3(x+2π3))=sin⁡(3x+2π)=sin⁡(3x)\sin\Bigl(3\Bigl(x + \frac{2\pi}{3}\Bigr)\Bigr) = \sin(3x + 2\pi) = \sin(3x)

and no smaller shift of 3x3x than 2π2\pi leaves the sine unchanged for every xx. The sum sin⁡x+sin⁡(2x)\sin x + \sin(2x) has periods 2π2\pi and π\pi for its two parts, so 2π2\pi, the least common multiple, is a period of the sum. It is the fundamental period too. If TT is any period of f(x)=sin⁡x+sin⁡(2x)f(x) = \sin x + \sin(2x), then TT is also a period of f′′(x)+4f(x)=3sin⁡xf''(x) + 4f(x) = 3\sin x, and that forces TT to be a multiple of 2π2\pi. In general the least common multiple is a period of the sum but need not be the smallest one.

Angular frequency

Definition For a sinusoid Acos⁡(ωt+φ)A \cos(\omega t + \varphi) or Asin⁡(ωt+φ)A \sin(\omega t + \varphi) with A≠0A \neq 0 and ω>0\omega > 0, whose amplitude is ∣A∣\lvert A \rvert, the number ω\omega is the angular frequency, measured in radians per unit of tt. The fundamental period and the ordinary frequency are

T=2πω,ν=1T=ω2π.T = \frac{2\pi}{\omega}, \qquad \nu = \frac{1}{T} = \frac{\omega}{2\pi}.

In plain words Angular frequency counts how many radians the inside of the sine advances per unit of time. Divide by 2π2\pi to get full cycles per unit of time.

Example The signal sin⁡(4πt)\sin(4\pi t) with tt in seconds has ω=4π\omega = 4\pi radians per second. Its period is

T=2π4π=12T = \frac{2\pi}{4\pi} = \frac{1}{2}

second, and its frequency is ν=2\nu = 2 cycles per second.

Harmonics

Definition Fix a base period T>0T > 0 and put ω0=2πT\omega_0 = \frac{2\pi}{T}. For each integer n≥1n \ge 1 the nnth harmonic is the pair of functions

cos⁡(nω0t),sin⁡(nω0t),\cos(n \omega_0 t), \qquad \sin(n \omega_0 t),

with angular frequency nω0n \omega_0. Each harmonic has fundamental period Tn\frac{T}{n}, so TT is a period of every harmonic. The first harmonic is the fundamental.

In plain words Harmonics are the sine and cosine waves that fit into the base period a whole number of times. They are the building blocks for anything that repeats with period TT.

Example For T=2πT = 2\pi we have ω0=1\omega_0 = 1, and the harmonics are cos⁡(nx)\cos(nx) and sin⁡(nx)\sin(nx). The third harmonic sin⁡(3x)\sin(3x) completes three full cycles on [0,2π][0, 2\pi], and its graph returns to its starting point at x=2πx = 2\pi.

Inner product of functions

Definition For real functions ff and gg that are piecewise continuous on [a,b][a, b], their inner product on [a,b][a, b] is

⟨f,g⟩=∫abf(x) g(x) dx.\langle f, g \rangle = \int_a^b f(x) \, g(x) \, dx.

It is symmetric, ⟨f,g⟩=⟨g,f⟩\langle f, g \rangle = \langle g, f \rangle, linear in each argument, and satisfies ⟨f,f⟩≥0\langle f, f \rangle \ge 0. The norm of ff is ∥f∥=⟨f,f⟩\lVert f \rVert = \sqrt{\langle f, f \rangle}. Two functions are orthogonal on [a,b][a, b] if ⟨f,g⟩=0\langle f, g \rangle = 0.

In plain words This is the dot product for functions. Multiply the two functions point by point and add up with an integral instead of a sum.

Example On [0,1][0, 1],

⟨x,1⟩=∫01x dx=12,⟨x,x−23⟩=∫01(x2−2x3)dx=13−13=0.\langle x, 1 \rangle = \int_0^1 x \, dx = \frac{1}{2}, \qquad \left\langle x, x - \frac{2}{3} \right\rangle = \int_0^1 \left(x^2 - \frac{2x}{3}\right) dx = \frac{1}{3} - \frac{1}{3} = 0.

So xx and x−23x - \frac{2}{3} are orthogonal on [0,1][0, 1]. The norm of xx is

∥x∥=∫01x2 dx=13.\lVert x \rVert = \sqrt{\int_0^1 x^2 \, dx} = \frac{1}{\sqrt{3}}.

Sine and cosine orthogonality

Definition For integers m,n≥1m, n \ge 1,

∫−ππcos⁡(mx)cos⁡(nx) dx={0,m≠n,π,m=n,∫−ππsin⁡(mx)sin⁡(nx) dx={0,m≠n,π,m=n,\int_{-\pi}^{\pi} \cos(mx) \cos(nx) \, dx = \begin{cases} 0, & m \neq n, \\ \pi, & m = n, \end{cases} \qquad \int_{-\pi}^{\pi} \sin(mx) \sin(nx) \, dx = \begin{cases} 0, & m \neq n, \\ \pi, & m = n, \end{cases}∫−ππsin⁡(mx)cos⁡(nx) dx=0,∫−ππcos⁡(nx) dx=∫−ππsin⁡(nx) dx=0,∫−ππ1 dx=2π.\int_{-\pi}^{\pi} \sin(mx) \cos(nx) \, dx = 0, \qquad \int_{-\pi}^{\pi} \cos(nx) \, dx = \int_{-\pi}^{\pi} \sin(nx) \, dx = 0, \qquad \int_{-\pi}^{\pi} 1 \, dx = 2\pi.

So the functions 1,cos⁡x,sin⁡x,cos⁡2x,sin⁡2x,…1, \cos x, \sin x, \cos 2x, \sin 2x, \ldots are pairwise orthogonal on [−π,π][-\pi, \pi], and the same holds on any interval of length 2π2\pi. For period 2L2L the same statements hold for cos⁡nπxL\cos\frac{n\pi x}{L} and sin⁡nπxL\sin\frac{n\pi x}{L} on [−L,L][-L, L], with LL in place of π\pi in the nonzero values and 2L2L for the constant.

In plain words Two different harmonics, or a sine and a cosine, cancel each other out over a full period. Only a harmonic paired with itself leaves something behind.

Example The product to sum identity

cos⁡Acos⁡B=12(cos⁡(A−B)+cos⁡(A+B))\cos A \cos B = \frac{1}{2}\bigl(\cos(A - B) + \cos(A + B)\bigr)

gives

∫−ππcos⁡(2x)cos⁡(3x) dx=12∫−ππ(cos⁡x+cos⁡(5x))dx=0.\int_{-\pi}^{\pi} \cos(2x) \cos(3x) \, dx = \frac{1}{2} \int_{-\pi}^{\pi} \bigl(\cos x + \cos(5x)\bigr) dx = 0.

With m=n=3m = n = 3 instead,

∫−ππsin⁡2(3x) dx=∫−ππ1−cos⁡(6x)2 dx=π.\int_{-\pi}^{\pi} \sin^2(3x) \, dx = \int_{-\pi}^{\pi} \frac{1 - \cos(6x)}{2} \, dx = \pi.

Check yourself

  1. What is the fundamental period of cos⁡πx3\cos\frac{\pi x}{3}?
Show the answer

The angular frequency is ω=π3\omega = \frac{\pi}{3}, so

T=2ππ/3=6.T = \frac{2\pi}{\pi/3} = 6.
  1. What is the fundamental period of sin⁡(2x)+cos⁡(3x)\sin(2x) + \cos(3x)?
Show the answer

It is 2π2\pi. The parts have fundamental periods π\pi and 2π3\frac{2\pi}{3}, and 2π=2⋅π=3⋅2π32\pi = 2 \cdot \pi = 3 \cdot \frac{2\pi}{3}, so 2π2\pi is a period. No smaller T>0T > 0 works. A period TT of f(x)=sin⁡(2x)+cos⁡(3x)f(x) = \sin(2x) + \cos(3x) is also a period of f′′+9f=5sin⁡(2x)f'' + 9f = 5\sin(2x) and of f′′+4f=−5cos⁡(3x)f'' + 4f = -5\cos(3x), so TT is a multiple of both π\pi and 2π3\frac{2\pi}{3}, hence of 2π2\pi.

  1. Compute ∫−ππ(sin⁡x+2cos⁡(3x))2 dx\int_{-\pi}^{\pi} \bigl(\sin x + 2\cos(3x)\bigr)^2 \, dx using orthogonality.
Show the answer

Expanding the square gives

sin⁡2x+4sin⁡xcos⁡(3x)+4cos⁡2(3x).\sin^2 x + 4 \sin x \cos(3x) + 4\cos^2(3x).

The middle term integrates to 00, and the others give π+4π=5π\pi + 4\pi = 5\pi.

How this lesson connects

It also uses periodic functions and trig identities.