
## Fourier series

#### Formulae

Consider system of functions $$\Bigl\{\frac{1}{2},\qquad \cos (\frac{\pi nx}{l}), \qquad \sin (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\} \label{eq-1}$$ on interval $J:=[x_0,x_1]$ with $(x_1-x_0)=2l$.

These are eigenfunctions of $X''+\lambda X=0$ with periodic boundary conditions $X(\alpha)=X(\beta)$, $X'(\alpha)=X'(\beta)$.

Proposition 1. \begin{align*} & \int_J \cos (\frac{\pi mx}{l})\cos (\frac{\pi nx}{l})\,dx = l \delta_{mn},\\ & \int_J \sin (\frac{\pi mx}{l})\sin (\frac{\pi nx}{l})\,dx = l \delta_{mn},\\ & \int_J \cos (\frac{\pi mx}{l})\sin (\frac{\pi nx}{l})\,dx = 0, \end{align*} and \begin{align*} & \int_J \cos (\frac{\pi mx}{l})\,dx =0,\qquad & \int_J \sin (\frac{\pi mx}{l})\,dx=0,\qquad & \int_J \,dx =2l. \end{align*} for all $m,n=1,2,\ldots$.

Proof. Easy; use formulae \begin{gather*} 2\cos (\alpha)\cos(\beta)=\cos(\alpha-\beta)+\cos(\alpha+\beta),\\ 2\sin (\alpha)\sin(\beta)=\cos(\alpha-\beta)-\cos(\alpha+\beta),\\ 2\sin (\alpha)\cos(\beta)=\sin(\alpha-\beta)+\sin(\alpha+\beta). \end{gather*}

Therefore according to the previous lecture Lecture 14 we arrive to decomposition $$f(x)= \frac{1}{2}a_0 + \sum_{n=1}^\infty\bigl( a_n\cos (\frac{\pi nx}{l})+b_n \sin (\frac{\pi nx}{l}) \bigr)\label{eq-2}$$ with coefficients calculated according to (14.7) \begin{align} a_n=& \frac{1}{l}\int_J f(x)\cos (\frac{\pi nx}{l})\,dx \qquad n=0,1,2,\ldots,\label{eq-3}\\ b_n= & \frac{1}{l}\int_J f(x)\sin (\frac{\pi nx}{l})\,dx \qquad n=1,2,\ldots0,\label{eq-4}\\ \end{align} and satisfying Parseval's equality $$\frac{l}{2}|a_0|^2 +\sum_{n=1}^\infty l\bigl( |a_n|^2+|b_n |^2 \bigr)=\int_J |f(x)|^2\,dx. \label{eq-5}$$

So far this is an optional result: provided we can decompose function $f(x)$.

#### Completeness of the system (\ref{eq-1})

Now our goal is to prove that any function $f(x)$ on $J$ could be decomposed into Fourier series (\ref{eq-2}). First we need

Lemma 1. Let $f(x)$ be a piecewise-continuous function on $J$. Then $$\int_J f(x)\cos(\omega x)\,dx\to 0\qquad \text{as } \omega \to \infty \label{eq-6}$$ and the same is true for $\cos(\omega x)$ replaced by $\sin(\omega x)$.

Proof. (a) Assume first that $f(x)$ is continuously differentiable on $J$. Then integrating by parts \begin{equation*} \int_J f(x)\cos(\omega x)\,dx=\omega^{-1}f(x)\sin(\omega x)\bigr|_{x_0}^{x_1} -\omega^{-1}\int_J f(x)\sin(\omega x)\,dx=O(\omega^{-1}). \end{equation*}

(b) Assume now only that $f(x)$ is continuous on $J$. Then it could be uniformly approximated by continuous functions (proof is not difficult but we skip it anyway): \begin{equation*} \forall \varepsilon>0    \exists f_\varepsilon \in C^1(J):   \forall x\in J      |f(x)-f_\varepsilon (x)|\le \varepsilon. \end{equation*} Then obviously the difference between integrals (\ref{eq-6}) for $f$ and for $f_\varepsilon$ does not exceed $2l\varepsilon$; so choosing $\varepsilon =\varepsilon(\delta)= \delta/(4l)$ we make it $<\delta/2$. After $\varepsilon$ is chosen and $f_\varepsilon$ fixed we can choose $\omega_\varepsilon$ s.t. for $\omega>\omega_\varepsilon$ integral (\ref{eq-6}) for $f_\varepsilon$ does not exceed $\delta/2$ in virtue of (a). Then integral (\ref{eq-6}) for $f$ does not exceed $\delta$.

(c) Integral (\ref{eq-6}) for interval $J$ equals to the sum of integrals over intervals where $f$ is continuous. $\square$

Now calculate coefficients according to (\ref{eq-3})-(\ref{eq-4}) (albeit plug $y$ instead of $x$) and plug into partial sum: \begin{multline} S_N (x):=\frac{1}{2}a_0 +\sum_{n=1}^N\bigl( a_n\cos (\frac{\pi nx}{l})+b_n \sin (\frac{\pi nx}{l}) \bigr)=\\ \frac{1}{l}\int_J K_N(x,y)f(y)\,dy\qquad \label{eq-7} \end{multline} with \begin{multline} K_N(x,y)=\frac{1}{2} + \sum_{n=1}^N \bigl( \cos (\frac{\pi ny}{l}) \cos (\frac{\pi nx}{l})+\sin (\frac{\pi ny}{l}) \sin (\frac{\pi nx}{l}) \bigr)=\\ \frac{1}{2} + \sum_{n=1}^N \cos (\frac{\pi n(y-x)}{l}). \qquad\label{eq-8} \end{multline} Note that \begin{multline*} \sum_{n=1}^N \sin (\frac{1}{2}z)\cos (z)=\sum_{n=1}^N \bigl(\sin ((n+\frac{1}{2})z)- \sin ((n-\frac{1}{2})z) =\\ \sin ((N+\frac{1}{2})z)-\sin (\frac{1}{2}z) \end{multline*} and therefore $$K_N(x,y)=\frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y))},\qquad k=\frac{\pi}{l}. \qquad\label{eq-9}$$ So $$S_N (x) \frac{1}{l}\int_J \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y))}f(y)\,dy \label{eq-10}$$ We cannot apply Lemma 1 to this integral because of denominator. Assume that $x$ is internal point o=f $J$. Note that denominator vanishes on $J$ only as $y=x$. Really, $\frac{\pi}{2l}(x-y)< \pi$. Also note that derivative of denominator does not vanish as $y=x$. Then $f(y)/\sin(k(x-y))$ is a piecewise continuous function of $y$ provided all three conditions below are fulfilled:

