# What method to use for interpolation and extrapolation?

Below are discrete samples { t1, f(t1) }, { t2, f(t2) }, ... ,{ tn, f(tn) } using Mathematica syntax.

{{7.0,0.354887404925574},{7.3,0.4003399403324751}, {7.6,0.5849632195845474},{7.9,0.8785638270289906}, {8.2,1.235637591701261},{8.5,1.6025351028031707}, {8.8,1.925797159944803},{9.1,2.160385431197419}, {9.4,2.276553177467603},{9.7,2.2643104784151262}, {10.0,2.1348061618705962},{10.3,1.9184189440030162}, {10.6,1.6598520161702173},{10.9,1.4109826017641867}, {11.2,1.2225616685298717},{11.5,1.1360369427321668}}

Now I plot the samples.

The samples are from a bandlimited function f(t) that I defined. However, suppose they are discrete samples of an unkown function, but we know the Fourier spectrum of f(t) is band-limited to frequencies 0.25 Hz and below. What would be a good method to use for interpolating between the samples and extrapolate beyond the samples? Here I mentioned that polynomial interpolation has less error than cubic spline interpolation in a case like this? What method would have even less approximation error in a case like this?

• for band-limited functions, sinc-interpolation yields the exact function. However, it does not work for extrapolation. Note, that sinc-interpolation also does not work nicely at the edges of the sampled interval, due to its non-causality and slow decay. Further note, that you might need much more samples (a larger sampled interval), since a max. frequency of 0.25Hz is already 4seconds period (your interval is just 5 seconds), so smaller frequencies will not even have a full period of sampled signal. This might make it more difficult. Apr 10, 2017 at 6:53

$$\mathrm{Truth}(t) = 1.4 + \frac{\sin(13-t)}{13-t} - \sin\big((1.3)(13-t)\big)$$ In this case, the sample rate is several times the Nyquist frequncy of the signal. When that is the case, we can get a very good interpolation over the samples by finding a linear combination of eight sin(f t) terms and eight cos(f t) terms that interpolate the sixteen samples. Results using eight frequencies equally spaced from ($\tfrac{\pi}{16}$ = 0.19635 radians/second) to ($\tfrac{\pi}{2}$ = 1.5708 radians/second) are shown below.
This method is far better for extrapolation (i.e. beyond the samples) than any other method I know of, and the interpolation error (i.e. between samples) is less than $4 \times 10^{-12}$.