How to understand the construction of these trigonometric polynomials? I'm reading Stein's book about Fourier series and in this book the following theorem is proved (in everything that follows, the author uses just Riemann integration):

Suppose that $f$ is an integrable function on the circle with Fourier coefficients $a_n=0$ for all $n\in \mathbb{Z}$. Then $f(\theta_0)=0$ whenever $f$ is continuous at the point $\theta_0$.

The proof goes as follows:

We suppose first that $f$ is real valued, and argue by contradiction. Assume, without loss of generality, that $f$ is defined on $[-\pi,\pi]$, that $\theta_0=0$ and $f(0)>0$. The idea now is to construct a family of trigonometric polynomials $\{p_k\}$ that "peak" at $0$, and so that $\int p_k(\theta)f(\theta)\to \infty$. This will be our desired contradiction, since these integrals are equal to zero by assumption.
Since $f$ is continuous at $0$ we can choose $0<\delta \leq \pi/2$, so that $f(\theta)>f(0)/2$ whenever $|\theta|<\delta$. Let
$$p(\theta)=\epsilon+\cos\theta$$
where $\epsilon>0$ is chosen so small that $|p(\theta)|<1-\epsilon/2$, whenever $\delta \leq |\theta|\leq \pi$. Then, choose a positive $\eta$ with $\eta < \delta$, so that $p(\theta)\geq 1+\epsilon/2$, for $|\theta|<\eta$. Finally let
$$p_k(\theta)=[p(\theta)]^k,$$
and select $B$ so that $|f(\theta|)\leq B$ for all $\theta$. This is possible since $f$ is integrable, hence bounded. By construction each $p_k$ is a trigonometric polynomial and since $a_n=0$ for all $n$ we must have $\int_{-\pi}^\pi f(\theta)p_k(\theta)d\theta=0$.
However we have the estimate $|\int_{\delta\leq |\theta|}f(\theta)p_k(\theta)d\theta|\leq 2\pi B(1-\epsilon/2)^k$. Also our choice of $\delta$ guarantees that $p(\theta)$ and $f(\theta)$ are non-negative whenever $|\theta|<\delta$, thus $\int_{\eta\leq|\theta|\leq \delta}f(\theta)p_k(\theta)d\theta\geq 0$. Finally $\int_{|\theta|<\eta}f(\theta)p_k(\theta)d\theta\geq 2\eta \frac{f(0)}{2}(1+\epsilon/2)^k$. Therefore $\int p_k(\theta)f(\theta)d\theta\to \infty$ as $k\to \infty$.

Now, the only part of all of this I can understand is that there is $\delta$ so that $f(\theta)>f(0)/2$ whenever $|\theta|<\delta$.
There are several points:

*

*First is the intuition. How on earth would anyone have the idea to do this construction? I would never think of something like that. Before starting this proof, how could one have the idea about this construction, and have the idea of each step required?


*Why pick $p(\theta)$ like that? Why pick $\epsilon$ so small that $|p(\theta)|< 1-\epsilon/2$ when $\delta \leq |\theta|\leq \pi$? Also, why  such $\epsilon$ exists?


*Now, the same for $\eta$, why pick $\eta$ so that $\eta < \delta$ and $p(\theta) \geq 1 +\epsilon/2$ when $|\theta|<\eta$? Also why such $\eta$ exists?


*Why pick $p_k(\theta)=[p(\theta)]^k$? What is the reasoning here?
I really can't understand this contruction. I've tried for some time, but I really can't understand almost anything of that.
How can we understand all these points?
 A: *

*Regarding the intuition, the idea is as follows. Since all of the Fourier coefficients of $f$ are zero, this means that $\int_{-\pi}^{\pi}f(\theta) p(\theta) d\theta = 0$ for any trigonometric polynomial $p$. Now the idea is to construct a sequence of trigonometric polynomials $p_k$ which which become increasingly "concentrated" at $\theta = 0$, in the sense that in some fixed neighborhood around $\theta = 0$, as $k$ increases, the graph of $p_k$ becomes very tall inside the neighborhood and very small outside the neighborhood. Then the integral $\int_{-\pi}^{\pi}f(\theta)p_{k}(\theta) d\theta$ becomes approximately proportional to $f(0) \times p_k(0) \times \text{width of neighborhood}$ as $k$ grows large. The width of the neighborhood and $f(0)$ are fixed positive numbers, and $p_k(0) \to \infty$ as $k \to \infty$, so $\int_{-\pi}^{\pi}f(\theta)p_{k}(\theta) d\theta \to \infty$, giving us the desired contradiction.

*We want $|p(\theta)|$ to be bounded above by some constant which is strictly smaller than one outside of the small $\delta$-neighborhood centered at the origin. This ensures that for $|\theta| > \delta$ we have $p(\theta)^k \to 0$ uniformly as $k \to \infty$.

*Similarly, we want $p(\theta)$ to be bounded below by some constant which is strictly greater than one inside the small $\eta$-neighborhood centered at the origin. This ensures that for $|\theta| < \eta$ we have $p(\theta)^k \to \infty$ uniformly as $k \to \infty$.

