Most proofs I found for the pointwise convergence of the Fourier series finishes by applying the Riemann-Lebesgue Lemma which states that if $f$ is a Riemann integrable function over $[a,\ b]$, then: $$ \lim_{\mu \to \infty} \int_{a}^{b} f(u)\cos(\mu u)du=0 $$ Now since the Dirichlet kernel is even and $2\pi$ periodic given ANY interval of this length it holds: $$ \frac{1}{\pi} \int_{x-\pi}^{x+\pi}D_N(u)du=1 $$ So multiplying by arbitrary $f(x)$: $$ f(x) = \frac{1}{\pi} \int_{x-\pi}^{x+\pi} f(x)D_N(u)du $$ Then we know the following form of the $N$th Fourier partial sum: $$ S_N(x) = \frac{1}{\pi}\int_{-\pi}^{\pi}f(u)D_N(x-u)du $$ Then we make the substitution $u = x - t$ and we obtain: $$ S_N(x)=-\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 $$ Then usally we are told that since we assume $f$ to be $2 \pi$ periodic this latter integral is: $$ \frac{1}{\pi}\int_{-\pi}^{\pi}f(x-t)D_N(t)dt $$ But I thought, what if I did not require $f$ to be periodic? Then for the difference $f(x) - S_N(x)$ we obtain:
$$ \frac{1}{\pi}\int_{x-\pi}^{x+\pi}(f(x) - f(x - t))D_N(t)dt $$ Then we expand the Dirichlet kernel to its closed form so that we can apply the Riemann Lebesgue Lemma: $$ f(x)-S_N(x)=\frac{1}{\pi}\int_{x-\pi}^{x+\pi}(f(x) - f(x - t))\frac{\sin((N + \frac{1}{2})t)}{2\sin(\frac{t}{2})}dt $$ Some little rearrangement: $$ \frac{1}{\pi}\int_{x-\pi}^{x+\pi}\frac{f(x) - f(x - t)}{2\sin(\frac{t}{2})}(\sin(Nt)\cos(\frac{t}{2}) + \cos(Nt)\sin(\frac{t}{2}))dt $$ And finally we split the integral into 2: $$ \frac{1}{\pi}\int_{x-\pi}^{x+\pi} \frac{f(x) - f(x - t)}{2}\cos(Nt)dt+ \frac{1}{\pi}\int_{x-\pi}^{x+\pi} \frac{(f(x) - f(x - t))\cos(\frac{t}{2})}{2\sin(\frac{t}{2})}\sin(Nt)dt $$ And principally, this formula is indeed true for $f(x) - S_N(x)$. To obtain it, I never ever had to use such information that $f$ should be $2\pi$ periodic. That being said, in this form, I can not state that, by the Riemann-Lebesgue Lemma, the two integrals tend to zero? That would be false since the Fourier series is periodic by nature and is said to converge to a periodic extension of $f$. The original proof eliminates the $x$ in the bounds of the integral. As I have mentioned, that is ONLY possible if $f$ is $2\pi$ periodic. But in no other step of the proof it seems evident that $f$ must be periodic. So we get in the original proof: $$ \frac{1}{\pi}\int_{-\pi}^{\pi} \frac{f(x) - f(x - t)}{2}\cos(Nt)dt + \frac{1}{\pi}\int_{-\pi}^{\pi} \frac{(f(x) - f(x - t))\cos(\frac{t}{2})}{2\sin(\frac{t}{2})}\sin(Nt)dt $$ Then the proof shows that in both of the integrals the integrand is differentiable and due to the Riemann-Lebesgue Lemma the two integrals tend to zero and finishes the proof. So why is it that for a fixed $x$ I cannot apply the lemma in former, but I can apply it in the latter case?