Skip to main content
Mathematics LibreTexts

6.5: An Application to Polynomials

  • Page ID
    58866
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

    \( \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}\)

    The vector space of all polynomials of degree at most \(n\) is denoted \(\mathbf{P}_{n}\), and it was established in Section 6.3 that \(\mathbf{P}_{n}\) has dimension \(n + 1\); in fact, \(\{1, x, x^{2}, \dots, x^{n}\}\) is a basis. More generally, any \(n + 1\) polynomials of distinct degrees form a basis, by Theorem 6.4.4 (they are independent by Example 6.3.4). This proves

    Theorem \(\PageIndex{1}\)

    Let \(p_{0}(x), p_{1}(x), p_{2}(x), \dots, p_{n}(x)\) be polynomials in \(\mathbf{P}_{n}\) of degrees \(0, 1, 2, \dots, n\), respectively. Then \(\{p_{0}(x), \dots, p_{n}(x)\}\) is a basis of \(\mathbf{P}_{n}\).

    An immediate consequence is that \(\{1, (x - a), (x - a)^{2}, \dots, (x - a)^{n}\}\) is a basis of \(\mathbf{P}_{n}\) for any number \(a\). Hence we have the following:

    Corollary \(\PageIndex{1}\)

    If \(a\) is any number, every polynomial \(f(x)\) of degree at most \(n\) has an expansion in powers of \((x - a)\):

    \[\label{eq:cor6_5_1} f(x) = a_0 + a_1(x - a) + a_2(x - a)^2 + \dots + a_n(x - a)^n \]

    If \(f(x)\) is evaluated at \(x = a\), then equation (\ref{eq:cor6_5_1}) becomes

    \[f(x) = a_0 + a_1(a - a) + \dots + a_n(a - a)^n = a_0 \nonumber \]

    Hence \(a_{0} = f(a)\), and equation (\ref{eq:cor6_5_1}) can be written \(f(x) = f(a) + (x - a)g(x)\), where \(g(x)\) is a polynomial of degree \(n - 1\) (this assumes that \(n \geq 1\)). If it happens that \(f(a) = 0\), then it is clear that \(f(x)\) has the form \(f(x) = (x - a)g(x)\). Conversely, every such polynomial certainly satisfies \(f(a) = 0\), and we obtain:

    Corollary \(\PageIndex{2}\)

    Let \(f(x)\) be a polynomial of degree \(n \geq 1\) and let \(a\) be any number. Then:

    Remainder Theorem
    1. \(f(x) = f(a) + (x - a)g(x)\) for some polynomial \(g(x)\) of degree \(n - 1\).
    Factor Theorem
    1. \(f(a) = 0\) if and only if \(f(x) = (x - a)g(x)\) for some polynomial \(g(x)\).

    The polynomial \(g(x)\) can be computed easily by using “long division” to divide \(f(x)\) by \((x - a)\)—see Appendix D.

    All the coefficients in the expansion (\ref{eq:cor6_5_1}) of \(f(x)\) in powers of \((x - a)\) can be determined in terms of the derivatives of \(f(x)\).1 These will be familiar to students of calculus. Let \(f^{(n)}(x)\) denote the \(n\)th derivative of the polynomial \(f(x)\), and write \(f^{(0)}(x) = f(x)\). Then, if

    \[f(x) = a_0 + a_1(x - a) + a_2(x - a)^2 + \dots + a_n(x - a)^n \nonumber \]

    it is clear that \(a_{0} = f(a) = f^{(0)}(a)\). Differentiation gives

    \[f^{(1)}(x) = a_1 + 2a_2(x - a) + 3a_3(x - a)^2 + \dots + na_n(x - a)^{n - 1} \nonumber \]

    and substituting \(x = a\) yields \(a_{1} = f^{(1)}(a)\). This continues to give \(a_2 = \frac{f^{(2)}(a)}{2!}, a_3 = \frac{f^{(3)}(a)}{3!}, \dots, a_k = \frac{f^{(k)}(a)}{k!}\), where \(k!\) is defined as \(k! = k(k - 1) \cdots 2 \cdot 1\). Hence we obtain the following:

    Corollary \(\PageIndex{3}\): Taylor’s Theorem

    If \(f(x)\) is a polynomial of degree \(n\), then

    \[f(x) = f(a) + \frac{f^{(1)}(a)}{1!}(x - a) + \frac{f^{(2)}(a)}{2!}(x - a)^2 + \dots + \frac{f^{(n)}(a)}{n!}(x - a)^n \nonumber \]

    Example \(\PageIndex{1}\)

    Expand \(f(x) = 5x^{3} + 10x + 2\) as a polynomial in powers of \(x - 1\).

    Solution

    The derivatives are \(f^{(1)}(x) = 15x^{2} + 10\), \(f^{(2)}(x) = 30x\), and \(f^{(3)}(x) = 30\). Hence the Taylor expansion is

    \[\begin{aligned} f(x) &= f(1) + \frac{f^{(1)}(1)}{1!}(x - 1) + \frac{f^{(2)}(1)}{2!}(x - 1)^2 + \frac{f^{(3)}(1)}{3!}(x - 1)^3 \\ &= 17 + 25(x - 1) + 15(x - 1)^2 +5(x - 1)^3\end{aligned} \nonumber \]

    Taylor’s theorem is useful in that it provides a formula for the coefficients in the expansion. It is dealt with in calculus texts and will not be pursued here.

    Theorem 6.5.1 produces bases of \(\mathbf{P}_{n}\) consisting of polynomials of distinct degrees. A different criterion is involved in the next theorem.

    Theorem \(\PageIndex{2}\)

    Let \(f_{0}(x), f_{1}(x), \dots, f_{n}(x)\) be nonzero polynomials in \(\mathbf{P}_{n}\). Assume that numbers \(a_{0}, a_{1}, \dots, a_{n}\) exist such that

    \[\begin{aligned} f_i(a_i) &\neq 0 \quad \mbox{ for each } i \\ f_i(a_j) &= 0 \quad \mbox{ if } i \neq j\end{aligned} \nonumber \]

    Then

    1. \(\{f_{0}(x), \dots, f_{n}(x)\}\) is a basis of \(\mathbf{P}_{n}\).
    2. If \(f(x)\) is any polynomial in \(\mathbf{P}_{n}\), its expansion as a linear combination of these basis vectors is \[f(x) = \frac{f(a_0)}{f_0(a_0)} f_0(x) + \frac{f(a_1)}{f_1(a_1)} f_1(x) + \dots + \frac{f(a_n)}{f_n(a_n)} f_n(x) \nonumber \]
    Proof
    1. It suffices (by Theorem 6.4.4) to show that \(\{f_{0}(x), \dots, f_{n}(x)\}\) is linearly independent (because \(dim \;\|{P}_{n} = n + 1\)). Suppose that \[r_0f_0(x) + r_1f_1(x) + \dots + r_nf_n(x) = 0, r_i \in \mathbb{R} \nonumber \]
    2. By (1), \(f(x) = r_{0}f_{0}(x) + \dots + r_{n}f_{n}(x)\) for some numbers \(r_{i}\). Once again, evaluating at \(a_{0}\) gives \(f(a_{0}) = r_{0}f_{0}(a_{0})\), so \(r_{0} = f(a_{0}) / f_{0}(a_{0})\). Similarly, \(r_{i} = f(a_{i}) / f_{i}(a_{i})\) for each \(i\).​​​​
    Example \(\PageIndex{2}\)

    Show that \(\{x^{2} - x, x^{2} - 2x, x^{2} - 3x + 2\}\) is a basis of \(\mathbf{P}_{2}\).

    Solution

    Write \(f_{0}(x) = x^{2} - x = x(x - 1)\), \(f_{1}(x) = x^{2} - 2x = x(x - 2)\), and \(f_{2}(x) = x^{2} - 3x + 2 = (x - 1)(x - 2)\). Then the conditions of Theorem 6.5.2 are satisfied with \(a_{0} = 2\), \(a_{1} = 1\), and \(a_{2} = 0\).

    We investigate one natural choice of the polynomials \(f_{i}(x)\) in Theorem 6.5.2. To illustrate, let \(a_{0}\), \(a_{1}\), and \(a_{2}\) be distinct numbers and write

    \[f_0(x) = \frac{(x - a_1)(x - a_2)}{(a_0 - a_1)(a_0 - a_2)}\quad f_1(x) = \frac{(x - a_0)(x - a_2)}{(a_1 - a_0)(a_1 - a_2)}\quad f_2(x) = \frac{(x - a_0)(x - a_1)}{(a_2 - a_0)(a_2 - a_1)} \nonumber \]

    Then \(f_{0}(a_{0}) = f_{1}(a_{1}) = f_{2}(a_{2}) = 1\), and \(f_{i}(a_{j}) = 0\) for \(i \neq j\). Hence Theorem 6.5.2 applies, and because \(f_{i}(a_{i}) = 1\) for each \(i\), the formula for expanding any polynomial is simplified.

    In fact, this can be generalized with no extra effort. If \(a_{0}, a_{1}, \dots, a_{n}\) are distinct numbers, define the Lagrange polynomials \(\delta_{0}(x), \delta_{1}(x), \dots, \delta_{n}(x)\) relative to these numbers as follows:

    \[\delta_k(x) = \frac{\prod_{i \neq k}(x - a_i)}{\prod_{i \neq k}(a_k - a_i)}\quad k = 0, 1, 2, \dots, n \nonumber \]

    Here the numerator is the product of all the terms \((x - a_{0}), (x - a_{1}), \dots, (x - a_{n})\) with \((x - a_{k})\) omitted, and a similar remark applies to the denominator. If \(n = 2\), these are just the polynomials in the preceding paragraph. For another example, if \(n = 3\), the polynomial \(\delta_{1}(x)\) takes the form

    \[\delta_1(x) = \frac{(x - a_0)(x - a_2)(x - a_3)}{(a_1 - a_0)(a_1 - a_2)(a_1 - a_3)} \nonumber \]

    In the general case, it is clear that \(\delta_{i}(a_{i}) = 1\) for each \(i\) and that \(\delta_{i}(a_{j}) = 0\) if \(i \neq j\). Hence Theorem 6.5.2 specializes as Theorem 6.5.3.

    Theorem \(\PageIndex{3}\): Lagrange Interpolation Expansion

    Let \(a_{0}, a_{1}, \dots, a_{n}\) be distinct numbers. The corresponding set

    \[\{\delta_0(x), \delta_1(x), \dots, \delta_n(x) \} \nonumber \]

    of Lagrange polynomials is a basis of \(\mathbf{P}_{n}\), and any polynomial \(f(x)\) in \(\mathbf{P}_{n}\) has the following unique expansion as a linear combination of these polynomials.

    \[f(x) = f(a_0)\delta_0(x) + f(a_1)\delta_1(x) + \dots + f(a_n)\delta_n(x) \nonumber \]

    Example \(\PageIndex{3}\)

    Find the Lagrange interpolation expansion for \(f(x) = x^{2} - 2x + 1\) relative to \(a_{0} = -1\), \(a_{1} = 0\), and \(a_{2} = 1\).

    Solution

    The Lagrange polynomials are

    \[\begin{aligned} \delta_0 & = \frac{(x - 0)(x - 1)}{(-1 - 0)(-1 - 1)} = \frac{1}{2}(x^2 - x) \\ \delta_1 & = \frac{(x + 1)(x - 1)}{( 0 + 1)( 0 - 1)} = -(x^2 - 1) \\ \delta_2 & = \frac{(x + 1)(x - 0)}{( 1 + 1)( 1 - 0)} = \frac{1}{2}(x^2 + x)\end{aligned} \nonumber \]

    Because \(f(-1) = 4\), \(f(0) = 1\), and \(f(1) = 0\), the expansion is

    \[f(x) = 2(x^2 - x) - (x^2 - 1) \nonumber \]

    The Lagrange interpolation expansion gives an easy proof of the following important fact.

    Theorem \(\PageIndex{1}\)

    Let \(f(x)\) be a polynomial in \(\mathbf{P}_{n}\), and let \(a_{0}, a_{1}, \dots, a_{n}\) denote distinct numbers. If \(f(a_{i}) = 0\) for all \(i\), then \(f(x)\) is the zero polynomial (that is, all coefficients are zero).

    Proof

    All the coefficients in the Lagrange expansion of \(f(x)\) are zero.


    1. The discussion of Taylor’s theorem can be omitted with no loss of continuity.

    This page titled 6.5: An Application to Polynomials is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by W. Keith Nicholson via source content that was edited to the style and standards of the LibreTexts platform.