Skip to main content
Mathematics LibreTexts

Taylor Polynomials

  • Page ID
    219306
  • \( \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}\)

    Taylor Polynomials

    Review of the Tangent Line

    Recall that if f(x) is a function, then f '(a) is the slope of the tangent line at x = a.  Hence

            y - f(a) = f '(a)(x - a)  

    or

            P1(x) = y = f(a) + f '(a)(x - a) 

    is the equation of the tangent line.  We can say that this is the best linear approximation to f(x) near a.

    Note:      P1'(x) = f '(a).
     


    Quadratic Approximations

    Example:  

    Let 

            f(x) = e2x

    Find the best quadratic approximation at  x = 0.

    Solution  

    Note 

            f '(x) = 2e2x  

    and 

            f ''(x) = 4e2x

    Let 

            P2(x) = a0 + a1x + a2x2  

    Note 

             P'2(x) = a1 + 2a2x  

    and 

            P''2(x) = 2a
    Hence 

            a0 = 1
            

            P2'(0)  =  a1  =  f '(0)  =  2 


    Hence

            a1 = 2

            P2''(0) = 2a2 = f ''(0) = 4 

    Hence  

            a2 = 2

    So

            P2(x) = 1 + 2x + 2x2


            


    The Taylor Polynomial


    Suppose that we want the best nth degree approximation to f(x) at x = a.  We compare f(x) to

            Pn(x) =  a0 + a1(x - a) + a2(x - a)2  + a3(x - a)3 + ... + an(x - a)n

    We make the following observations:

            f(a) =  Pn(a) =  a0  

    so that  

            a0 = f(a)

            f '(a) = P'n(a) =  a1 + 2a2(x - a)  + 3a3(x - a)2 + ... + nan(x - a)n-1 at x = a 


    so that 

            a1 = f '(a)

            f ''(a) = P''n(a) =   2a2  + (3)(2)a3(x - a)+ ... + n(n - 1)an(x - a)n-2 at x = a 


    so that 

            a2 = 1/2 f ''(a)

    Note Each time we take a derivative we pick up the next integer in other words
            
                            1
            a3 =                  f '''(a) 
                        (2)(3)


    If we define f(k)(a) to mean the kth derivative of f evaluated at a  then

                         1
            ak =              f(k)(a)
                        k!

    In General

     
                             The Taylor Polynomial
    The nth degree Taylor polynomial at x = c is

         Pn(x) =  f(c) + f '(c)(x - c) + f ''(c)/2!(x - c)2  + 
                      f (3)(c)/3! (x - c)3 + ... + f (n)(c)/n! (x - c)n

                  = S f (k)(c)/k! (x - c)k

    where the sum goes from 0 to n.



    The special case when a = 0 is called the McLaurin Series

     
              The McLaurin Polynomial

    The McLaurin Polynomial of a differentiable function f(x) is 

              S f (k)(0)/k! xk  

    where the sum goes from 0 to n.


    Examples:

    Find the fifth degree McLaurin Polynomial for sin x

            f(0) = sin(0) = 0

            f '(0) = cos(0) = 1

            f ''(0) = -sin(0) = 0

            f (3)(0) = -cos(0) = -1

            f (4)(0) = sin(0) = 0

            f (5)(0) = cos(0) = 1

    So that 

                                    1              0               -1              0               5
            P5(x) = 0 +            x +          x2 +           x3         x4         x5 
                                 1!             2!               3!              4!             5!

                         x3             x5
            =  x -             +                       
                        6              120

     


    Taylor's Remainder


    Taylor's Remainder Theorem says that any smooth function can be written as an nth degree Taylor polynomial plus a function that is of order n + 1 near x = c.

     

              Taylor's Remainder Theorem

    If f is smooth from a to b, let Pn(x) be the nth degree Taylor polynomial at x = c, then for every x there is a z between x and c with

                                      f (n+1)(z)       
              f(x) = Pn(x) +                    (x - c)n+1   
                                       (n + 1)!


    Example

    We have

                                     (.1)3           (.1)5        -sin z
            sin(.1) = .1  -              +               +                = .099833416667 + E
                                      6             120            6!

    Where 

                       1
            E <           (.1)6  = .0000000014
                      6!

     

    Example

    Use an 11th degree Taylor polynomial to approximate 

            \( \int_1^2 e^{x^2} dx \)

    Solution

    First notice that there is no elementary antiderivative.  Hence, we find the Taylor polynomial and then integrate.  We have

            \( e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + \frac{x^5}{120} + ... \)

    Plugging in x2 for x, gives

            \( e^{x^2} = 1 + x^2 + \frac{x^4}{2} + \frac{x^6}{6} + \frac{x^8}{24} + \frac{x^{10}}{120} + ... \)

    Now integrate to get

            \( \int e^{x^2} dx = x + \frac{x^3}{3} + \frac{x^5}{10} + \frac{x^7}{42} + \frac{x^9}{216} + \frac{x^{11}}{1320} + ... \)        

    We ignore all terms after the 11th power term to get

            1.46253

    The actual integral up to five decimal places of accuracy is 

            1.46265

     

     


    Back to the Sequence and Series and Newton's Method Page

     

     

    Taylor Polynomials is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?