Need of periodic function for Fourier spectral method?

155 Views Asked by At

While applying Fourier spectral method to solve any PDE, why do we need the function to be periodic? And, similarly, why do we switch to Chebyshev spectral method if the function is non-periodic?

I can assume that the second part of the question is related to the Chebyshev grid. But, the grid comes into the picture if we want a fast computation that uses FFT. I am unable to process different thoughts. Any help would be appreciated.