$\renewcommand{\Re}{\operatorname{Re}}$ $\newcommand{\erf}{\operatorname{erf}}$ $\newcommand{\dag}{\dagger}$ $\newcommand{\const}{\mathrm{const}}$

Other Fourier series

Fourier series for even and odd functions

In the previous Lecture 15 we proved the completeness of the system of functions \begin{equation} \Bigl\{\frac{1}{2},\qquad \cos (\frac{\pi nx}{l}), \qquad \sin (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\} \label{eq-1} \end{equation} on interval $J:=[x_0,x_1]$ with $(x_1-x_0)=2l$. In other words we proved that any function $f(x)$ on this interval could be decomposed into Fourier series \begin{equation} 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} \end{equation} 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 \begin{equation} \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} \end{equation}

Now we consider some other orthogonal systems and prove their completeness. To do this we first prove

Lemma 1. Let $J$ be a symmetric interval: $J=[-l,l]$. Then

1. $f(x)$ is even iff $b_n=0$     $\forall n=1,2,\ldots$.
2. $f(x)$ is odd iff $a_n=0$     $\forall n=0,1,2,\ldots$.

Proof. (a) Note that $\cos (\frac{\pi nx}{l})$ are even functions and $\sin (\frac{\pi nx}{l})$ are odd functions. Therefore if $b_n=0$     $\forall n=1,2,\ldots$ then only decomposition (\ref{eq-2}) contains only even functions and $f(x)$ is even. Conversely, if $f(x)$ is an even function then integrand in (\ref{eq-4}) is an odd function and its integral over symmetric interval is $0$.

(b) Statement (b) is proven in the similar way.

$\cos$-Fourier series

