Skip to main content
Mathematics LibreTexts

5.01: Prerequisites to Interpolation

  • Page ID
    126409

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Lesson 1: Prerequisites to Interpolation

    Learning Objectives

    After successful completion of this lesson, you should be able to:

    1) define interpolation

    2) interpolate using a straight line.

    What is interpolation?

    Many times, as given in Figure \(\PageIndex{1.1}\), data is given only at discrete points such as \(\left( x_{0},y_{0} \right),\) \(\left( x_{1},y_{1} \right)\), \(\displaystyle ......,\left( x_{n - 1},y_{n - 1} \right)\), \(\displaystyle \left( x_{n},y_{n} \right)\). So, how then does one find the value of \(y\) at any other value of \(x\)? Well, a continuous function \(f\left( x \right)\) may be used to represent the \(n + 1\) data values with \(f\left( x \right)\) passing through the \(n + 1\) points (Figure \(\PageIndex{1.1}\)). Then one can find the value of \(y\) at any other value of \(x\). This curve fitting technique is called interpolation.

    A function is given as two continuous regions separated by a region containing only a series of discrete points.
    Figure \(\PageIndex{1.1}\). Interpolation of a function given at discrete points.

    The function \(f\left( x \right)\) chosen for interpolation is called the interpolant. The value of \(y\) at any other value of \(x\) that is not at the discrete data points is called the interpolated value. Of course, if \(x\) falls outside the domain of \(x\) for which the data is given, it is no longer interpolation and is called extrapolation.

    So, what kind of function \(f\left( x \right)\) should one choose? A polynomial is a common choice for an interpolating function because polynomials are easy to

    (A) evaluate,

    (B) differentiate, and

    (C) integrate

    relative to other choices such as trigonometric and exponential series. For example, given data points \((2,4), (3,10), (5,16)\), one may interpolate the data to

    \[y\left( x \right) = a_{0} + a_{1}x + a_{2}x^{2},\ 2 \leq x \leq 5 \nonumber\]

    Other examples of usable interpolants are

    \[y\left( x \right) = a_{0} + a_{1}e^{x} + a_{2}e^{2x},\ 2 \leq x \leq 5 \nonumber\]

    \[y\left( x \right) = a_{0} + a_{1}\sin x + a_{2}\sin2x,\ 2 \leq x \leq 5 \nonumber\]

    The problem hence reduces to finding the unknown coefficients \(a_{0},\ \ a_{1},\) and \({a}_{2}\). Once these are found, one can estimate the value of the dependent variable value \(y\) at any value of \(x\) within the bounds of the \(x\) values.

    Lesson 2: Uniqueness of Interpolating Polynomials

    Learning Objectives

    After successful completion of this lesson, you should be able to:

    1) derive why a polynomial of degree \(n\) or less that passes through \(n+1\) data points is unique.

    Proof for a unique polynomial of degree \(n\) or less passes through \(n+1\) data points.

    Let us use proof by contradiction. If the polynomial is not unique, then at least two polynomials of order \(n\) or less pass through the \(n + 1\) data points.

    Assume two polynomials \(P_{n}\left( x \right)\) and \(Q_{n}\left( x \right)\) go through \(n + 1\) data points,

    \[\left( x_{0},y_{0} \right),\left( x_{1},y_{1} \right),\ldots,\left( x_{n},y_{n} \right) \nonumber\]

    Then

    \[R_{n}\left( x \right) = P_{n}\left( x \right) - Q_{n}\left( x \right)\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{2.1}) \nonumber\]

    Since \(P_{n}\left( x \right)\)and \(Q_{n}\left( x \right)\) pass through all the \(n + 1\) data points,

    \[P_{n}\left( x_{i} \right) = Q_{n}\left( x_{i} \right), i = 0,\ldots,n\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{2.2}) \nonumber\]

    Hence

    \[R_{n}\left( x_{i} \right) = P_{n}(x_{i}) - Q_{n}\left( x_{i} \right) = 0, i = 0,\ldots,n\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{2.3}) \nonumber\]

    The \(n^{th}\) order polynomial \(R_{n}\left( x \right)\) has \(n + 1\) zeros. A polynomial of order \(n\) can have \(n + 1\) zeros only if it is identical to a zero polynomial, that is,

    \[R_{n}\left( x \right) \equiv 0\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{2.4}) \nonumber\]

    Hence from Equation \((\PageIndex{2.1})\)

    \[P_{n}\left( x \right) \equiv Q_{n}\left( x \right) \nonumber\]

    Example

    Show that a unique polynomial of degree \(2\) or less passes through \(3\) data points

    Solution

    Let us use proof by contradiction. If the polynomial is not unique, then at least two polynomials of order \(3\) or less pass through the \(3\) data points.

    Assume two polynomials \(P_{2}\left( x \right)\) and \(Q_{2}\left( x \right)\) go through \(3\) data points (Figure \(\PageIndex{2.1}\)),

    \[\left( x_{0},y_{0} \right),\left( x_{1},y_{1} \right),\left( x_{2},y_{2} \right) \nonumber\]

    Two proposed polynomials that each pass through the three given data points.
    Figure \(\PageIndex{2.1}\). Interpolating polynomials through three points.

    \[R_{2}\left( x \right) = P_{2}\left( x \right) - Q_{2}\left( x \right)\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.1}) \nonumber\]

    Since \(P_{2}\left( x \right)\)and \(Q_{2}\left( x \right)\) pass through all the \(3\) data points,

    \[P_{2}\left( x_{i} \right) = Q_{2}\left( x_{i} \right), i = 0,\ 1,\ 2\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.2}) \nonumber\]

    Hence

    \[R_{2}\left( x_{i} \right) = P_{2}(x_{i}) - Q_{2}\left( x_{i} \right) = 0, i = 0,\ 1,\ 2\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.3}) \nonumber\]

    Let \(R_{2}\left( x \right)\) be written as

    \[R_{2}\left( x \right) = a_{0} + a_{1}x + a_{2}x^{2}.\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.4}) \nonumber\]

    The \(2^{nd}\) order polynomial \(R_{2}\left( x \right)\) has \(3\) zeros and these zeros are at \(x_1\), \(x_2\), and \(x_3\). Then from Equation \((\PageIndex{E1.4})\),

    \[\begin{split} R_{2}\left( x_{1} \right) = a_{0} + a_{1}x_{1} + a_{2}x_{1}^{2} &= 0\\ R_{2}\left( x_{2} \right) = a_{0} + a_{1}x_{2} + a_{2}x_{2}^{2} &= 0\\ R_{2}\left( x_{3} \right) = a_{0} + a_{1}x_{3} + a_{2}x_{3}^{2} &= 0\end{split}\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.5}) \nonumber\]

    which in the matrix form gives

    \[\begin{bmatrix} 1 & x_{1} & x_{1}^{2} \\ 1 & x_{2} & x_{2}^{2} \\ 1 & x_{3} & x_{3}^{2} \end{bmatrix}\begin{bmatrix} a_{0} \\ a_{1} \\ a_{2} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix}\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.6}) \nonumber\]

    The above set of equations has a trivial solution, that is, \(a_{1} = a_{2} = a_{3} = 0\). But is this the only solution? That is true if the coefficient matrix is invertible.

    The determinant of the coefficient matrix can be found symbolically with the forward elimination steps of Naïve Gauss elimination to give

    \[\begin{split} \det\begin{bmatrix} 1 & x_{1} & x_{1}^{2} \\ 1 & x_{2} & x_{2}^{2} \\ 1 & x_{3} & x_{3}^{2} \\ \end{bmatrix} &= x_{2}x_{3}^{2} - x_{2}^{2}x_{3} - x_{1}x_{3}^{2} + x_{1}^{2}x_{3} + x_{1}x_{2}^{2} - x_{1}^{2}x_{2}\\ &= (x_{1} - x_{2})(x_{2} - x_{3})(x_{3} - x_{1})\end{split}\;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{E1.7}) \nonumber\]

    Since

    \[x_{1} \neq x_{2} \neq x_{3} \nonumber\]

    the determinant is non-zero. Hence the coefficient matrix is invertible. \(a_{1} = a_{2} = a_{3} = 0\) is the only solution, that is, \(R_{2}\left( x \right) \equiv 0\) giving \(P_{2}\left( x \right) \equiv Q_{2}\left( x \right)\) showing that the polynomial has to be unique.

    Audiovisual Lecture

    Title: Uniqueness of an Interpolating of Polynomial

    Summary: This video discusses the polynomial of order n or less that passes through (n+1) data points is unique.

    Multiple Choice Test

    (1). The number of different polynomials that can go through two fixed data points \(\left( x_{1},y_{1} \right)\) and \(\left( x_{2},y_{2} \right)\) is

    (A) \(0\)

    (B) \(1\)

    (C) \(2\)

    (D) infinite

    (2). Given \(n+1\) data pairs, a unique polynomial of degree __________________ passes through \(n + 1\) data points.

    (A) \(n + 1\)

    (B) \(n + 1\) or less

    (C) \(n\)

    (D) \(n\) or less

    (3). The following function(s) can be used for interpolation:

    (A) polynomial

    (B) exponential

    (C) trigonometric

    (D) all of the above

    (4). Polynomials are the most commonly used functions for interpolation because they are easy to

    (A) evaluate

    (B) differentiate

    (C) integrate

    (D) evaluate, differentiate and integrate

    (5). Given \(n + 1\) data points \(\left( x_{0},y_{0} \right),\left( x_{1},y_{1} \right),......,\left( x_{n - 1},y_{n - 1} \right),\left( x_{n},y_{n} \right)\), assume you pass a function \(f(x)\) through all the data points. If now the value of the function \(f(x)\) is required to be found outside the range of the given \(x\)-data, the procedure is called

    (A) extrapolation

    (B) interpolation

    (C) guessing

    (D) regression

    (6). Given three data points \((1,6)\), \((3,28)\), and \((10, 231)\), it is found that the function \(y = 2x^{2} + 3x + 1\) passes through the three data points. Your estimate of \(y\) at \(x = 2\) is most nearly

    (A) \(6\)

    (B) \(15\)

    (C) \(17\)

    (D) \(28\)

    For complete solution, go to

    http://nm.mathforcollege.com/mcquizzes/05inp/quiz_05inp_background_solution.pdf


    This page titled 5.01: Prerequisites to Interpolation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Autar Kaw via source content that was edited to the style and standards of the LibreTexts platform.