[Math] Fourier Series of Real-valued Functions

fourier analysisfourier series

Context: For a $2\pi$-periodic bounded function $f:\mathbb{R}\to\mathbb{C}$, we define the complex Fourier coefficients of $f$ by
$$
\hat{f_k}:=\frac{1}{2\pi}\int_0^{2\pi}f(x)e^{-ikx}\,dx.
$$
We call Fourier series of $f$ the formal series
$$
\sum_{k=-\infty}^{\infty}\hat{f_k}e^{ikx}.\tag{1}
$$
Now, it is easily shown that
$$
\overline{\hat{f_k}}=\hat{\overline{f}}_{-k}.
$$
Hence if $f$ is real-valued then
$$
\overline{\hat{f_k}}=\hat{f}_{-k}.\tag{2}
$$
Reading some notes, it is said that if $f$ is a real-valued function, then we can write
$$
\hat{f_k}=\frac{1}{2\pi}\int_0^{2\pi}f(x)\cos(kx)\,dx-i\frac{1}{2\pi}\int_0^{2\pi}f(x)\sin(kx)\,dx.\tag{3}
$$
Putting
$$
a_k:=\frac{1}{\pi}\int_0^{2\pi}f(x)\cos(kx)\,dx,\\
b_k:=\frac{1}{\pi}\int_0^{2\pi}f(x)\sin(kx)\,dx,
$$
where $a_k,b_k$ are called the real Fourier coefficients of $f$, it is said that in view of $(2)$, we have the relations
\begin{align}
\hat{f_0}&=\frac{1}{2}a_0,\\
\hat{f_k}&=\frac{1}{2}(a_k-ib_k),\\
a_k&=\hat{f_k}+\hat{f}_{-k},\tag{4}\\
b_k&=i(\hat{f_k}-\hat{f}_{-k}),\\
a_{-k}&=a_k,\\
b_{-k}&=-b_k.
\end{align}
Finally it is said that if, once again, $f$ is real-valued, then we can write $(1)$ as the trigonometric series
$$
\frac{1}{2}a_0+\sum_{k=1}^{\infty}a_k\cos(kx)+b_k\sin(kx).\tag{5}
$$
Question: Is it really essential that $f$ be real-valued for $(3)$, $(4)$ and $(5)$ to hold? It seems to me that everything holds even if $f$ is complex-valued…

Best Answer

Yes they hold assuming $a_k,b_k$ are complex, but the point is that they are real valued and thus by using (2) we can show that $$ \hat f_k e^{ikx} + \hat f_{-k} e^{-ikx} = \hat f_k e^{ikx} + (\hat f_k e^{ikx})^* = 2 \mathrm{Re} \{ f_k e^{ikx} \} = 2 \mathrm{Re} \Big\{ \frac{1}{2} (a_k-ib_k)(\cos(kx)+ i\sin(kx)) \Big\} = a_k\cos(kx) + b_k \sin(kx) $$

We can also show that same thing holds if $a_k,b_k$ are complex:

\begin{align} \hat f_k e^{ikx} + \hat f_{-k} e^{-ikx} &= \frac{1}{2}(a_k - ib_k) e^{ikx} + \frac{1}{2}(a_{-k} - ib_{-k}) e^{-ikx}\\&= \frac{1}{2}(a_k - ib_k) e^{ikx} + \frac{1}{2}(a_{k} + ib_{k}) e^{-ikx} \\&= \frac{1}{2} a_k (e^{ikx}+e^{-ikx}) - \frac{1}{2}i b_{k}( e^{ikx} - e^{-ikx}) \\&= a_k \cos(kx) + b_{k}\sin(kx) \end{align}

Related Question