# MATH310S26 - Introduction to Mathematical Modeling (Lecture Notes)
## Spring 2026 - Day 8 Notes
### Date: January 30, 2026 (01/30/26)
**Previous Lecture**: [[../Lecture Notes/MATH310S26-Day7-Notes|Day 7 - Introduction to Fourier Series]]
**Next Lecture**: Day 9 (upcoming)
**Related Topics**: [[../Lecture Notes/MATH310S26-Day6-Work|PCA and Dimensional Reduction]], [[../Lecture Notes/MATH310S26-Day7-Notes|Fourier Series Basics]]
---
## Main Topic: [Fourier Series](https://en.wikipedia.org/wiki/Fourier_series) - What Do I Do and What Is It Doing?
### Review of Key Concepts
#### The Fourier Series Framework
For any "reasonable" $2\pi$-[periodic function](https://en.wikipedia.org/wiki/Periodic_function) $f(t)$, we can express it as:
$f(t) = a_0 + \sum_{n=1}^{\infty} [a_n \cos(nt) + b_n \sin(nt)]$
Where:
- We choose the basic elements from the set $S = \{1, \cos(t), \sin(t), \cos(2t), \sin(2t), ...\}$
- The coefficients $a_0, a_n, b_n$ are determined through [orthogonality](https://en.wikipedia.org/wiki/Orthogonality) relations
#### Orthogonality Relations
The key [orthogonality](https://en.wikipedia.org/wiki/Orthogonal_functions) properties for $n \neq m$:
$\int_{-\pi}^{\pi} \cos(nt)\cos(mt)\,dt = \int_{-\pi}^{\pi} \sin(nt)\sin(mt)\,dt = \pi \delta_{nm}$
where $\delta_{nm}$ is the [Kronecker delta](https://en.wikipedia.org/wiki/Kronecker_delta) (1 if $n = m$, and 0 otherwise).
Also:
$\int_{-\pi}^{\pi} f(t)g(t)\,dt = \langle f,g \rangle = 0$
for $\cos(nt)$ and $\sin(mt)$ (orthogonal between sine and cosine).
### Why do we want to explore this tool?
Fourier analysis gives us the mathematical means to discuss phenomena we witness in the natural world. Sound, in particular, is fundamentally about waves and their superposition. Here are three examples demonstrating the power of Fourier decomposition:
#### 1. Decomposing Complex Audio into Frequencies
![[Teaching/MATH310/MATH310S26/Lecture Notes/Media/02_ALIEN VOICES - Female & Male Singers.mp4]]
When we hear voices or music, our ears are actually performing a real-time Fourier transform! The complex waveform hitting our eardrum is decomposed into individual frequency components. This video shows how male and female voices occupy different frequency ranges - typically male voices have fundamental frequencies around 85-180 Hz while female voices range from 165-255 Hz.
#### 2. Polyphonic Singing and Wave Superposition
![[Teaching/MATH310/MATH310S26/Lecture Notes/Media/01_ALIEN VOICES - Female & Male Singers.mp4]]
[Polyphonic singing](https://en.wikipedia.org/wiki/Overtone_singing) demonstrates the principle of superposition perfectly. A single vocalist can produce multiple pitches simultaneously by manipulating their vocal tract to emphasize different [harmonics](https://en.wikipedia.org/wiki/Harmonic) (integer multiples of the fundamental frequency). This is exactly what Fourier series represents mathematically - a complex wave as a sum of simpler sinusoidal components.
#### 3. Visualizing Amplitude and Frequency Spectra
![[Teaching/MATH310/MATH310S26/Lecture Notes/Media/03_ALIEN VOICES - Female & Male Singers.mp4]]
This visualization shows a [spectrogram](https://en.wikipedia.org/wiki/Spectrogram) - essentially a time-varying Fourier transform. The horizontal axis represents time, vertical axis shows frequency, and color intensity indicates amplitude. We can see:
- **Fundamental frequency**: The lowest, strongest line
- **Harmonics**: The parallel lines above at integer multiples
- **Formants**: The emphasized frequency bands that give each voice its unique character
These real-world applications show why Fourier analysis is so powerful: it reveals the hidden frequency structure within complex signals, allowing us to understand, manipulate, and recreate sounds mathematically.
### Computing Fourier Coefficients
#### Abstract [Inner Product](https://en.wikipedia.org/wiki/Inner_product_space)
We define the inner product as:
$\langle f, g \rangle = \int_{-\pi}^{\pi} f(t)g(t)\,dt$
#### Outcome: [Projection](https://en.wikipedia.org/wiki/Projection_(linear_algebra)) Formula
If we project the $2\pi$-periodic $f(t)$ onto the Fourier basis:
$a_0 = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(t)\,dt$
$a_n = \frac{1}{\pi} \langle f, \cos(nt) \rangle = \frac{1}{\pi} \int_{-\pi}^{\pi} f(t)\cos(nt)\,dt$
$b_n = \frac{1}{\pi} \langle f, \sin(nt) \rangle = \frac{1}{\pi} \int_{-\pi}^{\pi} f(t)\sin(nt)\,dt$
---
## Example 1: Linear Function on $(-\pi, \pi)$
*Connection: This builds on our [[../Lecture Notes/MATH310S26-Day3-WorkdayMaterials (Two-by-two matrices, normal equations, and ordinary least squares)|linear regression work]] where we fit data to basis functions. Here, our basis functions are sinusoids instead of polynomials.*
Given: $f(t) = t$ for $t \in (-\pi, \pi)$ with $f(t + 2\pi) = f(t)$ (periodic extension)
### Computing the Coefficients
*Note: The orthogonality concepts here parallel our work with [[../Lecture Notes/MATH310S26-Day5-Notes|eigenvectors and PCA]], where orthogonal decomposition was key to dimensional reduction.*
**Step 1**: Find $a_0$
$a_0 = \frac{1}{2\pi} \int_{-\pi}^{\pi} t\,dt = 0$
(odd function integrated over symmetric interval)
**Step 2**: Find $a_n$
$a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} t\cos(nt)\,dt = 0$
(odd × even = odd, integrated over symmetric interval)
**Step 3**: Find $b_n$
$b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} t\sin(nt)\,dt$
Using [integration by parts](https://en.wikipedia.org/wiki/Integration_by_parts):
$b_n = \frac{2}{\pi} \int_{0}^{\pi} t\sin(nt)\,dt = \frac{2}{\pi} \left[-\frac{t\cos(nt)}{n}\Big|_0^{\pi} + \frac{1}{n}\int_0^{\pi} \cos(nt)\,dt\right]$
$= \frac{2}{\pi} \cdot \frac{-\pi(-\cos(n\pi))}{n} = \frac{2(-1)^{n+1}}{n}$
### [Fourier Series](https://en.wikipedia.org/wiki/Fourier_series#Convergence) Representation
$f(t) = \sum_{n=1}^{\infty} \frac{2(-1)^{n+1}}{n} \sin(nt) = 2\sin(t) - \sin(2t) + \frac{2}{3}\sin(3t) - ...$
### Visualizing Fourier Series Convergence
The animations below demonstrate how the Fourier series builds up our [sawtooth wave](https://en.wikipedia.org/wiki/Sawtooth_wave) $f(t) = t$. First, we look at the concept of a [Taylor polynomial](https://en.wikipedia.org/wiki/Taylor_series), which tries to fit a polynomial to a infinitely differentiable function, in this case $\sin(t)$. We see that eventually, the polynomial cannot support the infinite number of oscillations present in the function and must eventually diverge, as a polynomial should.
![[tumblr_mynd25NdlI1suhdw4o1_1280.gif]]
[](https://en.wikipedia.org/wiki/File:Synthesis_sawtooth.gif)
#### What the Animations Shows:
- **Starting point**: The first term $2\sin(t)$ gives a basic sine wave approximation
- **Adding terms**: Each additional term in the series $\frac{2(-1)^{n+1}}{n} \sin(nt)$ refines the approximation:
- $n=2$: Subtracts $\sin(2t)$ (higher frequency, smaller amplitude)
- $n=3$: Adds $\frac{2}{3}\sin(3t)$ (even higher frequency, smaller amplitude)
- And so on...
- **Convergence**: As more terms are added, the sum increasingly resembles the linear function $f(t) = t$ on $(-\pi, \pi)$
- **[Gibbs phenomenon](https://en.wikipedia.org/wiki/Gibbs_phenomenon)**: Notice the slight overshoot near the discontinuities at $t = \pm\pi$ where the periodic extension jumps - this overshoot persists even with many terms
- In the limit, the representation is exact, except a points of jump discontinuity where the Fourier series will average the right and left hand limits at the discontinuity.
- An interesting point can be made here and that is while the sum of a finite number of continuous functions is continuous, the infinite sum need not be.
This is the power of Fourier series: any periodic function can be built from simple sinusoidal building blocks, with higher frequencies providing finer details.
---
## Check Your Understanding
## Example: [Unit Step Function](https://en.wikipedia.org/wiki/Heaviside_step_function)
Let $f(t) = u(t) = \begin{cases} 0, & t < 0 \\ 1, & t \geq 0 \end{cases}$ on $(-1, 1)$
With periodic extension: $f(t + 2) = f(t)$ for all $t \in \mathbb{R}$
### Problem 1: Step Function Visualization
Sketch the periodic extension of the unit step function defined on $(-1, 1)$ over the interval $(-2, 2)$.
### Problem 2: Fourier Coefficients
For the step function above, determine whether the Fourier series will contain:
- Only cosine terms
- Only sine terms
- Both sine and cosine terms
---
## Next Steps
- Continue exploring Fourier series convergence (similar to [[../Lecture Notes/MATH310S26-Day4-Notes|eigenanalysis convergence]])
- Applications to signal processing and data analysis
- Connection to our previous work on [[../Lecture Notes/MATH310S26-Day6-Work|PCA]] and orthogonal decompositions
- Compare with [[../Lecture Notes/MATH310S26-Day2-Notes|overdetermined systems]] - both involve projecting onto subspaces