# Is there any function gives no interpolation error in numerical analysis

I was reading about Interpolation error formula and Runge's phenomenon.

My question is : Is there any function that gives no error at all? In other words the interpolation function $p$ would equal the actual function $f$.

My answer is : If we choose a function $f(x) = 1$ then we will get no error.

Is my answer correct?

• @hardmath Sounds like an answer to me! Aug 27, 2016 at 22:01
• @ChristianClason: As you wish!
– hardmath
Aug 27, 2016 at 22:06
• I do not understand the hypotheses: what is the class of interpolation functions? What loss functions are considered? Through which points should the interpolation pass? Aug 29, 2016 at 21:09

## 3 Answers

I would think that the answer is a linear function f(x)=ax+b, not a constant function because the first order interpolation rule is Euler's method and this has no interpolation error. i.e f(x_1)-f(x_2)/(x_1-x_2) will always be easily determined but there will be an introduction of a rounding error for small values.

• Any constant function is also a linear function with slope $a=0$... Aug 27, 2016 at 22:07

Any polynomial interpolation method will include a 0th-order term and thus interpolate a constant exactly.

Further, some methods have the nice property that they can interpolate polynomials up to some degree $N$ exactly, where $N$ is also the max. interpolation degree. Lagrange polynomials are an example of this.

Interpolation generally means estimating values of a function "between" known data. In higher dimensions the "between" concept is not as clear, but we are still concerned with finding an approximation to known data.

It is often easy to give expressions (such as a polynomial, rational function, or sum of sines and cosines) that fit known data exactly. Asking for an exact fit to "in-between" values amounts to assuming the underlying function belongs to the "space" that furnishes approximations.