*Once we have constructed $p(\theta)$ as a trigonometric polynomial satisfying $p(\theta) > 1 + \epsilon/2$ inside the $\eta$-neighborhood and $|p(\theta)| < 1 - \epsilon/2$ outside the $\delta$-neighborhood, defining $p_k(\theta) = p(\theta)^k$ ensures three things: (i) $p_k(\theta)$ is a trigonometric polynomial, (ii) inside the $\eta$-neighborhood, $p_k(\theta) \to \infty$ uniformly, and (iii) outside the $\delta$-neighborhood, $p_k(\theta) \to 0$ uniformly. The latter two facts are simply consequences of the facts that $(1+\epsilon/2)^k \to \infty$ and $(1 - \epsilon/2)^k \to 0$ as $k \to \infty$.
Finally, let's see why the indicated $\epsilon$ and $\eta$ exist.
First, if we draw a picture of $\epsilon + \cos(\theta)$ for $-\pi \leq \theta < \pi$, we see that the $y$ values of this graph lie between $-1 + \epsilon$ and $1 + \epsilon$. We can choose $\epsilon$ small enough to satisfy $\epsilon + \cos(\delta) < 1 - \epsilon /2$ by simply rearranging this inequality to obtain the equivalent condition $\epsilon < \frac{2}{3}(1 - \cos(\delta))$. Since $\cos$ is monotonically decreasing in the interval $[\delta, \pi]$, this ensures that $\epsilon + \cos(\theta) < 1 - \epsilon/ 2$ is satisfied for all $\theta \in [\delta, \pi]$. Therefore in this interval we have 
$$-1 + \epsilon/2 < -1 + \epsilon < \cos(\theta) + \epsilon < 1 - \epsilon / 2$$
or equivalently $|\cos(\theta) + \epsilon| < 1 - \epsilon/2$ as desired. The same inequality is satisfied for $\theta \in [-\pi, -\delta]$ because $\cos(\theta) + \epsilon$ is an even function of $\theta$.
The argument for the existence of $\eta$ satisfying the indicated condition is quite similar.
A: A typical study of the Fourier series starts with the truncated Fourier series. The coefficients of $e^{in\theta}$ are given by
$$
        a_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta')e^{-in\theta'}d\theta'
$$
If you extend $f$ periodically from $[-\pi,\pi]$ to all of $\mathbb{R}$ with period $2\pi$, then the truncated Fourier may be written as
$$
     S_N^f(\theta)= \sum_{n=-N}^{N}a_ne^{in\theta} = \frac{1}{2\pi}\int_{-\pi}^{\pi}\frac{\sin(\frac{1}{2}(2N+1)\theta')}{\sin\frac{1}{2}\theta'}f(\theta+\theta')d\theta'
$$
This integral kernel is known as the Dirichlet kernel, and it dates back to Fourier in the first decade of the 1800's. (The kernel was misattributed to Dirichlet because Fourier's original work was banned from publication for so long. Dirichlet was Fourier's student.) The Dirichlet kernel is difficult to work with because it is oscillatory.
An interesting kernel resulted when Fejer applied Abel's summability trick about a century later to improve the converge of the Fourier series
$$
      F_{N}^{f}(\theta) = \frac{1}{N}\left[S_{0}^{f}+S_{1}^{f}+S_{2}^{f}+\cdots+S_{N-1}^{f}\right].
$$
Abel's trick resulted in a representation that also had an explicit representation given by
$$
      F_{N}^{f}(\theta) = \frac{1}{2\pi N}\int_{-\pi}^{\pi}\frac{\sin^2(N\theta'/2)}{\sin^2(\theta'/2)}f(\theta+\theta')d\theta'.
$$
This integral kernel is known as the Fejer kernel. For either kernel, the
constant function $f\equiv 1$ has to be exactly represented, which means that the kernel integrates to $1$ over $[-\pi,\pi]$. Because of the positivity of the Fejer kernel, you can show that
$$
           \lim_{N\rightarrow\infty}F_{N}^{f}(\theta)=f(\theta)
$$
at any point $\theta$ where $f$ is continuous. In other words, averaging the partial sums of the Fourier series causes the sequence of partial sums to converge to $f$ at every point where $f$ is continuous! This is because
$$
     F_N^f(\theta)-f(\theta) = \frac{1}{2\pi N}\int_{-\pi}^{\pi}\frac{\sin^2(N\theta'/2)}{\sin^2(\theta'/2)}\{f(\theta+\theta')-f(\theta)\}d\theta'
$$
and, for any $0 < \delta < \pi$,
$$
       \lim_{N\rightarrow\infty}\frac{1}{2\pi N}\int_{-\pi}^{\pi}\frac{\sin^2(N\theta'/2)}{\sin^2(\theta'/2)}\{f(\theta+\theta')-f(\theta)\}d\theta' \\
=\lim_{N\rightarrow\infty}
 \frac{1}{2\pi N}\int_{-\delta}^{\delta}\frac{\sin^2(N\theta'/2)}{\sin^2(\theta'/2)}\{f(\theta+\theta')-f(\theta)\}d\theta'.
$$
The ideas in Stein are no doubt coming from the Fejer kernel, which was standard material in Fourier analysis for most of the twentieth century. Stein found a trick to avoid the Fejer representation. The end result is the same: If a function has all $0$ Fourier coefficients, then $f(\theta)=0$ must hold at every point $\theta$ where $f$ is continuous.
