MACLAURIN AND TAYLOR

Elementary Functions

Most of the functions that we have been dealing in this class are so called elementary functions.

Definition. An elementary is a function that are , power functions, ratio- nal functions, trigonometric funcitions, inverse , exponential functions, logarithmic functions, and all functions that can be obtained from these functions by , substraction, , and composition.

For example, the function

√ ex log15(sin(e ) f(x) = ln(ln(ln(ln(cos ex + cosh x)))) − xπ is an .

Remark. If f is an elementary function, then f (x) is also an elementary function. However, f(x) dx need not be an elemnentary function. For instance,  2 ex dx is not an elementary function.

Question 1. Read page 345, Can We Integrate all Continuous Functions?

Taylor Series

In the previous section, we found a representation for certain family of functions. For example,

∞ 1 n − − = x ; 1

Example. The power series ∞  xn 2 n=0 n +1 cannot be expressed as an elementary function.

But there is a large class of power series that do represent elementary functions. There are the series that we study in this chapter. Such series are called Maclaurin series or . 1 2 MACLAURIN AND TAYLOR SERIES

Theorem 0.1. If f has a power series representation at a, that is, if ∞ n f(x)= cn(x − a) |x − a|

∞  f (n)(a) f(x)= (x − a)n n=0 n! This series is called the Taylor series of function about a (or centered at a).

Definition (Maclaurin Series). In the special case that a =0,theseries

∞ n f(x)= cnx n=0 f (n)(0) where cn = ,iscalledtheMaclaurinseriesof the function f(x). n! Remark. If f can be represented as a power series about a,thenf is equal to the sum of it’s Taylor series. However, there exist functions that are not equal to the sum of their Taylor Series.

Important Maclaurin Series

The following Maclaurin series are very important and you are expected to remember them: ∞ 1 2 3 ··· n − (1) − =1+x + x + x + = x , 1

Question 2. Verify the Maclaurin series representation of ex. MACLAURIN AND TAYLOR SERIES 3

Question 3. Verify the Maclaurin series representation of sin x.

Question 4. Use you answer in the previous question to verify the Maclaurin series represen- tation of cos x. 4 MACLAURIN AND TAYLOR SERIES

Question 5. Find the Taylor series for ln x about x = 1, and find the of convergence.

Question 6. Express x3 in powers of x − 3. MACLAURIN AND TAYLOR SERIES 5

Question 7. Find the Maclaurin series for cos 2x.

Algebraic Operations. Other than the differentiation and integration of power series, there are other algebraic operations of power series that you will need to know: ∞ ∞ n n Let f(x)= anx and g(x)= bnx . Then, within a common interval of convergence: n=0 n=0 ∞ n (1) f(x)+g(x)= (an + bn)x . n=0 ∞ n (2) f(x) − g(x)= (an − bn)x n=0 ∞ n n (3) f(x) · g(x)= cnx ,wherecn = a0bn + a1bn−1 + ···an−1b1 + anb0 = ak bn−k.This n=0 k=0 ∞ ∞ n n is called the Cauchy of anx and bnx . This is really a term by term n=0 n=0 multiplication of polynomials, except, there are infinitely many terms.     ∞ ∞ n n 2 2 anx · bnx =(a0 + a1x + a2x + ···) · (b0 + b1x + b2x + ···) n=0 n=0 2 3 ··· = a0b 0 +(a1b0 + a0b1 ) x +(a0b2 + a1b1 + a2b0 ) x +(a0b3 + a1b2 + a2b1 + a3b0 ) x + c0 c1 c2 c3 6 MACLAURIN AND TAYLOR SERIES

Question 8. Find the Maclaurin series for cosh x, and its interval of convergence. 1 Hint: cosh x = (ex + e−x). 2

Question 9. Find the first 3 non-zero terms of the Maclaurin series of f(x)=ex cos x,by multiplying the two series. Verify your answers using the direct method (definition of a Maclaurin series). MACLAURIN AND TAYLOR SERIES 7

Series Manipulation

Before we proceed with the next section, we will need to discuss an important aspect of dealing with series, which is manipulating the index of the series. You can reindex a series by changing the starting place of the series. This might change the form of an, but will not change the value of the series. The trick to remember when reindexing is that:

When you decrease the starting place, you have to increase every n in an by the same amount. For example,

∞ ∞  xn+1  x(n+1)+1 = n=1 (n +1)! n=0 ((n + 1) + 1)! You need to be careful when changing the index, remember there is a ”hidden parentheses around each n. For instance,

∞ ∞ ∞  nx2n+1  (n +3)x2(n+3)+1  (n +3)x2n+7 = = n=3 (2n)! n=0 (2(n + 3))! n=0 (2n +6)! A few other things you might wanna keep in mind when manipulating a series is that you can factor expressions not involving n in or out of the series. Finally, you might have to add or substract missing terms: For example,

∞ ∞ 4 ∞  xn+1  xn+1  xn+1  xn+1 x1 x2 x3 x4 x5 = − = − + + + + n=5 n! n=0 n! n=0 n! n=0 n! 0! 1! 2! 3! 4! Question 10. Simplify the power series by manipulating the index of the series ∞ n−2 ∞ n+1 − n x − − n−1 x ( 1) − ( 1) n=3 (n 3)! n=0 n! 8 MACLAURIN AND TAYLOR SERIES

Application of Series

Many differential can’t be solved explicity in terms of elementary functions. But it is important to be able to solve such equations. In such cases, we use method of power series; that is, we look for solutions of the form

∞ n 2 3 y = f(x)= cnx = c0 + c1x + c2x + c3x + ··· n=0 Question 11. Use power series to solve the y − y =0. MACLAURIN AND TAYLOR SERIES 9

Estimating the sum of a series

We have now spent a lot of time determining the convergence of a series, however, with the exception of geometric and , we have not talked about finding the value of a series. This is usually a very difficult thing to do but what we can do instead is estimate the value of a series. It makes no sense to talk about the value of a series that doesnt converge and so we will be assuming that the series were working with are convergent. ∞ Assume that the series an converges to some s. This means that the of n=1 partial sums {sn} converges to s, that is,

lim sn = s. n→∞

The sequence of partial sum converges, means that we can make the partial sums, sn,asclose to s as we want simply by taking n large enough. (Hope you remember the idea behind what it means for a sequence to be convergent). We will take a partial sum and use that as an estimation of the value of the series,

that is, s is approximately equal to sn (s ≈ sn). The estimation will be of no use to us unless we can estimate the accuracy of approximation. To do that consider Rn = |s − sn|, which we will call the remainder. The remainder tells us the difference, or error, between the exact value of the series and the value of the partial sum that we are using as the estimation of the value of the series.

Question 12. Express Rn in-terms of an. (Hint: Rn is the tail of the series)

For an that is convergent, the size of the error is smaller than bn+1,which is the of the first neglected term.

n−1 Theorem 0.2 (Alternating Series Estimation Theorem). If s = (−1) bn is the sum of an alternating series that satisfies a) 0 ≤ bn+1 ≤ bn. b) lim bn =0. n→∞

