# Administrative Information
- **Class Meeting**: Monday, September 21, 2026, 1:00โ1:50pm โ **Coolbaugh 212**
- Previous meeting: [[MATH310F26(Day 10) - Hearing the Fourier transform]]
- ๐ [[Teaching/MATH310/MATH310F26/Administration/MATH310_F26_Syllabus_1.0.pdf|MATH 310 F26 Syllabus, v1.0]]
> [!info]- Admin. Notes
> Expect an LR and WB for each lecture. WBs target 15-minute engagements (longer early on); LRs are short, ~5 minutes.
>
> - ๐ฏ **[LR] [Day 11 Reflection Questions](https://elearning.mines.edu/courses/81632/quizzes/121361)** โ 4 questions drawn from today's material, unlimited attempts, highest kept โ due **Wednesday 9/23, 11:59pm**
> - ๐ฏ **[LR] [Day 11 Reflection Statement](https://elearning.mines.edu/courses/81632/quizzes/121362)** โ one free response, no wrong answers โ due **Wednesday 9/23, 11:59pm**
> - ๐ฏ **[LR] [Day 10 Reflection Questions](https://elearning.mines.edu/courses/81632/quizzes/121340)** โ 4 questions drawn from Friday's material, unlimited attempts, highest kept โ due **Monday 9/21, 11:59pm**
> - ๐ฏ **[LR] [Day 10 Reflection Statement](https://elearning.mines.edu/courses/81632/quizzes/121341)** โ one free response, no wrong answers โ due **Monday 9/21, 11:59pm**
> - ๐ฏ **[MP] [One Question, and the First Arrow](https://elearning.mines.edu/courses/81632/quizzes/121327)** โ read [[MATH310F26 - The Modeling Cycle (Part 1)]] first; Canvas questionnaire or the two-sided form โ due **Friday 9/25, 11:59pm**
> - ๐ฏ **[WB] [Workbook 6](https://elearning.mines.edu/courses/81632/assignments/586618)** ยท [[MATH310F26_WB6.pdf|blank]] ยท [[MATH310F26(Workbook 6 Companion) - What a conjugate pair extracts|companion]]
> - ๐ฏ **[WB] [Workbook 7](https://elearning.mines.edu/courses/81632/assignments/586619)** ยท [[MATH310F26_WB7.pdf|blank]] ยท [[MATH310F26(Workbook 7 Companion) - Two tones and a constant, transformed|companion]]
> - ๐ฏ **[WB] [Workbook 8](https://elearning.mines.edu/courses/81632/assignments/587522)** โ a constant and Fourier series; upload one PDF
> - ๐ [[MATH310F26_WB8.pdf|Workbook 8 (blank, 1 page)]]
> - Start with the companion: [[MATH310F26(Workbook 8 Companion) - One tone, and the integral that finds it]]
> - ๐ฏ **[WB] [Workbook 9](https://elearning.mines.edu/courses/81632/assignments/587523)** โ from complex modes to sinusoids; upload one PDF
> - ๐ [[MATH310F26_WB9.pdf|Workbook 9 (blank, 1 page)]]
> - Start with the companion: [[MATH310F26(Workbook 9 Companion) - The even reduction]]
> - ๐ฏ **[WB] [Workbook 10](https://elearning.mines.edu/courses/81632/assignments/587683)** โ Fourier visualizations: read a power spectrum, two mystery spectrograms, and ten short bursts of audio; no calculations, written observations; upload one PDF โ due **Wednesday 9/30, 11:59pm** (with the check-in)
> - ๐ [[MATH310F26_WB10.pdf|Workbook 10 (blank, 2 pages)]]
> - Start with the companion: [[MATH310F26(Workbook 10 Companion) - Reading a sound's fingerprint]]
> - **Workbook check-in: Workbooks 1โ10 due Wednesday, September 30** (soft, as always โ sleep first, then workbooks); in-person workbook checks start next week or the week after
> - **Friday 9/25 is an activity day**: two mock 12-minute project presentations (the TA's and the instructor's), metacognitive rather than technical
> - The [[Fourier Series]] applets carry the audio from Friday โ draw a shape, play the shape
---
# Deliverables
- ๐ฏ **[LR] [Day 11 Reflection Questions](https://elearning.mines.edu/courses/81632/quizzes/121361)** โ 4 questions drawn from today's material, unlimited attempts, highest kept
- ๐ฏ **[LR] [Day 11 Reflection Statement](https://elearning.mines.edu/courses/81632/quizzes/121362)** โ one free response, no wrong answers
- ๐ฏ **[MP] [One Question, and the First Arrow](https://elearning.mines.edu/courses/81632/quizzes/121327)** โ due Friday 9/25 at 11:59 pm
Questions and statement are due Wednesday 9/23 at 11:59 pm.
---
# Lecture Boards + Transcript + GenAI
**Eleventh meeting, September 21 โ cooking the coefficients.** The plan, stated at the top: finish Fourier series by running the calculation that got tucked away Friday, then follow the *modes* of the series out of the math and into the tangible property of **sound** โ see some things, hear some things. And a standing resolution from mid-derivation: "just go in and do this calculation, Scott โ you'll have plenty of time to watch videos about yodeling." (Foreshadowing: acknowledged.)
## Housekeeping
**Workbook check-in: Workbooks 1 through 10, due Wednesday, September 30.** Soft, as due dates here tend to be โ if something's going on and you need sleep, get some sleep, *then* do workbooks โ but certain tonal inflections of voices during board-writing suggested some catching up is in order; a week and a half is totally doable, and the first few were the intense ones. In-person **workbook checks** start next week or the week after โ in the modern day of AI, these are "humanity checks, to make sure the information is somewhat encoded up there somewhere," not stress events. **Friday is the activity day**: a 12-minutes-or-less model-decoding presentation from the instructor (model TBD by Friday) and the TA's own project story โ which involved the New York Times game **Connections**, and which won't be spoiled here since he's excited to tell it. (Related gaming disclosures: the instructor's priorities lie with Super Mario Kart on the SNES, where he was at one point quite good, until YouTube's proper gamers recalibrated his goals.) And a **pile of loaner books** appeared, aimed where the course is aimed: *Why You Hear What You Hear*; the *Mathematics and Climate* book from the project shelf; *Modeling Life* (mathematics of biological systems, tabled after its table of contents read like a math book's); and *Mathematics Applied to Deterministic Problems in the Natural Sciences*. Borrow and give back.
## The setup, and the question
Recall the frame: ideally localize amplitude to the frequencies $\omega_{n}=n\pi/L$ and the inverse transform hands back a $2L$-periodic function with the representation
$f(x)=\sum_{n=-\infty}^{\infty}\frac{c_{n}}{2\pi}\,e^{i\omega_{n}x}.\qquad(1)$
Read Eq. (1) with DiffEq eyes and it's a **superposition**; with linear-algebra eyes, a **linear combination of basis waves**. And that framing earns its keep: two chalk-smashed vectors pointing in different directions span the board, sure โ but what you *want* from a basis is orthogonality, because then life is super easy. The overriding question of the day, in red: **if $f$ is given, can we find the $c_{n}$ so that Eq. (1) holds?**
## The calculation: orthogonality does everything
Multiply Eq. (1) through by $e^{-i\omega_{m}x}$ for a fixed integer $m$, integrate from $-L$ to $L$ (do it to the right, obligated to do it to the left), swap the sum and the integral, and combine exponents:
$\int_{-L}^{L}f(x)\,e^{-i\omega_{m}x}\,dx=\sum_{n=-\infty}^{\infty}\frac{c_{n}}{2\pi}\int_{-L}^{L}e^{i(\omega_{n}-\omega_{m})x}\,dx.$
For the example at hand the period is $2\pi$, so $L=\pi$ and $\omega_{n}=n$: the orange integral is $\int_{-\pi}^{\pi}e^{i(n-m)x}dx$. Antidifferentiate (the $i(n-m)$ falls into the denominator), evaluate at $\pm\pi$, and stare at $e^{\pm ik\pi}$ for the integer $k=n-m$: the sine of integer-$\pi$ is zero, and the cosine โ walked around the unit circle with the pointing stick โ alternates sign, $(-1)^{k}$. Upper value equals lower value; upper minus lower is **zero**. All the orange stuff is zero.
*Kind of. Almost.* It would seem pretty silly to zero out the entire right-hand side โ and the room found the glitch: **when $n=m$**, the denominator $i(n-m)$ is zero and the antidifferentiation was illegal ("you sure didn't antidifferentiate it like it was the number one โ you antidifferentiated it like it was $e
quot;; blame distributed). When $n=m$ the integrand *is* the number one, and the area of a rectangle of height 1 from $-\pi$ to $\pi$ is $2\pi$. So in the infinite series of integrals, every term dies except the one where $n$ hits $m$, which survives as $\frac{c_{m}}{2\pi}\cdot 2\pi=c_{m}$:
$\boxed{\ c_{n}=\int_{-L}^{L}f(x)\,e^{-i\omega_{n}x}\,dx\ }$
(relabeled from $m$ to $n$ "for copaceticness" with Eq. 1). One formula, every coefficient. This is exactly the run your [[MATH310F26_WB8.pdf|Workbook 8]] performs on a constant โ same multiplication, same integral, told what to multiply through by.
## The sawtooth's coefficients, by table
Now feed it the sawtooth: $f(x)=x$ on $(-\pi,\pi)$, so $c_{n}=\int_{-\pi}^{\pi}x\,e^{-inx}\,dx$. Do you bi-parts with tables? ("I bi-parts with tables.") Set $u$-column derivatives against $dv$-column antiderivatives โ $x,\ 1,\ 0$ down the left; $e^{-inx},\ \frac{e^{-inx}}{-in},\ \frac{e^{-inx}}{(-in)^{2}}$ down the right โ and read off diagonally with alternating signs:
$c_{n}=\frac{x\,e^{-inx}}{-in}\Bigg|_{-\pi}^{\pi}-\frac{e^{-inx}}{(-in)^{2}}\Bigg|_{-\pi}^{\pi}.$
The second term evaluates to the *same number* at both bounds ($e^{\mp in\pi}=(-1)^{n}$ either way), and upper-minus-lower kills it. The first term gives $\pi e^{-in\pi}+\pi e^{in\pi}$ over $-in$, i.e. $\frac{2\pi(-1)^{n}}{-in}$ โ and since square roots are uncouth to leave in denominators, **free the $i$** (multiply by $i/i$):
$c_{n}=\frac{2\pi(-1)^{n}}{n}\,i\qquad(n\neq 0),\qquad c_{0}=\int_{-\pi}^{\pi}x\,dx=0$
โ the quadrant-4 triangle perfectly cancelling the quadrant-1 triangle. These are precisely the coefficients your [[MATH310F26_WB9.pdf|Workbook 9]] starts from.
## The reduction, handed to the workbook
Split the doubly infinite sum around the (already dead) $n=0$ term, offload the negativity from the summation ends into the quantities, and notice โ Tony's question, answered mid-board โ that the paired terms are **complex conjugates of each other**, and a number plus its conjugate comes out *real*: that's where your sines will be. The $(-1)^{n}$ doesn't care whether $n$ sits upstairs or downstairs (a unit is a unit), the workbook leads you through the rest, and out drops Friday's punchline:
$f(x)=\sum_{n=1}^{\infty}\frac{2(-1)^{n+1}}{n}\sin(nx)=2\sin(x)-\frac{2}{2}\sin(2x)+\frac{2}{3}\sin(3x)-\cdots$
## Modes, and the sound of a coefficient
Read the expansion term by term and two things happen at once: the **frequency climbs** (more wiggles per width) and the **amplitude fades** โ and *how* the amplitudes fade is the character of the sound. The names: term $n$ is the **$n$th mode**; musically, the largest-amplitude first sinusoid is the **fundamental** โ the pitch you hear โ and $\sin(2x),\ \sin(3x),\dots$ are the **first harmonic, second harmonic**, adding texture.
![[day11_modes.png]]
Think of the modes as **shape-giving functions**. On a vibrating string, the big bowed shape is mode one, and the higher harmonics are the *only* other waveforms allowed to live there โ nothing in between. (This was Friday's website, finally cooperating.) But what are the odds you pluck a string just right to solicit exactly one shape function? What a real pluck makes is a **linear combination of shape functions**, constructively and destructively interfering into the shape you gave it โ bow the string off-center and the combination reweights accordingly. The same machinery runs the little stringy things in your throat: fixed lengths, allowed shapes, Fourier series underneath, vibrations into the air and into your ears.
## Reading energy per frequency, live
The closer moved from shapes to **[spectrograms](https://en.wikipedia.org/wiki/Spectrogram)**: a violin being played, time running horizontally, frequency vertically, energy color-coded. The energy is not spattered around the plane โ there's a bright ridge at the **fundamental** and equally disciplined ridges at the **harmonics** above it, the Fourier representation of each time-slice stacked side by side (a 3-D graph nobody wants to draw, so color does the job). This is also how **Shazam** works: your phone ships a time slice to a server, the server transforms it, and *where the energy sits among the coefficients* is the fingerprint it looks up. And then a hometown demonstration: with permission, a recording of **Masa, who leads the Mines philharmonic, playing Sakura** โ the spectrogram painting the energy in coefficient space while the melody played. Start asking your mental model what it expects.
> [!info]- ๐ Going further โ spectrograms you can play with, and how Shazam actually does it
> - **Make your own spectrogram, right now:** Google's [Chrome Music Lab: Spectrogram](https://musiclab.chromeexperiments.com/spectrogram/) runs live in the browser โ turn on the mic and watch your own voice paint energy into frequency space (harmonica, flute, and birdsong presets included). Whistle a pure tone and you get one ridge; sing the same pitch and the harmonics stack above it, exactly as in class.
> - **How the heck does Shazam work?** โ [an interactive walkthrough by Shri Khalpada](https://perthirtysix.com/how-the-heck-does-shazam-work) that builds the whole pipeline in your browser: waveform $\to$ spectrogram $\to$ the strongest peaks only (a "constellation map") $\to$ pairs of peaks hashed into fingerprints $\to$ a database lookup. It is precisely the "where the energy sits among the coefficients" story, made clickable.
> - **Build it yourself:** Cameron MacLeod's [abracadabra: How does Shazam work?](https://www.cameronmacleod.com/blog/how-does-shazam-work) walks the same algorithm with open-source Python โ spectrogram, peak-finding, hashing, matching โ if you'd rather read code than prose.
> - **The primary source:** Avery Li-Chun Wang, ["An Industrial-Strength Audio Search Algorithm"](https://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf) (ISMIR 2003) โ the original Shazam paper, and a genuinely readable one. The key engineering insight: don't fingerprint the whole spectrogram, fingerprint only its brightest peaks, because peaks survive noisy bars, car speakers, and compression when everything else drowns.
**The cliffhanger, delivered with the screen unplugged:** one more sound was played *without* the picture โ teased earlier as the yodeling content the calculation was racing toward. The assignment carried into Wednesday: take a Fourier transform of it in your mind, and come back with what you think it would look like.
> [!success]- Numbers checked in one sandbox run
> The orthogonality integral returned $6.283185=2\pi$ at $n=m$ and $\sim 10^{-16}$ at $(n,m)=(4,2)$ and $(-1,2)$; $c_{0}=\int_{-\pi}^{\pi}x\,dx=0.0$ exactly. The conjugate-pair join was tested numerically at $x=2.2$: summing $\frac{c_{-n}}{2\pi}e^{-inx}+\frac{c_{n}}{2\pi}e^{inx}$ with $c_{n}=\frac{2\pi(-1)^{n}}{n}i$ gave $2.192813+0i$, identical to the workbook's target form $\sum 2(-1)^{n+1}\sin(nx)/n$ โ real, as a number plus its conjugate must be.
> [!example]- Board scans โ September 21, 2026
> ![[MATH310F26-Day11-Board-1.jpg]]
> ![[MATH310F26-Day11-Board-2.jpg]]
> ![[MATH310F26-Day11-Board-3.jpg]]
> ![[MATH310F26-Day11-Board-4.jpg]]
> ![[MATH310F26-Day11-Board-5.jpg]]
>
> ๐ [[MATH310F26-Day11-Boards-2026-09-21.pdf|Full board capture (5 pages, PDF)]]