Interpolation#
We frequently encounter situations where we only have data at a discrete number of points, or a function is very to expensive to compute on demand, so we tabulate it at several points.
Interpolation fills in the gaps in our data by making an assumption about the behavior of the underlying functional form of the data.
Many types of interpolation exists:
Some ensure that no new extrema a introduced.
Some ensure a physical constraint (like thermodynamic consistency) is satisfied/
Some ensure smoothness of the fit.
Some ensure the quantity being interpolated is conserved.
Generally speaking, you need to balance the number of points used in constructing an interpolant (which can increase accuracy) against pathologies (like oscillations).
Important
Interpolation and Fitting are different operations. Fitting seeks to produce a simple functional model that represents the entire dataset. Interpolation looks to fill in the gaps in some region of your dataset.
Reference
The discussion in Pang, An Introduction to Computational Physics provides a good introduction.