Then, |Rn| = |s − sn|≤bn+1. 10 MACLAURIN AND TAYLOR SERIES

∞  (−1)n+1 Question 13. Find the sum of the series 5 correct to 4 decimal places. n=1 n

The study of series comes from Newton’s idea of representing functions as sums of infinite series. Now that we have a good foundation is series, we will use this idea to study functions which are not elementary.

2 Question 14. a) Find the Maclaurin series for f(x)=e−x . MACLAURIN AND TAYLOR SERIES 11

 x 2 b) Let F (x)= e−t dt.WhatisF (0). What is F (x). Use your answer in part (a), to find 0 the Maclaurin series for F (x).

c) Use your answer in part a), to evaluate F (1) to within an error of 0.0001. 12 MACLAURIN AND TAYLOR SERIES

Taylor Polynomial

Recall from our discussion from class that Taylor Series may not exist for a given function. The Taylor series is ∞  f (n)(a) f(x)= (x − a)n n=0 n! To determine a condition that must be true in order for a Taylor series to exist for a function lets first define the nth Taylor polynomial of as,

n (i) f (a) i Tn(x)= (x − a) i=0 i! This is just a polynomial of degree at most n. If we were to write out the sum without the notation this would clearly be an nth degree polynomial. In other words, the nth degree Taylor polynomial is just the nth partial sum of the Taylor series. Then the nth remainder Rn(x)=f(x) − Tn(x) The remainder is really just the error between the function f(x)andthenth degree Taylor polynomial for a given n. The Taylor series of a function exists if

lim Rn =0 n→∞ Remark. In this class we will always work with functions, whose Taylor series exists.

Question 15. Find the 3rd degree Taylor polynomial of the function f(x)=tan(x).