# 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! – Christian Clason Aug 27 '16 at 22:01
• @ChristianClason: As you wish! – hardmath Aug 27 '16 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? – Laurent Duval Aug 29 '16 at 21:09

• Any constant function is also a linear function with slope $a=0$... – Christian Clason Aug 27 '16 at 22:07
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.