Let us consider function $f(x)$ on the interval $[0,l]$. Let us extend it as an even function on $[-l,l]$ so $f(x):=f(-x)$ for $x\in [-l,0]$ and decompose it into full Fourier series (\ref{eq-2}); however $\sin$-terms disappear and we arrive to decomposition \begin{equation} f(x)= \frac{1}{2}a_0 + \sum_{n=1}^\infty a_n\cos (\frac{\pi nx}{l}). \label{eq-6} \end{equation} This is decomposition with respect to orthogonal system \begin{equation} \Bigl\{\frac{1}{2},\qquad \cos (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\}. \label{eq-7} \end{equation}

Its coefficients are calculated according to (\ref{eq-3}) but here integrands are even functions and we can take interval $[0,l]$ instead of $[-l,l]$ and double integrals: \begin{equation} a_n= \frac{2}{l}\int_0^l f(x)\cos (\frac{\pi nx}{l})\,dx \qquad n=0,1,2,\ldots,\label{eq-8}. \end{equation} Also (\ref{eq-5}) becomes \begin{equation} \frac{l}{4}|a_0|^2 +\sum_{n=1}^\infty \frac{l}{2} |a_n|^2= \int_0^l |f(x)|^2\,dx. \label{eq-9} \end{equation}

The sum of this Fourier series is $2l$-periodic. Note that even and then periodic continuation does not introduce new jumps. $\sin$-Fourier series

Let us consider function $f(x)$ on the interval $[0,l]$. Let us extend it as an odd function on $[-l,l]$ so $f(x):=-f(-x)$ for $x\in [-l,0]$ and decompose it into full Fourier series (\ref{eq-2}); however $\cos$-terms disappear and we arrive to decomposition \begin{equation} f(x)= \sum_{n=1}^\infty b_n\sin (\frac{\pi nx}{l}). \label{eq-10} \end{equation} This is decomposition with respect to orthogonal system \begin{equation} \Bigl\{ \sin (\frac{\pi nx}{l}) \quad n=1,\ldots\Bigr\}. \label{eq-11} \end{equation}

Its coefficients are calculated according to (\ref{eq-4}) but here integrands are even functions and we can take interval $[0,l]$ instead of $[-l,l]$ and double integrals: \begin{equation} b_n= \frac{2}{l}\int_0^l f(x)\sin (\frac{\pi nx}{l})\,dx \qquad n=1,2,\ldots. \label{eq-12}. \end{equation} Also (\ref{eq-5}) becomes \begin{equation} \sum_{n=1}^\infty \frac{l}{2} |b_n|^2= \int_0^l |f(x)|^2\,dx. \label{eq-13} \end{equation}

The sum of this Fourier series is $2l$-periodic. Note that odd and then periodic continuation does not introduce new jumps iff $f(0)=f(l)=0$.  $\sin$-Fourier series with half-integers

Let us consider function $f(x)$ on the interval $[0,l]$. Let us extend it as an even with respect to $x=l$ function on $[0,2l]$ so $f(x):=f(2l-x)$ for $x\in [l,2l]$; then we make an odd continuation to $[-2l,2l]$ and decompose it into full Fourier series (\ref{eq-2}) but with $l$ replaced by $2l$; however $\cos$-terms disappear and we arrive to decomposition \begin{equation*} f(x)= \sum_{n=1}^\infty b'_n\sin (\frac{\pi nx}{2l}). \end{equation*}

Then $f(2l-x)= \sum_{n=1}^\infty b'_n\sin (\frac{\pi nx}{2l})(-1)^{n+1}$ and since $f(x)=f(2l-x)$ due to original even continuation we conclude that $b'_n=0$ as $n=2m$ and we arrive to \begin{equation} f(x)= \sum_{n=0}^\infty b_n\sin (\frac{\pi (2n+1)x}{2l}) \label{eq-14} \end{equation} with $b_n:=b'_{2n+1}$ where we replaced $m$ by $n$.

This is decomposition with respect to orthogonal system \begin{equation} \Bigl\{ \sin (\frac{\pi (2n+1)x}{2l}) \quad n=1,\ldots\Bigr\}. \label{eq-15} \end{equation}

Its coefficients are calculated according to (\ref{eq-12}) (with $l$ replaced by $2l$) but here we can take interval $[0,l]$ instead of $[0,2l]$ and double integrals: \begin{equation} b_n= \frac{2}{l}\int_0^l f(x)\sin (\frac{\pi (2n+1)x}{2l})\,dx \qquad n=0,2,\ldots. \label{eq-16}. \end{equation} Also (\ref{eq-13}) becomes \begin{equation} \sum_{n=0}^\infty \frac{l}{2} |b_n|^2= \int_0^l |f(x)|^2\,dx. \label{eq-17} \end{equation}

The sum of this Fourier series is $4l$-periodic. Note that odd and then periodic continuation does not introduce new jumps iff $f(0)=0$.  Fourier series in complex form

Consider (\ref{eq-2})--(\ref{eq-5}). Plugging \begin{align*} &\cos(\frac{\pi n x}{l})=\frac{1}{2}e^{\frac{i\pi n x}{l}}+\frac{1}{2}e^{-\frac{i\pi n x}{l}}\\ &\sin(\frac{\pi n x}{l})=\frac{1}{2i}e^{\frac{i\pi n x}{l}}-\frac{1}{2i}e^{-\frac{i\pi n x}{l}} \end{align*} and separating terms with $n$ and $-n$ and replacing in the latter $-n$ by $n=-1,-2,\ldots$ we get \begin{equation} f(x)= \sum_{n=-\infty}^\infty c_n e^{\frac{i\pi nx}{l}} \label{eq-18} \end{equation} with $c_0=\frac{1}{2}a_0$, $c_n = \frac{1}{2}(a_n -i b_n)$ as $n=1,2,\ldots$ and $c_n = \frac{1}{2}(a_{-n} +i b_{-n})$ as $n=-1,-2,\ldots$ which could be written as \begin{equation} c_n= \frac{1}{2l}\int_J f(x)e^{-\frac{i\pi n x}{l}}\,dx \qquad n=\ldots,-2, -1, 0,1,2,\ldots.\label{eq-19} \end{equation} Parseval's equality becomes \begin{equation} 2l\sum_{n=-\infty}^\infty |c_n|^2= \int\_J |f(x)|^2\,dx. \label{eq-20} \end{equation} One can see easily that the system \begin{equation} \Bigl\{X_n:=e^{\frac{i\pi nx}{l}} \quad \ldots,-2, -1, 0,1,2,\ldots\Bigr\} \label{eq-21} \end{equation} on interval $J:=[x_0,x_1]$ with $(x_1-x_0)=2l$ is orthogonal: \begin{equation} \int_J X_n(x)\bar{X_m(x)}\,dx = 2l\delta_{mn}. \label{eq-22} \end{equation}

Remark.

1. All our formulae are due to (Lecture 14) but we need the completeness of the systems and those are due to compleness of the system (\ref{eq-1}) established in Lecture 15.
2. Recall that with periodic boundary conditions all eigenvalues $(\frac{\pi n }{l})^2$ are of multiplicity $2$ i.e. the corresponding eigenspace (consisting of all eigenfunctions with the given eigenvalue) has dimension $2$ and $\{\cos (\frac{\pi n x}{l}), \sin (\frac{\pi n x}{l})\}$ and $\{e^ {\frac{i\pi n x}{l}}, e^{-\frac{\pi n x}{l}}\}$ are just two different orthogonal basises in this eigenspace.