Pointwise convergence of Fourier Series to aperiodic function The Fourier Series of $f(x)$ is said to be:
$$f(x) = \lim_{N \to \infty}\sum_{i=0}^{N}{(a_i\cos(\frac{2\pi}{P}ix)+b_i\sin(\frac{2\pi}{P}ix))}$$
Now it is said that you can obtain the belonging coefficients by integrating on both sides, from an arbitrary point $t$ to an arbitrary point $t + P$, and multiplying by cosines and sines of the different frequencies. This will result in zeroing out every term except one on the RHS, and rearrangement will yield the coefficient.
It is said that, if the function is $P$-periodic, then the series will converge to the function uniformly everywhere. But, it is also said that even though the function is not periodic, the series still converges uniformly on our chosen interval from $t$ to $t+P$.
(So it will sort of infinitely repeat an interval of the input function. And the idea behind the Fourier Transform is to let $P \nearrow \infty$ so that we can approximate aperiodic functions.)
I have taken a close look at the proof of pointwise convergence below:
https://www.sciencedirect.com/topics/mathematics/dirichlet-kernel
You can get to the proof by searching for: "4.3 Methods of Convergence of Fourier Series"
The method of this proof is classical: it will involve proving that $\lim_{N \to \infty} \mid f(x) - S_N(x) \mid = 0$ by using the Dirichlet kernel and Riemann-Lebesgue Lemma.
What is not entirely clear for me, is from which part of the proof is it evident that the input function is required to be periodic? As far as I know, if you gained the coefficients by integrating from $t$ to $t+P$, then on this one single interval the series should still converge even if the function is aperiodic. And then how would you prove pointwise convergence at $x \in \left[t,t+P\right]$ to an aperiodic function?
 A: To summarize the apt remarks by Herb Steinberg and Nate Eldridge:
First, let me make clear that I am very sympathetic to this sort of question, as I was very confused by such things when I was learning about Fourier series and related matters. As in "how does the function know that we made it periodic?".
Then the computation of Fourier coefficients depends on the interval we restrict the function to. The corresponding expression in sines and cosines by_its_nature produces a periodic function, which agrees with the original function on the specified interval (more-or-less).
The convergence of the Fourier series to the original function (on the specified interval) is a non-trivial thing in itself. For many reasons, we often want uniform convergence, which is by no means promised. Even raw pointwise convergence is not guaranteed in much generality. Fortunately, these difficulties in our naive conception of "what we want" are not fatal, because it turns out that other forms of convergence (in $L^2$, or in Sobolev spaces) are often sufficient to justify computational conclusions.