1. $f$ is piecewise continuously differentiable function,
2. $f$ is continuous in $x$
3. $f(x)=0$ (we are talking about a single point).

In this case we can apply Lemma 1 and we conclude that $S_N(x)\to 0$ as $N\to \infty$. So,

If $f$ satisfies (a)-(c) then $S_N(x)\to f(x)$ as $N\to \infty$. Let us drop condition $f(x)=0$. Then we can decompose \begin{multline} S_N (x)= \frac{1}{l}\int_J \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y))}\bigl(f(y)-f(x)\bigr)\,dy+\\ \frac{1}{l} \int_J \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y)}f(x)\,dy\qquad \label{eq-11} \end{multline} and the first integral tends to $0$ due to Lemma 1. We claim that the second integral is identically equal $f(x)$. Really, we can move $f(x)$ out of integral and consider \begin{multline} \frac{1}{l}\int_J \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y))},dy=\\ \frac{1}{l}\int_J \bigl(\frac{1}{2}+\sum_{n=1}^N \cos (\frac{\pi n(y-x)}{l})\bigr)\,dy\qquad \label{eq-12} \end{multline} where integral of the first term equals $l$ and integral of all other terms vanish.

#### Pointwise convergence

Therefore we arrive to

Theorem 1. Let $x$ be internal point of $J$ (i.e. $x_0<x<x_1$) and let a. $f$ be a piecewise continuously differentiable function, b. $f$ be continuous in $x$. Then the Fourier series converges to $f(x)$ at $x$.

#### Pointwise convergence. II

Assume now that there is a jump at $x$. Then we need to be more subtle. First, we can replace $f(x)$ by its $2l$-periodic continuation from $J$ to $\mathbb{R}$. Then we can take any interval of the length $2l$ and result will be the same. So we take $[x-l,x+l]$. Now \begin{align*} S_N (x)= \frac{1}{l}\int_{J^-} \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y))}\bigl(f(y)-f(x-0)\bigr)\,dy&+\\ \frac{1}{l}\int_{J^+} \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y))}\bigl(f(y)-f(x+0)\bigr)\,dy&+\\ \frac{1}{l} \int_{J^-} \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y)}f(x-0)\,dy&+\\ \frac{1}{l} \int_{J^+} \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y)}f(x+0)\,dy& \end{align*} with $J^-=(x-l,l)$, $J^+=(x,x+l)$. According to Lemma 1 again the first two integrals tend to $0$ and we need to consider integrals \begin{align*} \frac{1}{l} \int_{J^-} \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y)}\,dy\,\\ \frac{1}{l} \int_{J^+} \frac{\sin (k (N+\frac{1}{2})(x-y))}{\sin(k(x-y)}\,dy. \end{align*} Using back transformation like in (\ref{eq-12}) we conclude that both these integrals are equal to $\frac{1}{2}$. Therefore we proved

Theorem 2. Let $f$ be a piecewise continuously differentiable function. Then the Fourier series converges to

1. $f(x)$ if $x$ is internal point and $f$ is continuous at $x$;
2. $\frac{1}{2}\bigl(f(x+0)+f(x-0)\bigr)$ if $x$ is internal point and $f$ is discontinuous at $x$;
3. $\frac{1}{2}\bigl(f(x_0+0)+f(x_1-0)\bigr)$ if $x=x_0$ or $x=x_1$. Recall that $x_0$ and $x_1$ are the ends.