# MATH310S26 - Introduction to Mathematical Modeling (Lecture Notes)
## Spring 2026 - Day 7 Notes
### Date: January 28, 2026 (01/28/26)
**Previous Lecture**: [[MATH310S26-Day6-Work|Day 6 - Work Day]]
**Next Lecture**: Day 8 (upcoming)
**Related Topics**: [[MATH310S26-Day1-Notes|Course Introduction]], [[MATH310S26-Day2-Notes|Linear Regression Basics]]
---
## Administrative Updates
### Modeling Survey
- Posted and due Friday
- Part of A-level and B-level long-term projects
- Weekly check-ins to understand student interests and directions
- Not expected to take much time - just to gauge where everyone's thinking
### Upcoming on Monday
- Low-stakes feedback based on today's lecture and next lecture
- Some coding exercises
- **Group formation discussion**
- Start thinking about working individually vs. in groups
- Spring class (~20 students) allows flexibility
- Fall class (~30 students) typically requires more group work
### Assignment Note
- Some hyperlinks in CSV data assignment not working
- Can navigate to website directly
- Flexible on deadline if issues arise
---
## Main Topic: Introduction to Fourier Series
### Part 1: Building Functions from Periodic Components
#### Recall: Regression Framework
We can try to fit data to features through [regression](https://en.wikipedia.org/wiki/Regression_analysis). This connects to our earlier work with [[MATH310S26-Day2-Notes|linear regression]] and [[MATH310S26-Day3-WorkdayMaterials (Two-by-two matrices, normal equations, and ordinary least squares)|ordinary least squares]].
#### The Fundamental Set
Consider the set of **2π-periodic [sinusoids](https://en.wikipedia.org/wiki/Sine_wave)**:
$S = \{1, \cos(t), \sin(t), \cos(2t), \sin(2t), \cos(3t), \sin(3t), ...\}$
Key observations:
- $\sin(t)$ has [period](https://en.wikipedia.org/wiki/Periodic_function) $2\pi$
- $\sin(2t)$ has period $\pi$, but also repeats every $2\pi$
- The constant function 1 is periodic with any period
- All elements share a common period of $2\pi$
#### Linear Combinations
The natural thing to do: **linearly combine the set's elements**
$f(t) = a_0 + \sum_{n=1}^{\infty} [a_n \cos(nt) + b_n \sin(nt)]$
Where:
- $a_0, a_n, b_n$ are regression parameters (coefficients)
- $t$ is the independent variable (predictor)
- $f(t)$ is the response
### Part 2: The Fourier Series
#### Definition
If we build smooth functions by linear combinations of:
- **Power functions** → [Taylor Series](https://en.wikipedia.org/wiki/Taylor_series)
- **Sinusoids** → **[Fourier Series](https://en.wikipedia.org/wiki/Fourier_series)**
#### Key Properties
**Theorem**: If $f_1$ and $f_2$ are periodic with period $p$, then $g(t) = f_1(t) + f_2(t)$ is also $p$-periodic.
**Proof sketch**:
$g(t+p) = f_1(t+p) + f_2(t+p) = f_1(t) + f_2(t) = g(t)$
**Consequence**: The Fourier series $f(t)$ is $2\pi$-periodic.
#### Physical Interpretation
- Think of sines and cosines as **[waves](https://en.wikipedia.org/wiki/Wave)**
- Coefficients $a_n$ and $b_n$ control **[amplitudes](https://en.wikipedia.org/wiki/Amplitude)**
- Linear combination creates **[superposition](https://en.wikipedia.org/wiki/Superposition_principle)**
- Results in **[constructive and destructive interference](https://en.wikipedia.org/wiki/Wave_interference)**
**Analogy**: A [prism](https://en.wikipedia.org/wiki/Prism_(optics)) breaking white light into rainbow colors is like a physical Fourier decomposition.
### Part 3: Finding Fourier Coefficients
#### The Problem
Given target data $f(t)$, how do we find the right $a_0, a_n, b_n$?
**Challenge**: We need to find infinitely many coefficients!
#### Example: Constant Function
Suppose $f(t) = 2$ for $t \in (-\pi, \pi)$ and $f$ is $2\pi$-periodic.
**Visual**: A horizontal line at $y=2$ that repeats every $2\pi$.
#### Method 1: Finding $a_0$
**Step 1**: Integrate the entire Fourier series equation from $-\pi$ to $\pi$:
$\int_{-\pi}^{\pi} f(t) dt = \int_{-\pi}^{\pi} \left[a_0 + \sum_{n=1}^{\infty} (a_n \cos(nt) + b_n \sin(nt))\right] dt$
**Step 2**: Apply linearity of integration (switching sum and integral):
$\int_{-\pi}^{\pi} f(t) dt = a_0 \cdot 2\pi + \sum_{n=1}^{\infty} \left[a_n \int_{-\pi}^{\pi} \cos(nt) dt + b_n \int_{-\pi}^{\pi} \sin(nt) dt\right]$
**Key observation**:
- $\int_{-\pi}^{\pi} \cos(nt) dt = 0$ (full periods integrate to zero)
- $\int_{-\pi}^{\pi} \sin(nt) dt = 0$ (full periods integrate to zero)
**Result**:
$a_0 = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(t) dt$
For our example: $a_0 = \frac{1}{2\pi} \cdot 2 \cdot 2\pi = 2$
#### Method 2: Finding $a_n$
**Technique**: Multiply by $\cos(mt)$ and integrate from $-\pi$ to $\pi$
**[Orthogonality relations](https://en.wikipedia.org/wiki/Orthogonal_functions)** (Check Your Understanding):
$\int_{-\pi}^{\pi} \cos(nt)\cos(mt) dt = \begin{cases} 0, & n \neq m \\ \pi, & n = m \end{cases}$
$\int_{-\pi}^{\pi} \sin(nt)\sin(mt) dt = \begin{cases} 0, & n \neq m \\ \pi, & n = m \end{cases}$
**Key insight**: $\cos(mt) \cdot \sin(nt)$ is an [odd function](https://en.wikipedia.org/wiki/Even_and_odd_functions), so:
$\int_{-\pi}^{\pi} \cos(mt) \sin(nt) dt = 0$
**Result**:
$a_m = \frac{1}{\pi} \int_{-\pi}^{\pi} f(t) \cos(mt) dt$
#### Method 3: Finding $b_n$
**Technique**: Multiply by $\sin(mt)$ and integrate
**Result**:
$b_m = \frac{1}{\pi} \int_{-\pi}^{\pi} f(t) \sin(mt) dt$
### Part 4: Completing the Example
For $f(t) = 2$:
- $a_0 = 2$
- $a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 2 \cos(nt) dt = 0$ (for all $n \geq 1$)
- $b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 2 \sin(nt) dt = 0$ (for all $n \geq 1$)
**Therefore**: $f(t) = 2$ (as expected!)
---
## Mathematical Modeling Discussion
### Modeling Philosophy
- Start with **wondering** ("I notice, I wonder" phase)
- Initial wonderings often too large - need scoping
- Balance between:
- **Technical skills**: Mathematical techniques from curriculum
- **Non-technical skills**: Problem formulation, communication
- Mathematical modeling as our version of the scientific method
- No laboratories, but we have: pencils, paper, computers, brains
### Student-Driven Projects
- Models should reflect **your interests**, not the instructor's
- Allows sustained engagement throughout semester
- Past examples range from abstract (serial killer dynamics using [PDEs](https://en.wikipedia.org/wiki/Partial_differential_equation)) to creative (voice synthesis from skull models)
- Connects to work from [[MATH310S26-Day1-Notes|Day 1]] on course objectives and [[MATH310S26-Day4-Notes|Day 4]] on modeling approaches
---
## Check Your Understanding
### Problem 1
Show that if $n, m \in \mathbb{N}$, then:
$\int_{-\pi}^{\pi} \cos(nt)\cos(mt) dt = \begin{cases} 0, & n \neq m \\ \pi, & n = m \end{cases}$
$\int_{-\pi}^{\pi} \sin(nt)\sin(mt) dt = \begin{cases} 0, & n \neq m \\ \pi, & n = m \end{cases}$
### Problem 2
Using the fact from Problem 1, show that if:
$f(t) = a_0 + \sum_{n=1}^{\infty} [a_n \cos(nt) + b_n \sin(nt)]$
Then the coefficients are given by:
- $a_0 = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(t) dt$
- $a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(t) \cos(nt) dt$
- $b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(t) \sin(nt) dt$
### Problem 3
Using the formulas above, find $a_0, a_n, b_n$ for $f(t) = 2$.
---
## Key Concepts to Remember
1. **[Fourier series](https://en.wikipedia.org/wiki/Fourier_series)** decompose periodic functions into sums of sines and cosines
2. **[Orthogonality](https://en.wikipedia.org/wiki/Orthogonality)** of [trigonometric functions](https://en.wikipedia.org/wiki/Trigonometric_functions) is crucial for finding coefficients
3. **Integration** over a period isolates individual coefficients
4. Any "reasonable" periodic function can be represented as a Fourier series
5. **Periodic extension**: Even functions defined on finite intervals can be extended periodically
---
## Looking Ahead
### Next Class
- Application of Fourier series to data analysis
### Monday's Focus
- Low-stakes feedback assessment
- Coding exercises with Fourier analysis (building on [[MATH310S26-Day3-WorkdayMaterials (Two-by-two matrices, normal equations, and ordinary least squares)|Day 3]] and [[MATH310S26-Day6-Work|Day 6]] coding work)
- **Group formation for modeling projects**
---
## Related Mathematical Topics
- **[Harmonic analysis](https://en.wikipedia.org/wiki/Harmonic_analysis)**: The broader field containing Fourier analysis
- **[Spectral analysis](https://en.wikipedia.org/wiki/Spectral_analysis)**: Decomposing signals into frequency components
- **[Fourier transform](https://en.wikipedia.org/wiki/Fourier_transform)**: Extension to non-periodic functions
- **[Principal Component Analysis](https://en.wikipedia.org/wiki/Principal_component_analysis)**: Related to [[MATH310S26-Day5-Notes|Day 5's eigenanalysis and dimensional reduction]]
---
*Note: "We're cavalier" about switching limits in applied math - sometimes you just have to try things and see if they work!*