% vim: tw=50
% 10/10/2022 10AM

\subsection{The Dirichlet Conditions (Fourier's
theorem)}

Sufficiency conditions for a ``well-behaved''
function to have a unique Fourier Series (1.4):

\medskip

\begin{flashcard}
    \prompt{Dirichlet Conditions? \\}
    \noindent
    \cloze{If $f(x)$ is a \fcemph{bounded
    periodic} function
    \fcscrap{(period $2L$) }with a \fcemph{finite
    number} of \fcemph{minima}, \fcemph{maxima}
    and \fcemph{discontinuities} in $0 \le x < 2L$,
    then the Fourier Series \fcscrap{(1.4-5) }converges
    to $f(x)$ at all points where $f$ is continuous; at
    discontinuities the series converges to the
    midpoint $\half (f(x_+) + f(x_-))$.}
\end{flashcard}

\begin{note*}
    \begin{itemize}
        \item Weak conditions (in contrast to
            Taylor series) but pathological
            functions are excluded, such as
            $\frac{1}{x}$, $\sin \frac{1}{x}$,
            \[ f(x) = \begin{cases}
                0 & \text{rational} \\
                1 & \text{irrational}
            \end{cases} \]
        \item Converse is not true (consider $\sin
            \frac{1}{x}$ which has a Fourier
            series)
        \item Proof is difficult (see Jeffrey's \&
            Jeffrey's)
    \end{itemize}
\end{note*}

\begin{theorem*}[Convergence of Fourier series]
    \fc{If $f(x)$ has continuous derivatives up to
    \cloze{the $p$-th derivative which is
    \fcemph{discontinuous}},
    then \cloze{the Fourier series coefficients converge
    as $\theta(n^{-(p + 1)})$, as $n \to \infty$.}}
\end{theorem*}

\begin{example*}[$p = 0$]
    ``Square wave'' (Example sheet 1, Q5)
    \[ f(x) = \begin{cases}
        1 & 0 \le x < 1 \\
        -1 & -1 \le x < 0
    \end{cases} \]
    then Fourier series
    \[ f(x) = 4 \sum_{m = 1}^\infty \frac{\sin(2m
    - 1) \pi x}{(2m - 1) \pi} \tag{1.7} \]
\end{example*}

\begin{example*}[$p = 1$]
    General ``see-saw'' wave. If
    \[ f(x) = \begin{cases}
        x(1 - \xi) & 0 \le x < \xi \\
        \xi(1 - x) & \xi \le x < 1 \\
        x(1 - \xi) & -\xi \le x < 0 \\
        \xi(-1 - x) & -1 \le x < \xi
    \end{cases} \]
    Show that the Fourier series is
    \[ f(x) = 2\sum_{n = 1}^\infty \frac{\sin n
    \pi \xi \sin n \pi x}{(n \pi)^2} \tag{1.8} \]
    For $\xi = \half$, show
    \[ f(x) = 2\sum_{m = 1}^\infty (-1)^{m + 1}
    \frac{\sin (2m - 1) \pi x}{((2m - 1) \pi)^2} \]
\end{example*}

\begin{example*}[$p = 2$]
    Take
    \[ f(x) = \begin{cases}
        \half x(1 - x) & 0 \le x < 1 \\
        \half x(1 + x) & -1 \le x < 0
    \end{cases} \]
    Show Fourier series is
    \[ f(x) = 4 \sum_{m = 1}^\infty \frac{\sin(2m
    - 1) \pi x}{((2m - 1) \pi)^3} \tag{1.9} \]
\end{example*}

\begin{example*}[$p = 3$]
    $f(x) = (1 - x^2)^2$ with Fourier series $a_n
    = \theta \left( \frac{1}{n^4} \right)$.
\end{example*}

\subsubsection*{Integration of Fourier Series}

\begin{hiddenflashcard}[conditions-for-FS-integral]
\prompt{Conditions for term by term integration of
Fourier series to work?}
\cloze{\fcemph{Always} valid.}
\end{hiddenflashcard}

It is always valid to integrate the Fourier series
(1.4) of $f(x)$ term-by-term to obtain
\[ F(x) = \int_{-L}^x f(x) \dd x \]
because $F(x)$ satisfies Dirichlet conditions if
$f(x)$ does. (for example discontinuities in $f$
become continuous in $F(x)$).

\subsubsection*{Differentiation of Fourier Series}

Take care with term-by-term differentiation.

\begin{example*}[Counter example]
    Take ``square wave'' Fourier series (1.7) and
    find
    \[ f'(x) \stackrel{?}{=} 4 \sum_{m = 1}^\infty
    \cos(2m - 1) \pi x \]
    which is unbounded!
\end{example*}

\begin{flashcard}
\begin{theorem*}
    \prompt{Conditions for ``Fourier series
    derivative'' to work? \\}
    \cloze{If $f(x)$ is continuous and satisfies
    Dirichlet conditions and $f'(x)$ satisfies
    Dirichlet conditions, then $f'(x)$ can be found
    by term-by-term differentiation of Fourier
    series\fcscrap{ (1.4)} of $f(x)$.}
\end{theorem*}
\end{flashcard}

\noindent
Exercise: Differentiate ``see-saw'' (1.8) with
$\xi = \half$, to get offset ``square-wave'' (1.7)
(i.e. $x \to x + \half$).

\subsection{Parseval's Theorem}

Relation between integral of the square of a
function and the sum of the squares of the Fourier
coefficients:
\begin{align*}
    \int_0^{2L} [f(x)]^2 \dd x
    &= \int_0^{2L} \dd x \left[ \half a_0 + \sum_n
    a_n \cos \frac{n \pi x}{L} + \sum_n b_n \sin
    \frac{n \pi x}{L} \right]^2 \\
    &= \int_0^{2L} \dd x \left[ \frac{1}{4} a_0^2
    + \sum_n a_n^2 \cos^2 \frac{n \pi x}{L} +
    \sum_n b_n^2 \sin^2 \frac{n \pi x}{L} \right]
\end{align*}
by orthogonal relations (1.1-3).
\fc{\prompt{Parseval's theorem?}
\[ \boxed{\int_0^{2L} [f(x)]^2 \dd x = \cloze{L
\left[ \half a_0^2 + \sum_{n = 1}^\infty (a_n^2 +
b_n^2) \right]}} \tag{1.10} \]}
Also called the \emph{completeness relation}
because $LHS \ge RHS$ if any basis coefficients
are missing.

\begin{example*}
    ``Sawtooth'' wave $f(x) = x$ on $-L \le x < L$
    with Fourier series (1.6)
    \[ LHS = \int_{-L}^L x^2 \dd x = \frac{2}{3}
    L^3 \]
    \[ RHS = L \sum_{n = 1}^\infty \frac{4L^2}{n^2
    \pi^2} = \frac{4L^3}{\pi^2} \sum_{n =
    1}^\infty \frac{1}{n^2} \]
    (note that we can combine these to notice that
    $\sum_{n = 1}^\infty \frac{1}{n^2} =
    \frac{\pi^2}{6}$!). See Example sheet 1, Q3
\end{example*}

\begin{remark*}
    Parseval's theorem for functions $\langle f, f
    \rangle \equiv \|f\|^2$ is the same as
    Pythagoras for vectors $\langle v, v \rangle
    = |v|^2 = x^2 + y^2 + z^2$ (the norm).
\end{remark*}
