How are these Fourier series coefficients obtained? From 
I wish to understand how equations $(4.8a)$ and $(4.8b)$ are obtained.
I have only seen the Fourier series be written as: $a_0 + \sum_{n=1}^{\infty} \left (a_n \cos(\frac{n\pi x}{l}) + b_n \sin(\frac{n\pi x}{l}) \right ) $ for a periodic piecewise smooth function $f(x)$ with period $2l$. Its Fourier coefficients being $a_0, a_n, b_n$  being written as $a_0 = \frac{1}{2l}\int_{-l}^{l}f(x)dx$, $a_n = \frac{1}{l}\int_{-l}^{l}f(x)\cos(\frac{n\pi x}{l})dx$, and $b_n = \frac{1}{l}\int_{-l}^{l}f(x)\sin(\frac{n\pi x }{l})dx$. These integrals, the $\textit{euler formulas}$, were obtained by saying the set $\{1, \cos(\frac{n\pi x}{l}),\sin(\frac{n\pi x }{l}) \}$ formed a $\textbf{basis}$ for the $2l$-periodic functions. The derivation process is taking the inner-product of test functions...these test functions being the elements of the basis.
Here, would the basis be $\{0, \cos(\frac{n\pi c t}{L}), \sin(\frac{n\pi c t}{L}), \sin(\frac{n \pi x}{L}))\}$?
 A: Trigonometric Polynomials
First, let us acknowledge the idea of trigonometric polynomials. Say, I have a periodic function $f$ i.e. $$f(t+T)=f(t),\;\forall t\in\mathbb{R}$$
Define $\displaystyle e_{k}(t):=e^{2jk\pi\frac{t}{T}}$ where $j=\sqrt{-1}$ and $k\in\mathbb{Z}$. So this can be interepreted as follow :
$$
''e_{k}(t)\;\text{has a period $T$ for all $k\in\mathbb{Z}$}''
$$
The same can be said for a polynomial $p$ of the form :
$$
p(t):=\sum_{k\in I}c_{k}e^{2jk\pi}
$$
where $I$ is any fixed, finite set of integers and the $c_{k}$ are arbitrary complex numbers.  By adding zero terms if necessary, we may assume that :
$$
p(t)=\sum_{k=-N}^{N}c_{k}e^{2jk\pi \frac{t}{T}}
\tag{1}$$

Before we dig in into the next concept of orthogonality we should note that $(1)$ can be represented in terms of $\text{sine}$ and $\text{cosine}$ as follow :
$$
p(t)=c_{0}+\sum_{k=1}^{N}\left(c_{k} e^{2k\pi\frac{t}{T}j}+c_{-k} e^{-2k\pi\frac{t}{T}j}\right)
$$
and by expanding the exponentials, this becomes :
$$
p(t)=\frac{T_{0}}{2}+\sum_{k=1}^{N}\left(\alpha_{k} \cos \left(2k\pi\frac{t}{T}\right)+\beta_{k} \sin \left(2k\pi\frac{t}{T}\right)\right)
$$
where for $k\geq0$ we have :
$$
\alpha_{k}:= c_{k}+c_{-k}\qquad\text{and}\qquad \beta_{k}:= j(c_{k}-c_{-k}) 
\tag{2}$$
The inverse formulas are :
$$
c_{k}=\frac{1}{2}(\alpha_{k}-j\beta_{k})\qquad\text{and}\qquad c_{-k}=\frac{1}{2}(\alpha_{k}+j\beta_{k})
\tag{3}$$
These relations are fundamental in determining the coefficients of the Fourier series.

Orthogonality
A simple computation shows that the following important relation holds
for the functions $e_{k}(t)$ :
$$
\int_{0}^{T}e_{k}(t)\overline{e}_{m}(t)\;\text{d}t=
\begin{cases}
T&\text{if $k=m$}\\
0&\text{if $k\neq m$}
\end{cases}
$$
We let $\mathcal{P}_{N}$ denote the set of all trigonometric polynomials $p$ of degree
less than or equal to $N$. $\mathcal{P}_{N}$ is obtained by letting the $c_{k}$ in formula $(1)$
vary over all possible values. If we endow this vector space, which has finite dimension equal to $\dim(\mathcal{P}_{N})\leq2N+1$
dimension with the scalar product
$$
\langle p,q \rangle := \int_{0}^{T}p(t)\overline{q}(t)\;\text{d}t
\tag{4}$$
the relation $(4)$ expresses the fact that the functions $e_{k}$ and $e_{m}$ are orthogonal :
$$
\langle e_{k},e_{m}\rangle =\begin{cases}0&\text{if $k\neq m$}\\
\|e_{k}\|_{2}=\sqrt{T}&\text{if $k=m$}
\end{cases}
$$
It follows that the vectors $e_{k}$ are independent and that
$\dim(\mathcal{P}_{N})=2N + 1$ If $p$ is of the form $(1)$, we have :
$$
\langle p,e_{k}\rangle=c_{k}\|e_{k}\|_{2}^{2}=Tc_{k}
$$
and that :
\begin{equation}
c_{k}:=\frac{1}{T}\int_{0}^{T}p(t)e^{-2k\pi \frac{t}{T}j}\;\text{d}t
\end{equation}
This is called Fourier's formula; it gives the coefficients $c_{k}$ explicitly in
terms of the function $p$. Now using $(2)$ and $(3)$ to obtain following formulas for the
coefficients $\alpha_{k}$ and $\beta_{k}$ for $k\geq0$ :
\begin{equation}
\alpha_{k}=\frac{2}{T}\int_{0}^{T}p(t)\cos\left(2k\pi\frac{t}{T}\right)\;\text{d}t\qquad\text{and}\qquad \beta_{k}=\frac{2}{T}\int_{0}^{T}p(t)\sin\left(2k\pi\frac{t}{T}\right)\;\text{d}t
\end{equation}
