I have seen the proof of pointwise convergence of the Fourier Series using the Dirichlet kernel as:
$$ f(x)\frac{1}{\pi}\int_{-\pi}^{\pi}{D_n(t)dt}=f(x) $$
Since $$ \frac{1}{\pi}\int_{-\pi}^{\pi}{D_n(t)dt}=1 $$ Though it is also true that: $$ \frac{1}{\pi}\int_{-\pi}^{0}{D_n(t)dt}=\frac{1}{\pi}\int_{0}^{\pi}{D_n(t)dt}=\frac{1}{2} $$ Since the Dirichlet-Fourier kernel is even. Now in order to show: $$\lim_{N \to \infty} f(x) - S_N(x) = 0$$ Where $S_n$ is the partial Fourier Series of $f(x)$ that can be written as: $$ \frac{1}{\pi}\int_{-\pi}^{\pi}{f(t)D_N(x - t)dt} $$ We have to make a change of variables so that we have a single variable $t$ in the kernel: $$ -\frac{1}{\pi}\int_{x+\pi}^{x-\pi}{f(x-t)D_N(t)dt} = \frac{1}{\pi}\int_{x-\pi}^{x+\pi}{f(x-t)D_N(t)dt} $$ Now in the next step of the proof it would be said that $f(x)$ requires to be $2\pi$ periodic so that we can shift the above integral to any interval of length $2\pi$ (since the Dirichlet kernel is periodic, and the product of 2 such periodic functions is periodic): $$ \frac{1}{\pi}\int_{x-\pi}^{x+\pi}{f(x-t)D_N(t)dt}=\frac{1}{\pi}\int_{-\pi}^{+\pi}{f(x-t)D_N(t)dt} $$ Though it is entirely unclear why this step is essential in order for completion. And now we are going to be able to write up the difference of $f(x)$ and $S_N(x)$ as: $$ f(x) - S_N(x) = \frac{1}{\pi}\int_{-\pi}^{\pi}{(f(x) - f(x-t))D_N(t)dt} $$ Now if we were to replace $D_N(t)$ with its single expression form, we would be able to apply the Riemann-Lebesgue Lemma and show $f(x) - S_N(x) \nearrow 0$ given that $f$ is differentiable at $x$ (there are better proofs that show $S_N(x)$ approaches the average of left and right hand side limits at a point of discontinuity). Now what my question is, if above we did NOT use the fact that $f(x)$ must be periodic in order for this to hold true: $$ \frac{1}{\pi}\int_{x-\pi}^{x+\pi}{f(x-t)S_N(t)dt}=\frac{1}{\pi}\int_{-\pi}^{+\pi}{f(x-t)S_N(t)dt} $$ Then why would not I be able to complete the proof saying that hey, $f(x)$ could be an arbitrary aperiodic function, and I do not even need to restrict the domain of $f(x)$ to the interval of integration? So why can not I write: $$ f(x) - S_N(x) = \frac{1}{\pi}\int_{x-\pi}^{x+\pi}{(f(x) - f(x-t))D_N(t)dt} $$ And apply the Riemann-Lebesgue Lemma the same way? In which very exact step of the proof I can not proceed without stating $f(x)$ is ought to be periodic if its domain is extended to the set of real numbers? Or even better question, what if I said I insist that $f(x)$ is an arbitrary function, then which part of the proof tells me that if I complete it then it will only be true between $-\pi$ and $\pi$?