Taylor_and_Maclaurin_Series.pdf

download Taylor_and_Maclaurin_Series.pdf

of 12

Transcript of Taylor_and_Maclaurin_Series.pdf

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    1/12

    Section 8.7 Taylor and Maclaurin Series

    Taylor and Maclaurin Series

    In the preceding section we were able to find power series representations for a certain restrictedclass of functions. Here we investigate more general problems: Which functions have powerseries representations? How can we find such representations?

    We start by supposing that f  is any function that can be represented by a power series:

    f (x) = c0 + c1(x − a) + c2(x − a)2 + c3(x − a)3 + c4(x − a)4 + . . .   |x − a| < R   (1)

    Let’s try to determine what the coefficients  cn  must be in terms of  f . To begin, notice that if we put  x  =  a  in Equation 1, then all terms after the first one are 0 and we get

    f (a) = c0

    By Theorem 8.6.2, we can differentiate the series in Equation 1 term by term:

    f ′

    (x) = c1 + 2c2(x − a) + 3c3(x − a)2

    + 4c4(x − a)3

    + . . .   |x − a| < R   (2)and substitution of  x  =  a  in Equation 2 gives

    f ′(a) = c1

    Now we differentiate both sides of Equation 2 and obtain

    f ′′(x) = 2c2 + 2 · 3c3(x − a) + 3 · 4c4(x − a)2 + . . .   |x − a| < R   (3)

    Again we put  x  =  a   in Equation 3. The result is

    f ′′(a) = 2c2

    Let’s apply the procedure one more time. Differentiation of the series in Equation 3 gives

    f ′′′(x) = 2 · 3c3 + 2 · 3 · 4c4(x − a) + 3 · 4 · 5c5(x − a)2 + . . .   |x − a| < R   (4)

    and substitution of  x  =  a  in Equation 4 gives

    f ′′′(a) = 2 · 3c3 = 3!c3By now you can see the pattern. If we continue to differentiate and substitute  x  =  a, we obtain

    f (n)(a) = 2 · 3 · 4 · . . . · ncn =  n!cnSolving this equation for the  nth coefficient  cn, we get

    cn = f (n)(a)

    n!

    This formula remains valid even for  n  = 0 if we adopt the conventions that 0! = 1 and f (0) = f .

    1

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    2/12

    Section 8.7 Taylor and Maclaurin Series

    Thus we have proved the following theorem.

    THEOREM: If  f  has a power series representation (expansion) at  a,  that is, if 

    f (x) =∞n=0

    cn(x − a)n and   |x − a| < R,   then   cn =  f (n)(a)

    n!  (5)

    Substituting this formula for cn back into the series, we see that  if  f  has a power series expansionat  a, then it must be of the following form.

    f (x) =∞n=0

    f (n)(a)

    n!  (x − a)n

    = f (a) + f ′(a)

    1!  (x − a) +  f 

    ′′(a)

    2!  (x − a)2 + f 

    ′′′(a)

    3!  (x − a)3 + . . .

    (6)

    The series in Equation 6 is called the  Taylor series of the function   f   at  a   (or about   a

    or centered at  a).  For the special case  a = 0 the Taylor series becomes

    f (x) =∞n=0

    f (n)(0)

    n!  xn = f (0) +

     f ′(0)

    1!  x +

     f ′′(0)

    2!  x2 +

     f ′′′(0)

    3!  x3 + . . .   (7)

    This case arises frequently enough that is is given the special name  Maclaurin series.

    NOTE: We have shown that  if  f  can be represented as a power series about  a,  then  f  is equalto the sum of its Taylor series. But there exist functions that are not equal to the sum of theirTaylor series. For example, one can show that the function defined by

    f (x) =

    e−1/x2

    if  x = 0

    0 if  x  = 0

    is not equal to its Maclaurin series.

    EXAMPLE 1: Find the Maclaurin series of the function  f (x) = ex and its radius of convergence.

    Solution: If  f (x) =  ex,   then  f (n)(x) =  ex,  so  f (n)(0) =  e0 = 1 for all  n.  Therefore, the Taylorseries for f  at 0 (that is, the Maclaurin series) is

    ∞n=0

    f (n)(0)

    n!  xn =

    ∞n=0

    xn

    n!  = 1 +

      x

    1! +

     x2

    2!  +

     x3

    3!  + . . .

    To find the radius of convergence we let  an =  xn/n!. Then

    an+1an =

    xn+1

    (n + 1)! ·  n!

    xn

    =   |x|n + 1 → 0 

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    3/12

    Section 8.7 Taylor and Maclaurin Series

    The conclusion we can draw from (5) and Example 1 is that  if  ex has a power series expansionat 0, then

    ex =∞n=0

    xn

    n!

    So how can we determine whether  ex does  have a power series representation?

    Let’s investigate the more general question: Under what circumstances is a function equal tothe sum of its Taylor series? In other words, if  f  has derivatives of all orders, when is it truethat

    f (x) =∞n=0

    f (n)(a)

    n!  (x − a)n

    As with any convergent series, this means that f (x) is the limit of the sequence of partial sums.In the case of the Taylor series, the partial sums are

    T n(x) =ni=0

    f (i)(a)

    i!  (x − a)i = f (a) +  f 

    ′(a)

    1!  (x − a) +  f 

    ′′(a)

    2!  (x − a)2 + . . . +  f 

    (n)(a)

    n!  (x − a)n

    Notice that  T n   is a polynomial of degree  n  called the  nth-degree Taylor polynomial of   f at  a.  For instance, for the exponential function  f (x) = ex, the result of Example 1 shows thatthe Taylor polynomials at 0 (or Maclaurin polynomials) with n  = 1, 2, and 3 are

    T 1(x) = 1 + x, T 2(x) = 1 + x + x2

    2!, T 3(x) = 1 + x +

     x2

    2!  +

     x3

    3!

    In general,  f (x) is the sum of its Taylor series if 

    f (x) = limn→∞T n(x)

    If we letRn(x) = f (x) − T n(x) so that   f (x) = T n(x) + Rn(x)

    then   Rn(x) is called the   remainder   of the Taylor series. If we can somehow show thatlimn→∞

    Rn(x) = 0, then it follows that

    limn→∞

    T n(x) = limn→∞

    [f (x) − Rn(x)] = f (x) −   limn→∞

    Rn(x) = f (x)

    3

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    4/12

    Section 8.7 Taylor and Maclaurin Series

    We have therefore proved the following.

    THEOREM: If  f (x) = T n(x) + Rn(x),  where  T n  is the  nth-degree Taylor polynomial of  f   at aand

    limn→∞

    Rn(x) = 0 (8)

    for |x − a| < R,  then f  is equal to the sum of its Taylor series on the interval |x − a| < R.

    In trying to show that limn→∞

    Rn(x) = 0 for a specific function  f , we usually use the expression

    in the next theorem.

    THEOREM (TAYLOR’S FORMULA): If  f  has n + 1 derivatives in an interval I  that containsthe number   a,   then for   x   in   I   there is a number   z   strictly between   x   and   a   such that theremainder term in the Taylor series can be expressed as

    Rn(x) = f (n+1)(z )

    (n + 1)! (x − a)n+1

    NOTE 1: For the special case  n  = 0, if we put  x  =  b  and z  =  c  in Taylor’s Formula, we get

    f (b) = f (a) + f ′(c)(b − a) (9)

    which is the Mean Value Theorem. In fact, Theorem 9 can be proved by a method similar tothe proof of the Mean Value Theorem.

    NOTE 2: Notice that the remainder term

    Rn(x) = f (n+1)(z )

    (n + 1)! (x − a)n+1 (10)

    is very similar to the terms in the Taylor series except that  f (n+1) is evaluated at  z  instead of at a.  All we say about the number  z  is that it lies somewhere between  x  and  a.  The expressionfor Rn(x) in Equation 10 is known as  Lagrange’s form of the remainder term.

    NOTE 3: In Section 8.8 we will explore the use of Taylor’s Formula in approximating functions.Our immediate use of it is in conjunction with Theorem 8.

    In applying Theorems 8 and 9 it is often helpful to make use of the following fact:

    limn→∞

    xn

    n!  = 0 for every real number x   (11)

    This is true because we know from Example 1 that the series xn

    n! converges for all  x  and so

    its nthe term approaches 0.

    EXAMPLE 2: Prove that ex is equal to the sum of its Taylor series with  a   = 0 (Maclaurinseries).

    4

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    5/12

    Section 8.7 Taylor and Maclaurin Series

    EXAMPLE 2: Prove that ex is equal to the sum of its Taylor series with  a   = 0 (Maclaurinseries).

    Solution: If  f (x) = ex, then  f (n+1)(x) = ex,  so the remainder term in Taylor’s Formula is

    Rn(x) =  ez

    (n + 1)!xn+1

    where z  lies between 0 and  x.  (Note, however, that z  depends on n.) If  x > 0, then 0 < z < x,so  ez < ex.  Therefore

    0 < Rn(x) =  ez

    (n + 1)!xn+1 < ex

      xn+1

    (n + 1)! → 0

    by Equation 11, so  Rn(x) → 0 as  n → ∞  by the Squeeze Theorem. If  x

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    6/12

    Section 8.7 Taylor and Maclaurin Series

    EXAMPLE 4: Find the Maclaurin series for sin x  and prove that it represents sin x  for all x.

    Solution: We arrange our computation in two columns as follows:

    f (x) = sin x f (0) = 0

    f ′(x) = cos x f ′(0) = 1

    f ′′

    (x) = − sin x f ′′

    (0) = 0f ′′′(x) = − cos x f ′′′(0) = −1f (4)(x) = sin x f (4)(0) = 0

    Since the derivatives repeat in a cycle of four, we can write the Maclaurin series as follows:

    f (0) + f ′(0)

    1!  x +

     f ′′(0)

    2!  x2 +

     f ′′′(0)

    3!  x3 +

     f (4)(0)

    4!  x4 + . . . = 0 +

      1

    1!x +

      0

    2!x2 +

     −13!

     x3 +  0

    4!x4 + . . .

    = x − x3

    3!  +

     x5

    5! −  x

    7

    7!  + . . .

    =∞n=0

    (−1)n   x2n+1

    (2n + 1)!

    Using the remainder term (10) with  a  = 0, we have

    Rn(x) = f (n+1)(z )

    (n + 1)! xn+1

    where f (x) = sin x and z  lies between 0 and  x.  But f (n+1)(z ) is ± sin z  or ± cos z.  In any case,

    |f (n+1)(z )

    | ≤1 and so

    0 ≤ |Rn(x)| = |f (n+1)(z )|

    (n + 1)!  |xn+1| ≤   1

    (n + 1)!|xn+1| =   |x|

    n+1

    (n + 1)!  (15)

    By Equation 11 the right side of this inequality approaches 0 as  n → ∞, so Rn(x) → 0 by theSqueeze Theorem. It follows that  Rn(x) →  0 as  n → ∞, so sin x   is equal to the sum of itsMaclaurin series by Theorem 8. Thus

    sin x =  x − x3

    3!  +

     x5

    5! −  x

    7

    7!  + . . . =

    ∞n=0

    (−1)n   x2n+1

    (2n + 1)!  for all x   (16)

    EXAMPLE 5: Find the Maclaurin series for cos x.

    6

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    7/12

    Section 8.7 Taylor and Maclaurin Series

    EXAMPLE 5: Find the Maclaurin series for cos x.

    Solution 1: We arrange our computation in two columns as follows:

    f (x) = cos x f (0) = 1

    f ′(x) =

    −sin x f ′(0) = 0

    f ′′(x) = − cos x f ′′(0) = −1f ′′′(x) = sin x f ′′′(0) = 0

    f (4)(x) = cos x f (4)(0) = 1

    Since the derivatives repeat in a cycle of four, we can write the Maclaurin series as follows:

    f (0) + f ′(0)

    1!  x +

     f ′′(0)

    2!  x2 +

     f ′′′(0)

    3!  x3 +

     f (4)(0)

    4!  x4 + . . . = 1 +

      0

    1!x +

     −12!

     x2 +  0

    3!x3 +

      1

    4!x4 + . . .

    = 1−

     x2

    2!

      + x4

    4! − x6

    6!

      + . . .

    =∞n=0

    (−1)n   x2n

    (2n)!

    Solution 2: We differentiate the Maclaurin series for sin x given by Equation 16:

    cos x =  d

    dx(sin x) =

      d

    dx

    x − x

    3

    3!  +

     x5

    5! −  x

    7

    7!  + . . .

    = 1−

     3x2

    3!  +

     5x4

    5!  − 7x6

    7!  + . . .

    = 1 − x2

    2!  +

     x4

    4! −  x

    6

    6!  + . . .

    Since the Maclaurin series for sin x  converges for all  x, Theorem 8.6.2 tells us that the differ-entiated series for cos x  also converges for all  x. Thus

    cos x = 1 − x2

    2!  +

     x4

    4! −  x

    6

    6!  + . . . =

    ∞n=0

    (−1)n   x2n

    (2n)!  for all x   (17)

    EXAMPLE 6: Find the Maclaurin series for  f (x) =  x cos x.

    7

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    8/12

    Section 8.7 Taylor and Maclaurin Series

    EXAMPLE 6: Find the Maclaurin series for  f (x) =  x cos x.

    Solution: Instead of computing derivatives and substituting in Equation 7, it’s easier to multiplythe series for cos x  (Equation 17) by  x:

    x cos x =  x∞

    n=0(−1)n   x

    2n

    (2n)! =

    n=0(−1)nx

    2n+1

    (2n)!

    REMARK: The power series that we obtained by indirect methods in Examples 5 and 6 and inSection 8.6 are indeed the Taylor or Maclaurin series of the given functions because Theorem

    5 asserts that, no matter how we obtain a power series representation  f (x) =

    cn(x − a)n, itis always true that  cn =  f 

    (n)(a)/n!. In other words, the coefficients are uniquely determined.

    EXAMPLE 7: Find the Maclaurin series for  f (x) = (1 + x)k,  where  k  is any real number.

    Solution: Arranging our work in columns, we have

    f (x) = (1 + x)k

    f (0) = 1f ′(x) = k(1 + x)k−1 f ′(0) = k

    f ′′(x) = k(k − 1)(1 + x)k−2 f ′′(0) = k(k − 1)f ′′′(x) = k(k − 1)(k − 2)(1 + x)k−3 f ′′′(0) = k(k − 1)(k − 2)...

      ...

    f (n)(x) = k(k − 1) . . . (k − n + 1)(1 + x)k−n f (n)(0) = k(k − 1) . . . (k − n + 1)

    Therefore, the Maclaurin series of  f (x) = (1 + x)k is

    ∞n=0

    f (n)(0)

    n!  xn = 1 +

    ∞n=1

    k(k − 1) . . . (k − n + 1)n!

      xn

    This series is called the  binomial series. If its nth term is  an, thenan+1an =

    k(k − 1) . . . (k − n + 1)(k − n)xn+1

    (n + 1)!  ·   n!

    k(k − 1) . . . (k − n + 1)xn

    = |k − n|

    n + 1 |x

    |=

    k

    n − 1

    1 +  1n |x

    | → |x

    |  as  n

    → ∞

    Thus by the Ratio Test the binomial series converges if  |x|  1.The traditional notation for the coefficients in the binomial series is

    k

    n

    =

      k!

    n!(k − n)!  = (k − n)!(k − n + 1) . . . (k − 2)(k − 1)k

    n!(k − n)!   = k(k − 1)(k − 2) . . . (k − n + 1)

    n!

    and these numbers are called the binomial coefficients.

    8

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    9/12

    Section 8.7 Taylor and Maclaurin Series

    The following theorem states that (1 + x)k is equal to the sum of its Maclaurin series. It ispossible to prove this by showing that the remainder term  Rn(x) approaches 0, but that turnsout to be quite difficult.

    THEOREM (THE BINOMIAL SERIES): If  k  is any real number and |x| k . This means that the series terminates and reduces to the ordinary Binomial Theoremwhen  k  is a positive integer.

    EXAMPLE 8: Find the Maclaurin series for  f (x) =  1√ 

    4 − x and its radius of convergence.

    Solution: We write  f (x) in a form where we can use the binomial series:

    1√ 4 − x =

      1 4

    1 − x4

    =   12

     1 − x

    4

    = 1

    2

    1 − x

    4

    −1/2

    Using the binomial series with  k  = −12

     and with  x  replaced by −x4

    , we have

    1√ 4 − x =

     1

    2

    1 − x

    4

    −1/2

    = 1

    2

    ∞n=0

    −12

    n

    −x

    4

    n

    = 1

    2

    1 +

    −1

    2

    −x

    4

    +

     (−12 )(−32 )2!

    −x

    4

    2+

     (−12 )(−32 )(−52 )3!

    −x

    4

    3

    + . . . + (−12 )(−32 )(−52 ) . . . (−12 − n + 1)n!

    −x

    4

    n + . . .

    = 1

    2

    1 +

     1

    8x +

     1 · 32!82

    x2 + 1 · 3 · 5

    3!83  x3 + . . . +

     1 · 3 · 5 · . . . · (2n − 1)n!8n

      xn + . . .

    We know from (18) that this series converges when | − x/4|

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    10/12

    Section 8.7 Taylor and Maclaurin Series

    We collect in the following table, for future reference, some important Maclaurin series that wehave derived in this section and the preceding one.

    1

    1 − x  =∞n=0

    xn = 1 + x + x2 + x3 + . . . R = 1

    ex =

    ∞n=0

    xn

    n!  = 1 +   x

    1! +  x

    2

    2!  + x

    3

    3!  + . . . R = ∞

    sin x =∞n=0

    (−1)n   x2n+1

    (2n + 1)! = x −  x

    3

    3!  +

     x5

    5! −  x

    7

    7!  + . . . R = ∞

    cos x =∞n=0

    (−1)n   x2n

    (2n)! = 1 − x

    2

    2!  +

     x4

    4! −  x

    6

    6!  + . . . R = ∞

    tan−1 x =∞

    n=0

    (−1)n  x2n+1

    2n + 1 = x − x

    3

    3  +

     x5

    5 −  x

    7

    7  + . . . R = 1

    ln(1 + x) =∞n=1

    (−1)n−1 xn

    n  = x − x

    2

    2  +

     x3

    3 −  x

    4

    4  + . . . R = 1

    (1 + x)k =∞n=0

    k

    n

    xn = 1 + kx +

     k(k − 1)2!

      x2 + k(k − 1)(k − 2)

    3!  x3 + . . . R = 1

    One reason that Taylor series are important is that they enable us to integrate functions that wecouldn’t previously handle. In fact, the function f (x) = e−x

    2

    can’t be integrated by techniques

    discussed so far because its antiderivative is not an elementary function (see Section 6.4). Inthe following example we write  f  as the Maclaurin series to integrate this function.

    EXAMPLE 9:

    (a) Evaluate

       e−x

    2

    dx  as an infinite series.

    (b) Evaluate

    1 0

    e−x2

    dx correct to within an error of 0.001.

    10

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    11/12

    Section 8.7 Taylor and Maclaurin Series

    EXAMPLE 9:

    (a) Evaluate

       e−x

    2

    dx  as an infinite series.

    (b) Evaluate

    1 0

    e−x2

    dx correct to within an error of 0.001.

    Solution:

    (a) First we find the Maclaurin series for  f (x) = e−x2

    . Although it’s possible to use the directmethod, let’s find it simply by replacing  x  with −x2 in the series for  ex given in the table of Maclaurin series. Thus, for all values of  x,

    e−x2

    =∞n=0

    (−x2)nn!

      =∞n=0

    (−1)nx2n

    n!  = 1 − x

    2

    1!  +

     x4

    2! −  x

    6

    3!  + . . .

    Now we integrate term by term:

       e−x

    2

    dx   = 

    1 − x2

    1!  + x

    4

    2! −  x

    6

    3!  + . . . + (−1)n x

    2n

    n!  + . . .

    dx

    = C  + x −   x3

    3 · 1! +  x5

    5 · 2! −  x7

    7 · 3! +  . . . + (−1)n   x

    2n+1

    (2n + 1)n! +  . . .

    This series converges for all  x  because the original series for  e−x2

    converges for all  x.

    (b) The Fundamental Theorem of Calculus gives

    1

     0

    e

    −x2

    dx   =

    x −  x3

    3 · 1! +  x5

    5 · 2! −  x7

    7 · 3! +  x9

    9 · 4! − . . .1

    0

    = 1 − 13

     +  1

    10  –

      1

    42 +

      1

    216 − . . .

    ≈ 1 − 13

     +  1

    10 −   1

    42 +

      1

    216 ≈ 0.7475

    The Alternating Series Estimation Theorem shows that the error involved in this approximationis less than

    1

    11·

    5! =

      1

    1320 

  • 8/9/2019 Taylor_and_Maclaurin_Series.pdf

    12/12

    Section 8.7 Taylor and Maclaurin Series

    EXAMPLE 10: Evaluate limx→0

    ex − 1 − xx2

      .

    Solution: Using the Maclaurin series for  ex, we have

    limx→0

    ex − 1 − x

    x2

      = limx→0

    1 +

      x

    1! +

     x2

    2!  +

     x3

    3!  + . . .

    − 1 − x

    x2

    = limx→0

    x2

    2!  +

     x3

    3!  +

     x4

    4!  + . . .

    x2

    = limx→0

    1

    2 +

      x

    3! +

     x2

    4!  +

     x3

    5!  + . . .

    =

     1

    2

    because power series are continuous functions.

    12