$\renewcommand{\Re}{\operatorname{Re}}$ $\newcommand{\erf}{\operatorname{erf}}$ $\newcommand{\dag}{\dagger}$ $\newcommand{\const}{\mathrm{const}}$
In the previous Lecture 14 we wrote Fourier series in the complex form
\begin{equation} f(x)= \sum_{n=-\infty}^\infty c_n e^{\frac{i\pi nx}{l}} \label{equ-15.1} \end{equation} with \begin{equation} c_n= \frac{1}{2l}\int_{-l}^l f(x)e^{-\frac{i\pi n x}{l}}\,dx \qquad n=\ldots,-2, -1, 0,1,2,\ldots \label{equ-15.2} \end{equation} and \begin{equation} 2l\sum_{n=-\infty}^\infty |c_n|^2=\int_{-l}^l|f(x)|^2\,dx. \label{equ-15.3} \end{equation}
From this form we formally without any justification deduct Fourier integral.
First we introduce \begin{equation} \omega_n := \frac{\pi n}{l}\qquad \text{and}\qquad \Delta \omega_n = \omega_{n}-\omega_{n-1}= \frac{\pi}{l} \label{equ-15.4} \end{equation} and rewrite (\ref{equ-15.1}) as \begin{equation} f(x)= \sum_{n=-\infty}^\infty C(\omega_n) e^{i\omega_n x}\Delta \omega_n \label{equ-15.5} \end{equation} with \begin{equation} C(\omega)= \frac{1}{2\pi}\int_{-l}^l f(x)e^{-i\omega x}\,dx \label{equ-15.6} \end{equation} where we used $C(\omega_n) := c_n /(\Delta\omega_n)$; (\ref{equ-15.3}) should be rewritten as \begin{equation} \int_{-l}^l|f(x)|^2\,dx= 2\pi\sum_{n=-\infty}^\infty |C(\omega_n)|^2\Delta \omega_n. \label{equ-15.7} \end{equation} Now we formally set $l\to +\infty$; then integrals from $-l$ to $l$ in the right-hand expression of (\ref{equ-15.6}) and the left-hand expression of (\ref{equ-15.7}) become integrals from $-\infty$ to $+\infty$.
Meanwhile, $\Delta\omega_n \to +0$ and Riemannian sums in the right-hand expressions of (\ref{equ-15.5}) and (\ref{equ-15.7}) become integrals: \begin{equation} f(x)= \int_{-\infty}^\infty C(\omega ) e^{i\omega x}\,d \omega \label{equ-15.8} \end{equation} with \begin{equation} C(\omega)= \frac{1}{2\pi}\int_{-\infty}^\infty f(x)e^{-i\omega x}\,dx; \label{equ-15.9} \end{equation} (\ref{equ-15.3}) becomes \begin{equation} \int_{-\infty}^\infty |f(x)|^2\,dx= 2\pi\int_{-\infty}^\infty |C(\omega)|^2\,d\omega. \label{equ-15.10} \end{equation}
Definition 1. (\ref{equ-15.9}) gives us a Fourier transform of $f(x)$, it usually is denoted by "hat": \begin{equation} \hat{f}(\omega)= \frac{1}{2\pi}\int_{-\infty}^\infty f(x)e^{-i\omega x}\,dx; \tag{FT}\label{FT} \end{equation} sometimes it is denoted by "tilde" ($\tilde{f}$), and seldom just by a corresponding capital letter $F(\omega)$.
Definition 2. (\ref{equ-15.8}) is a Fourier integral aka inverse Fourier transform: \begin{equation} f(x)= \int_{-\infty}^\infty \hat{f}(\omega) e^{i\omega x}\,d \omega \tag{FI}\label{FI} \end{equation} aka \begin{equation} \check{F}(x)= \int_{-\infty}^\infty F(\omega) e^{i\omega x}\,d \omega \label{IFT}\tag{IFT} \end{equation}
Remark 1. (\ref{equ-15.10}) is known as Plancherel theorem \begin{equation} \int_{-\infty}^\infty |f(x)|^2\,dx=2\pi\int_{-\infty}^\infty |\hat{f}(\omega )|^2\,d\omega. \tag{PT}\label{PT} \end{equation}
We can consider corresponding operator $LX=-X''$ in the space $L^2(\mathbb{R})$ of the square integrable functions on $\mathbb{R}$ but $e^{i\omega x}$ are no more eigenfunctions since they dos not belong to this space. In advanced Real Analysis such functions often are referred as generalized eigenfunctions.
Applying the same arguments as in the previous Lecture 14 we can rewrite formulae (\ref{equ-15.8})--(\ref{equ-15.10}) as \begin{equation} f(x)= \int_0^\infty \bigl( A(\omega) \cos(\omega x) +B(\omega ) \sin (\omega x)\bigr) \,d \omega \label{equ-15.11} \end{equation} with \begin{align} & A(\omega)= \frac{1}{\pi}\int_{-\infty}^\infty f(x)\cos (\omega x) \,dx, \label{equ-15.12}\\ & B(\omega)= \frac{1}{\pi}\int_{-\infty}^\infty f(x)\sin (\omega x) \,dx, \label{equ-15.13} \end{align} and \begin{equation} \int_{-\infty}^\infty |f(x)|^2\,dx= \pi\int_0^\infty \bigl( |A(\omega )|^2+|B(\omega )|^2\bigr)\,d\omega. \label{equ-15.14} \end{equation}
$A(\omega)$ and $B(\omega)$ are $\cos$- and $\sin$- Fourier transforms and
Therefore
Recall Theorem 13.2
Let $f$ be a piecewise continuously differentiable function. Then the Fourier series \begin{equation} \frac{a_0}{2}+\sum_{n=1}^\infty \Bigl(a_n\cos \bigl(\frac{\pi n x}{l}\bigr) + a_n\cos \bigl(\frac{\pi n x}{l}\bigr)\Bigr) \label{equ-15.19} \end{equation} converges to
(b) $\frac{1}{2}\bigl(f(x+0)+f(x-0)\bigr)$ if $x$ is internal point and $f$ is discontinuous at $x$.
Exactly the same statement holds for Fourier Integral in the real form \begin{equation} \int_0^\infty \Bigl(A(\omega) \cos (\omega x) + B(\omega)\sin (\omega x)\Bigr)\,d\omega \label{equ-15.20} \end{equation} where $A(\omega)$ and $B(\omega)$ are $\cos$-and $\sin$-Fourier transforms.
None of them however holds for Fourier series or Fourier Integral in the complex form: \begin{gather} \sum_{n=-\infty}^\infty c_n e^{i\frac{\pi n x}{l}},\label{equ-15.21}\\ \int_{-\infty}^\infty C(\omega)e^{i\omega x}\,d\omega. \label{equ-15.22} \end{gather}
Why and what remedy do we have? If we consider definition of the partial sum of (\ref{equ-15.19}) and then rewrite in the complex form and similar deal with (\ref{equ-15.22}) we see that in fact we should look at \begin{gather} \lim_{N\to \infty} \sum_{n=-N}^N c_n e^{i\frac{\pi n x}{l}}, \label{equ-15.23}\\ \lim_{N\to \infty} \int_{-N}^N C(\omega)e^{i\omega x}\,d\omega \label{equ-15.24}. \end{gather} Meanwhile convergence in (\ref{equ-15.21}) and (\ref{equ-15.22}) means more than this: \begin{gather} \lim_{M,N\to \infty} \sum_{n=-M}^N c_n e^{i\frac{\pi n x}{l}}, \label{equ-15.25}\\ \lim_{M,N\to \infty} \int_{-M}^N C(\omega)e^{i\omega x}\,d\omega \label{equ-15.26} \end{gather} where $M,N$ tend to $\infty$ independently. So the remedy is simple: understand convergence as in (\ref{equ-15.23}), (\ref{equ-15.24}) rather than as in (\ref{equ-15.25}), (\ref{equ-15.26}).
For integrals such limit is called principal value of integral and is denoted by \begin{equation*} \operatorname{pv}\int_{-\infty}^\infty G(\omega)\,d\omega. \end{equation*} BTW similarly is defined \begin{equation*} \operatorname{pv}\int_{a}^b G(\omega)\,d\omega:= \lim_{\varepsilon\to +0} \Bigl(\int_a^{c-\varepsilon}G(\omega)\,d\omega+ \int_{c+\varepsilon}^bG(\omega)\,d\omega\Bigr) \end{equation*} if there is a singularity at $c\in (a,b)$.Often instead of vp is used original (due to Cauchy) vp (valeur principale) and some other notations.
This is more general than the improper integrals studied in the end of Calculus I (which in turn generalize Riemann integrals). Those who took Complex Variables encountered such notion.