# Fourier series
> *Theorem*: the "Fourier" inner product of two functions $g, f: \mathbb{C} \to \mathbb{C}$ is defined as
>
> $$
> \langle f, g \rangle = \int_a^b f(t) \overline g(t) dt
> $$
>
> with $f, g$ members of the square integrable functions $L^2[a,b]$ with $a,b \in \mathbb{R}$.
??? note "*Proof*:"
Will be added later.
The overline generally implies the complex conjugate.
> *Corollary*: the "Fourier" norm of a square integrable function $f: \mathbb{C} \to \mathbb{C}$ is defined as
>
> $$
> \|f\| = \sqrt{\langle f, f \rangle}.
> $$
??? note "*Proof*:"
Will be added later.
> *Proposition*: let $f: \mathbb{R} \to \mathbb{R}$ be a periodic function with period $T_0 \in \mathbb{R}$ then the autocorrelation of $f$ will create peaks for $t = zT_0$ for all $t \in \mathbb{R}$ and $z \in \mathbb{Z}$.
??? note "*Proof*:"
Will be added later.
> *Definition*: two functions $f, g: \mathbb{C} \to \mathbb{C}$ are orthogonal if and only if
>
> $$
> \langle f, g \rangle = 0
> $$
## Approximating functions
> *Lemma*: a function $f: \mathbb{R} \to \mathbb{C}$ can be approximated with a linear combination of orthogonal functions $b_k: \mathbb{R} \to \mathbb{C}$ given by
>
> $$
> \phi_n(t) = \sum_{k=0}^n c_k b_k(t),
> $$
>
> for all $t \in \mathbb{R}$ with $n \in \mathbb{N}$ the order. The coefficients $c_k \in \mathbb{C}$ that minimise $\|f - \phi_n\|$ may be determined by
>
> $$
> c_k = \frac{\langle f, b_k \rangle}{\langle b_k, b_k \rangle}.
> $$
??? note "*Proof*:"
Will be added later.
The orthogonal functions $b_k: \mathbb{R} \to \mathbb{C}$ have not yet been specified. There are many possible choices (Legendre polynomials, Bessel functions, spherical harmonics etc.) for these functions, for the Fourier series specifically we make use trigonometric or more generally imaginary exponential functions.
> *Lemma*: in the special case that $b_k: \mathbb{R} \to \mathbb{C}$ is given by
>
> $$
> b_k(t) = \exp(i k \omega_0 t),
> $$
>
> for all $t \in \mathbb{R}$ with $k \in \mathbb{Z}$ and $\omega_0 \in \mathbb{R}$ the angular frequency. A periodic function $f: \mathbb{R} \to \mathbb{C}$ with period $T_0 = \frac{2\pi}{\omega_0}$ may be approximated by
>
> $$
> \phi_n(t) = \sum_{k = 0}^n c_k e^{i k \omega_0 t},
> $$
>
> for all $t \in \mathbb{R}$. With the coefficients $c_k \in \mathbb{C}$ given by
>
> $$
> c_k = \frac{1}{T_0} \int_0^{T_0} f(t) e^{-i k \omega_0 t}dt.
> $$
??? note "*Proof*:"
Will be added later.
> *Lemma*: For a periodic function $f: \mathbb{R} \to \mathbb{C}$ and its approximation $\phi_n$ given in the above lemma we have
>
> $$
> \lim_{n \to \infty} \|f - \phi_n \| = 0,
> $$
>
> implies that the resulting series approximation converges to $f$. Similarly the series approximation converges also pointwise
>
> $$
> \lim_{n \to \infty} |f(t) - \phi_n(t)| = 0,
> $$
>
> for all $t \in D$ with $D \subseteq \mathbb{R}$ the interval where $f$ is continuous.
??? note "*Proof*:"
Will be added later.
## The Fourier series
With the above lemmas we may state the following theorems.
> *Theorem*: the classical Fourier series of a periodic function $f: \mathbb{R} \to \mathbb{C}$ with period $T_0 = \frac{2\pi}{\omega_0}$ may be given by
>
> $$
> f(t) = \sum_{k = -\infty}^\infty c_k e^{i k \omega_0 t},
> $$
>
> for all $t \in \mathbb{R}$. With the coefficients $c_k \in \mathbb{C}$ given by
>
> $$
> c_k = \frac{1}{T_0} \int_0^{T_0} f(t) e^{-i k \omega_0 t}dt.
> $$
??? note "*Proof*:"
Will be added later.
Expanding the Fourier series such that it can also approximate aperiodic functions obtains.
> *Theorem*: the Fourier series of an aperiodic function $f: \mathbb{R} \to \mathbb{C}$ may be given
>
> $$
> f(t) = \frac{1}{2\pi} \int_{-\infty}^\infty F(\omega) e^{i \omega t} d\omega,
> $$
>
> for all $t \in \mathbb{R}$. The expansion coefficient $F: \mathbb{R} \to \mathbb{C}$ is given by
>
> $$
> F(\omega) = \int_{-\infty}^\infty f(t) e^{-i \omega t}dt
> $$
>
> for all $\omega \in \mathbb{R}$. Is called the Fourier transform of $f$ and represents the continuous frequency spectrum of $f$.
??? note "*Proof*:"
Will be added later.