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?
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.