Chapter IX: DIFFERENTIAL EQUATIONS AND POLYNOMIALS: TAYLOR'S THEOREM
© 2000 M. Flashman


In numerous cases throughout this book, as in the real world, we find problems where an exact numerical answer is either impossible or impractical to express as a decimal number. Examples of these situations include calculation of 2,π,e , and ln(2). As we have seen there are many ways to characterize and define these numbers and use these characterizations to find an estimate. For our discussion in this chapter it is important to notice that each of these numbers can be characterized as arising from the evaluation of a function which is the solution to a differential equation.Euler's method is one way we have studied to make these estimates.  [See Table 1 below.]


NUMBER
FUNCTION
DIFFERENTIAL 
EQUATION

f'(x)=12f(x),f(1)=1 
ln(2)=f(2)
f(x)=ln(x)
f'(x)=1x,f(1)=0
e=f(1)
f(x)=ex
f'(x)=f(x),f(0)=1
π=f(1)
f(x)= 4arctan(x)
f'(x)=41+x2,f(0)=0
  • We have discussed approximations from the very beginning of our work on the derivative, with Newton's method for estimating the roots of equations, Euler's method for estimating particular solutions to differential equations, and numerous methods for estimating definite integrals. In the following sections we will delve further into the nature and applications of polynomial approximations based on information about the derivatives of a function.
  • We shall refer to these polynomial approximations as Taylor's approximation theory. To provide further motivation let's consider first a simple situation where an exact value for a function is attainable but perhaps not worth the effort.

  • EXAMPLE IX.A.1: Suppose  f(x)=x2+x3 +x100 and we wish to find f(0.5).

    Of course the exact answer is .25+.125+(.5)100, but if we only need an estimate of the answer it is easy to settle for .375. The error we make in using this estimate is relatively small [namely (.5)100]. In this example we should note two things.


    Taylor's Theory-Objective and Key Ideas: The main concerns of Taylor's theory for estimating function values are

    1. to find estimating polynomials for a given function and
    2. to measure the error in using these polynomials to estimate the desired values for the given function.
    Two Key Ideas: You may recall from our earlier discussions of estimations using the differential that when x is close to a,f(x) is approximately equal to a linear function, f(a)+f'(a)(x-a). Furthermore, the Mean Value Theorem guarantees that as long as fis a sufficiently well behaved function there is some c between a and x where f(x)-f(a)=f'(c)(x-a). Thus the difference between the function's value at x and a can be measured using the value of the derivative of f at a..

    Taylor's theory generalizes these two ideas that use the derivative to estimate.

    IX.A. Estimating ex with Polynomials: An Introduction to Taylor's Theory.

    To focus our discussion more specifially, in this section we will consider only  f(x)=exand begin by trying to estimate f(1)=e illu strating the key ideas of Taylor's theory.
    At x=0, we find that f(0)=1, f'(0)=1, and since f'(x)=f(x) we have that f(n)(0)=1 for all natural numbers n. We now consider our first result, typical of the Taylor's theory approach to estimation using polynomials and derivative information.

    PROPOSITION IX.A.1: If  Pn(x)=1+x+x22+x323+x44!+...+xnn! then
    Pn(x) is a polynomial of degree n so that Pn(0)=Pn'(0)=Pn''(0)=...=Pn(n)(0)=1 and Pn(b) is approximately equal to eb.
    In fact, if we let Rn=eb-Pn(b), then for some c between 0 and b, Rn=ecbn+1(n+1)! .


    GeoGebra: Table, Graph, and Mapping Diagram of Pn(x) and Rn(x)
     


    Estimating e: Before we proceed to justify this result, we'll apply this result using n=5 to estimate the value of e[=e1].
    First, P5(x)=1+x+x22+x323+x44!+x55!=1+x+x22+x36+x424+x5120 , so according to the proposition, e is approximately equal to P5(1)=1+1+122+136+1424+151202.716667 and R5=e-P5(1) where R5=ec166!=ec1720 for some c between 0 and 1. Thus, e is approximately 2.716667 and the error in using this estimate is R5. Since c is between 0 and 1, ec is between 1 and e, so we can deduce that R5, the difference between e and the estimate, P5(1), is no greater than e720. Using estimates of e from our earlier work in Chapter VI we know that e<3 so our error R5(1) is no larger than 3720=12400.004167.This compares roughly well with the error from the GeoGebra applet that shows an error after setting the slider to  find R5(1)=0.00162.

    A more accurate estimate can be obtained by using a larger value for n. Try using n=6 and 7 to see the improvement. [This can be done progressively using the GeoGebra  applet above or download a spreadsheet which you can examine now or later.]

    Proof of Proposition: We'll begin our proof by finding Pn'(x).

    Pn'(x)=1+x+x22+x323+x44!+...+nxn-1n!
    =1+x+x22+x323+x44!+...+xn-1(n-1)!=Pn-1(x) 

    From this it follows easily that  Pn(0)=Pn'(0)=Pn''(0)=...=Pn(n)(0)=1.

    Now suppose that b is not  0 and let Rn=eb-Pn(b).
    We need only justify the formula for evaluating Rn. For convenience we'll write R=Rn and let

    g(t)=etPn(b-t)+R(b-t)n+1bn+1.
    Then g(b)=ebPn(b-b)+R(b-b)n+1bn+1=ebPn(0)=eb , while
    g(0)=e0Pn(b-0)+R(b-0)n+1bn+1=Pn(b)+R=eb from the definition of R.

    Furthermore g'(t)=etPn(b-t)-etPn'(b-t)-R(n+1)(b-t)nbn+1=et[Pn(b-t)-Pn'(b-t)]-R(n+1)(b-t)nbn+1

     But Pn(x)-Pn'(x)=xnn!, sog'(t)=et(b-t)nn!-R(n+1)(b-t)nbn+1.

    Now we apply the Mean Value (or Rolle's) Theorem to the function g, we can say that there is a number c between 0 and b where g'(c)=0. Thus 
    0=ec(b-c)nn!-R(n+1)(b-c)nbn+1and  ec(b-c)nn!=R(n+1)(b-c)nbn+1. Solving this last equation for R gives
    Rn=R=ecbn+1(n+1)!.

    EOP.

    Note: Since the exponential function has a positive derivative for all x, the function is increasing for all x.
    (i) If 0<c<b then 1<ec<eb<3b and 0<bn+1(n+1)!<Rn=R=ecbn+1(n+1)!<ebbn+1(n+1)!<3bbn+1(n+1)!.
    (iia) If 0>c>b then 1>ec>eb>2b and if n is odd then bn+1(n+1)! is positive and thus bn+1(n+1)!>Rn=R=ecbn+1(n+1)!>2bbn+1(n+1)!>0.
    (iib) If 0>c>b then 1>ec>eb>2b and if n is even then bn+1(n+1)! is negative and thus bn+1(n+1)!<Rn=R=ecbn+1(n+1)!<2bbn+1(n+1)!<0.
    Putting this information about the quality of Rn together we can see the following:
    For all x>0 and for any n, ex>Pn(x),
    while for x<0 the polynomials differ in relation to ex:
    When n is odd then ex>Pn(x);
    when n is even then Pn(x)>ex.


    Estimating the value of e is not the only use for the previous proposition. Before turning to the more general Taylor's theory in the next section, here are two more examples of its application in estimating definite integrals related to ex.

    EXAMPLE IX.A.2: Estimate 01exdx=e-1. Use this to estimate e.

    Solution: Using Proposition IX.1 with n=4 for each x between 0 and 1 we have
    0<ex=P4(x)+R4(x)=1+x+x22+x36+x424+R4(x) where R4(x)=ecx5120
     for some c with 0<c<x<1.

    Thus0<R4(x)<3x5120=x540. [Remember ec<3.] and so P4(x)<ex<P4(x)+x540 for all x between 0 and 1. Now we use the monotone property of the definite integral [Ch. V . ** ] to obtain the estimate:
    01P4(x)dx<01exdx<01P4(x)+x540, so

    1+12+16+124+1120<e-1<1+12+16+1120+1240.

    Therefore e is approximately 1+1+12+16+124+11202.716667 as in the first estimate we saw in the note after the statement of the theorem, and the error in using this estimate is less than 1240 as we also saw previously.


    The next example follows a similar analysis but applied to a more difficult yet important integral for probability and statistics.

    EXAMPLE IX.A.3
    : Estimate 01e-t2dt.

    Solution: For each t between 0 and 1, -t2 is between -1 and 0. Let x=-t2. By Proposition IX.1 with n=4 for each x between -1 and 0 we have

    0<ex=P4(x)+R4(x)=1+x+x22+x36+x424+R4(x)
    where R4(x)=ecx5120 for some c with 0>c>x.

    Since c<0 , 0<ec<1, and since x<0 we have that  0>R4(x)>x5120.





    GeoGebra Estimates for  01e-t2dt. Check off box to show estimate.

    Substituting -t2 for x ,we see that

    e-t2=1+(-t2)+(-t2)22+(-t2)36+(-t2)424+R4(-t2)=1-t2+t42-t66+t824+R4(-t2)  

    Now since 0>R4(-t2)>(-t2)5120=-t10120 we have 01P4(-t2)dt>01e-t2dt>01P4(-t2)-t10120dt.

    By evaluating these integrals we obtain

    011-t2+t42-t66+t824dt>01e-t2dt>011-t2+t42-t66+t824-t10120dt

    or 1-13+110-142+1216>01e-t2dt>1-13+110-142+1216-11320

    Therefore, 01e-t2dt is approximately equal to 1-13+110-142+12160.747486...;

    and this is an overestimate by no more than 11320.


    Comment: In both of these examples we have been able to estimate a definite integral involving the exponential function by using a Taylor polynomial of degree 4. It should be apparent that by using a higher degree for the estimating polynomial, the error term will become smaller and we will obtain a more precise estimate. The systematic pattern in these polynomials should allow you to find more precise estimates for the last example without much difficulty.

    Go on to Chapter IX.B


    Exercises IX.A.:
    1. Use the Taylor polyonmial for ex of degree 4 to estimate the following:

    2. (a) e2 (b) e3 (c) e.5 (d) e-1 (e) e3.14. [Use GeoGebra or  Spreadsheet helper.]
    3. Estimate e using the Taylor polynomial of degree n where n is (a) 6 (b) 7 (c) 8 (d) 10.

    4. In each of these estimates discuss the size of the error term Rn.  [Use GeoGebra or  Spreadsheet helper.]
    5. What value of n should be used so that the Taylor polynomial of degree n will give an estimate of e that is within .000001 of the exact value of e? Explain your result using Proposition XI.A.1
    6. Use the Taylor polynomial for ex of degree 5 to estimate 01e-t2dt. Discuss the error in this approximation.
    7. Use the trapezoidal rule and Simpson's rule with n = 6 to estimate 01e-t2dt .
    8. Use the Taylor polynomial for ex of degree 6 to estimate 01e-t2dt. Discuss the error in this approximation.
    9. On the same graph sketch the graph of ex along with those for the Taylor polynomials for ex of degree 1,2,3,4 and 5. [You can do this by use the trace feature on the graph of Pn in the GeoGebra applet.] Discuss the graphical interpretation of Rn. [Here is Java sketch solution for n = 1 to 5]
    10. What value of n should be used so that the Taylor polynomial of degree n will give an estimate of  01e-t2dt that is within 0.000001 of the exact value? Explain your result.
    11. Use the Taylor polynomial for ex of degree 4 to estimate the area of the region in the plane contained by the lines X=0, X=1, the X- axis and the graph of y=1+xe-x . [Hint: First find a polynomial to estimate e-x .] Discuss the error in this approximation.
    12. Another Polynomial Estimate: Consider the functions 11-x and 11+x.
      1. Show that 1=(1-x)(1+x+x2+x3+x4+x5)+R where R=x6 .
      2. Show that 1=(1+x)(1-x+x2-x3+x4-x5)+R where R=x6 .
      3. Show that when 0<x<1,11-x=(1+x+x2+x3+x4+x5)+R1 where R1=x61-x
      4. Show that when 0<x<1,11+x=(1-x+x2-x3+x4-x5)+R2 where R2=x61+x.
      5. Use the definite integral and the previous equations to estimate ln(.9) = ln (1 - .1) and ln(1.1) = ln(1 + .1). [ This approach to estimating the natural logarithm was used by Isaac Newton to give very accurate estimates of ln(2), ln(3), etc.]. Discuss the error in your estimate based on the integrals of R1 and R2.
      6. Generalize this for higher degree polynomials and estimating ln(.8), ln(1.2), ln(.99) and ln(1.01).