Limit processes are the basis of calculus. For example, the derivative. f f (x + h) f (x)

Similar documents
4.3 Lagrange Approximation

4.5 Chebyshev Polynomials

Piecewise Cubic Splines

Taylor and Maclaurin Series

1 if 1 x 0 1 if 0 x 1

Math 120 Final Exam Practice Problems, Form: A

November 16, Interpolation, Extrapolation & Polynomial Approximation

LIES MY CALCULATOR AND COMPUTER TOLD ME

Lies My Calculator and Computer Told Me

Lectures 5-6: Taylor Series

An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate.

Homework # 3 Solutions

Normal distribution. ) 2 /2σ. 2π σ

Mathematics 31 Pre-calculus and Limits

Objectives. Materials

TOPIC 4: DERIVATIVES

Representation of functions as power series

Linear and quadratic Taylor polynomials for functions of several variables.

MA4001 Engineering Mathematics 1 Lecture 10 Limits and Continuity

PRACTICE FINAL. Problem 1. Find the dimensions of the isosceles triangle with largest area that can be inscribed in a circle of radius 10cm.

Microeconomic Theory: Basic Math Concepts

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

10.2 Series and Convergence

Section 3.7. Rolle s Theorem and the Mean Value Theorem. Difference Equations to Differential Equations

1 Error in Euler s Method

Techniques of Integration

Partial Fractions. p(x) q(x)

5 Numerical Differentiation

About the Gamma Function

MATH 10550, EXAM 2 SOLUTIONS. x 2 + 2xy y 2 + x = 2

x 2 + y 2 = 1 y 1 = x 2 + 2x y = x 2 + 2x + 1

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of.

Separable First Order Differential Equations

Section 12.6: Directional Derivatives and the Gradient Vector

MATH 132: CALCULUS II SYLLABUS

Understanding Basic Calculus

correct-choice plot f(x) and draw an approximate tangent line at x = a and use geometry to estimate its slope comment The choices were:

Solving Quadratic Equations

CHAPTER 5 Round-off errors

1 The Brownian bridge construction

Continued Fractions and the Euclidean Algorithm

7.6 Approximation Errors and Simpson's Rule

The sample space for a pair of die rolls is the set. The sample space for a random number between 0 and 1 is the interval [0, 1].

A power series about x = a is the series of the form

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Review of Fundamental Mathematics

Differentiation and Integration

Real Roots of Univariate Polynomials with Real Coefficients

6. Define log(z) so that π < I log(z) π. Discuss the identities e log(z) = z and log(e w ) = w.

Sequences and Series

Approximating functions by Taylor Polynomials.

Vocabulary Words and Definitions for Algebra

Integrals of Rational Functions

FIRST YEAR CALCULUS. Chapter 7 CONTINUITY. It is a parabola, and we can draw this parabola without lifting our pencil from the paper.

8 Polynomials Worksheet

1.7 Graphs of Functions

Section 1.3 P 1 = 1 2. = P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., =

Scalar Valued Functions of Several Variables; the Gradient Vector

6.4 Logarithmic Equations and Inequalities

Zero: If P is a polynomial and if c is a number such that P (c) = 0 then c is a zero of P.

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

Student Performance Q&A:

Mathematics Course 111: Algebra I Part IV: Vector Spaces

JUST THE MATHS UNIT NUMBER 1.8. ALGEBRA 8 (Polynomials) A.J.Hobson

Numerical Solution of Differential

EQUATIONS and INEQUALITIES

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Limits and Continuity

9.2 Summation Notation

Arithmetic and Algebra of Matrices

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

Higher Education Math Placement

PYTHAGOREAN TRIPLES KEITH CONRAD

x a x 2 (1 + x 2 ) n.

I remember that when I

sin(x) < x sin(x) x < tan(x) sin(x) x cos(x) 1 < sin(x) sin(x) 1 < 1 cos(x) 1 cos(x) = 1 cos2 (x) 1 + cos(x) = sin2 (x) 1 < x 2

The Taxman Game. Robert K. Moniot September 5, 2003

APPLIED MATHEMATICS ADVANCED LEVEL

Exercises and Problems in Calculus. John M. Erdman Portland State University. Version August 1, 2013

Increasing for all. Convex for all. ( ) Increasing for all (remember that the log function is only defined for ). ( ) Concave for all.

Algebra 1 Course Title

Polynomial and Rational Functions

Notes on Continuous Random Variables

4. Continuous Random Variables, the Pareto and Normal Distributions

Section 3-3 Approximating Real Zeros of Polynomials

6.1. The Exponential Function. Introduction. Prerequisites. Learning Outcomes. Learning Style

Florida Math Correlation of the ALEKS course Florida Math 0028 to the Florida Mathematics Competencies - Upper

5.1 Derivatives and Graphs

The Mean Value Theorem

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88

x(x + 5) x 2 25 (x + 5)(x 5) = x 6(x 4) x ( x 4) + 3

Zeros of a Polynomial Function

MA107 Precalculus Algebra Exam 2 Review Solutions

MATH 60 NOTEBOOK CERTIFICATIONS

3.3 Real Zeros of Polynomials

Equations, Inequalities & Partial Fractions

BookTOC.txt. 1. Functions, Graphs, and Models. Algebra Toolbox. Sets. The Real Numbers. Inequalities and Intervals on the Real Number Line

3.1. Solving linear equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Transcription:

SEC. 4.1 TAYLOR SERIES AND CALCULATION OF FUNCTIONS 187 Taylor Series 4.1 Taylor Series and Calculation of Functions Limit processes are the basis of calculus. For example, the derivative f f (x + h) f (x) (x) = lim h 0 h is the limit of the difference quotient where both the numerator and the denominator go to zero. A Taylor series illustrates another type of limit process. In this case an

188 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION Table 4.1 Taylor Series Expansions for Some Common Functions sin(x) = x x3 3! + x5 5! x7 + for all x 7! cos(x) = 1 x2 2! + x4 4! x6 + for all x 6! e x = 1 + x + x2 2! + x3 3! + x4 + for all x 4! ln(1 + x) = x x2 2 + x3 3 x4 + 1 x 1 4 arctan(x) = x x3 3 + x5 5 x7 + 1 x 1 7 (1 + x) p = 1+ px + p(p 1) x 2 + 2! p(p 1)(p 2) x 3 + for x < 1 3! infinite number of terms is added together by taking the limit of certain partial sums. An important application is their use to represent the elementary functions: sin(x), cos(x), e x,ln(x), etc. Table 4.1 gives several of the common Taylor series expansions. The partial sums can be accumulated until an approximation to the function is obtained that has the accuracy specified. Series solutions are used in the areas of engineering and physics. We want to learn how a finite sum can be used to obtain a good approximation to an infinite sum. For illustration we shall use the exponential series in Table 4.1 to compute the number e = e 1, which is the base of the natural logarithm and exponential functions. Here we choose x = 1 and use the series e 1 = 1 + 1 1! + 12 2! + 13 3! + 14 1k + + 4! k! +. The definition for the sum of an infinite series in Section 1.1 requires that the partial sums S N tend to a limit. The values of these sums are given in Table 4.2. A natural way to think about the power series representation of a function is to view the expansion as the limiting case of polynomials of increasing degree. If enough terms are added, then an accurate approximation will be obtained. This needs to be made precise. What degree should be chosen for the polynomial, and how do we calculate the coefficients for the powers of x in the polynomial? Theorem 4.1 answers these questions.

SEC. 4.1 TAYLOR SERIES AND CALCULATION OF FUNCTIONS 189 Table 4.2 Partial Sums S n Used to Determine e n S n = 1 + 1 1! + 1 2! + + 1 n! 0 1.0 1 2.0 2 2.5 3 2.666666666666... 4 2.708333333333... 5 2.716666666666... 6 2.718055555555... 7 2.718253968254... 8 2.718278769841... 9 2.718281525573... 10 2.718281801146... 11 2.718281826199... 12 2.718281828286... 13 2.718281828447... 14 2.718281828458... 15 2.718281828459... Theorem 4.1 (Taylor Polynomial Approximation). Assume that f C N+1 [a, b] and x 0 [a, b] is a fixed value. If x [a, b], then (1) f (x) = P N (x) + E N (x), where P N (x) is a polynomial that can be used to approximate f (x): N (2) f (x) P N (x) = The error term E N (x) has the form k=0 f (k) (x 0 ) (x x 0 ) k. k! (3) E N (x) = f (N+1) (c) (N + 1)! (x x 0) N+1 for some value c = c(x) that lies between x and x 0. Proof. The proof is left as an exercise. Relation (2) indicates how the coefficients of the Taylor polynomial are calculated. Although the error term (3) involves a similar expression, notice that f (N+1) (c) is to be evaluated at an undetermined number c that depends on the value of x. For this reason we do not try to evaluate E N (x): it is used to determine a bound for the accuracy of the approximation.

190 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION Example 4.1. Show why 15 terms are all that are needed to obtain the 13-digit approximation e = 2.718281828459 in Table 4.2. Expand f (x) = e x in a Taylor polynomial of degree 15 using the fixed value x 0 = 0 and involving the powers (x 0) k = x k. The derivatives required are f (x) = f (x) = = f (16) = e x.thefirst 15 derivatives are used to calculate the coefficients a k = e 0 /k! and are used to write (4) P 15 (x) = 1 + x + x2 2! + x3 x15 + + 3! 15!. Setting x = 1 in (4) gives the partial sum S 15 = P 15 (1). The remainder term is needed to show the accuracy of the approximation: (5) E 15 (x) = f (16) (c)x 16. 16! Since we chose x 0 = 0 and x = 1, the value c lies between them (i.e., 0 < c < 1), which implies that e c < e 1. Notice that the partial sums in Table 4.2 are bounded above by 3. Combining these two inequalities yields e c < 3, which is used in the following calculation E 15 (1) = f (16) (c) 16! ec 16! < 3 16! < 1.433844 10 13. Therefore, all the digits in the approximation e 2.718281828459 are correct, because the actual error (whatever it is) must be less than 2 in the thirteenth decimal place. Instead of giving a rigorous proof of Theorem 4.1, we shall discuss some of the features of the approximation; the reader can look in any standard reference text on calculus for more details. For illustration, we again use the function f (x) = e x and the value x 0 = 0. From elementary calculus we know that the slope of the curve y = e x at the point (x, e x ) is f (x) = e x. Hence the slope at the point (0, 1) is f (0) = 1. Therefore, the tangent line to the curve at the point (0, 1) is y = 1 + x. This is the same formula that would be obtained if we used N = 1 in Theorem 4.1; that is, P 1 (x) = f (0) + f (0)x/1! =1 + x. Therefore, P 1 (x) is the equation of the tangent line to the curve. The graphs are shown in Figure 4.3. Observe that the approximation e x 1 + x is good near the center x 0 = 0 and that the distance between the curves grows as x moves away from 0. Notice that the slopes of the curves agree at (0, 1). In calculus we learned that the second derivative indicates whether a curve is concave up or down. The study of curvature 1 shows that if two curves y = f (x) and y = g(x) have the property that f (x 0 ) = g(x 0 ), f (x 0 ) = g (x 0 ), and f (x 0 ) = g (x 0 ) then they have the same curvature at x 0. This property would be desirable for a polynomial function that approximates f (x). Corollary 4.1 shows that the Taylor polynomial has this property for N 2. 1 The curvature K of a graph y = f (x) at (x 0, y 0 ) is defined by K = f (x 0 ) /(1+[ f (x 0 )] 2 ) 3/2.

SEC. 4.1 TAYLOR SERIES AND CALCULATION OF FUNCTIONS 191 5 y y = e x 4 3 2 y = P 1 (x) 1 2 1 1 2 1 x Figure 4.3 The graphs of y = e x and y = P 1 (x) = 1 + x. Corollary 4.1. If P N (x) is the Taylor polynomial of degree N given in Theorem 4.1, then (6) P (k) N (x 0) = f (k) (x 0 ) for k = 0, 1,..., N. Proof. Set x = x 0 in equations (2) and (3), and the result is P N (x 0 ) = f (x 0 ). Thus statement (6) is true for k = 0. Now differentiate the right-hand side of (2) and get (7) P N (x) = N k=1 f (k) N 1 (x 0 ) (k 1)! (x x 0) k 1 = k=0 f (k+1) (x 0 ) (x x 0 ) k. k! Set x = x 0 in (7) to obtain P N (x 0) = f (x 0 ). Thus statement (6) is true for k = 1. Successive differentiations of (7) will establish the other identities in (6). The details are left as an exercise. Applying Corollary 4.1, we see that y = P 2 (x) has the properties f (x 0 ) = P 2 (x 0 ), f (x 0 ) = P 2 (x 0), and f (x 0 ) = P 2 (x 0); hence the graphs have the same curvature at x 0. For example, consider f (x) = e x and P 2 (x) = 1 + x + x 2 /2. The graphs are shown in Figure 4.4 and it is seen that they curve up in the same fashion at (0, 1). In the theory of approximation, one seeks to find an accurate polynomial approximation to the analytic function 2 f (x) over [a, b]. This is one technique used in developing computer software. The accuracy of a Taylor polynomial is increased when we choose N large. The accuracy of any given polynomial will generally decrease as the value of x moves away from the center x 0. Hence we must choose N large enough and restrict the maximum value of x x 0 so that the error does not exceed a specified bound. If we choose the interval width to be 2R and x 0 in the center (i.e., x x 0 < R), 2 The function f (x) is analytic at x 0 if it has continuous derivatives of all orders and can be represented as a Taylor series in an interval about x 0.

192 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION 10 y y = e x 8 6 4 y = P 2 (x) y = P 2 (x) 2 y = e x 2 1 1 2 x Figure 4.4 The graphs of y = e x and y = P 2 (x) = 1 + x + x 2 /2. Table 4.3 Values for the Error Bound error < e R R N+1 /(N + 1)! Using the Approximation e x P N (x) for x R R = 2.0, x 2.0 R = 1.5, x 1.5 R = 1.0, x 1.0 R = 0.5, x 0.5 e x P 5 (x) 0.65680499 0.07090172 0.00377539 0.00003578 e x P 6 (x) 0.18765857 0.01519323 0.00053934 0.00000256 e x P 7 (x) 0.04691464 0.00284873 0.00006742 0.00000016 e x P 8 (x) 0.01042548 0.00047479 0.00000749 0.00000001 the absolute value of the error satisfies the relation (8) error = E N (x) MRN+1 (N + 1)!, where M max{ f (N+1) (z) :x 0 R z x 0 + R}. If the derivatives are uniformly bounded, the error bound in (8) is proportional to R N+1 /(N + 1)! and decreases for fixed R, when N gets large or, for fixed N, when R goes to 0. Table 4.3 shows how the choices of these two parameters affect the accuracy of the approximation e x P N (x) over the interval x R. The error is smallest when N is largest and R smallest. Graphs for P 2, P 3, and P 4 are given in Figure 4.5. Example 4.2. Establish the error bounds for the approximation e x P 8 (x) on each of the intervals x 1.0 and x 0.5. If x 1.0, then letting R = 1.0 and f (9) (c) = e c e 1.0 = M in (8) implies that error = E 8 (x) e1.0 (1.0) 9 0.00000749. 9!

SEC. 4.1 TAYLOR SERIES AND CALCULATION OF FUNCTIONS 193 y 10 8 6 4 2 y = e x y = P 4 (x) y = P 3 (x) y = P 2 (x) 2 1 1 2 x Figure 4.5 The graphs of y = e x, y = P 2 (x), y = P 3 (x), and y = P 4 (x). y 3 10 7 y = E 9 (x) 2 10 7 1 10 7 1.0 0.5 0.0 0.5 1.0 x Figure 4.6 The graph of the error y = E 9 (x) = e x P 9 (x). If x 0.5, then letting R = 0.5 and f (9) (c) = e c e 0.5 = M in (8) implies that error = E 8 (x) e0.5 (0.5) 9 0.00000001. 9! Example 4.3. If f (x) = e x, show that N = 9 is the smallest integer, so that the error = E N (x) 0.0000005 for x in [ 1, 1]. Hence P 9 (x) can be used to compute approximate values of e x that will be accurate in the sixth decimal place. We need to find the smallest integer N so that error = E N (x) ec (1) N+1 (N + 1)! < 0.0000005. In Example 4.2 we saw that N = 8 was too small, so we try N = 9 and discover that E N (x) e 1 (1) 9+1 /(9 + 1)! 0.000000749. This value is slightly larger than

194 CHAP. 4 INTERPOLATION AND POLYNOMIAL APPROXIMATION desired; hence we would be likely to choose N = 10. But we used e c e 1 as a crude estimate in finding the error bound. Hence 0.000000749 is a little larger than the actual error. Figure 4.6 shows a graph of E 9 (x) = e x P 9 (x). Notice that the maximum vertical range is about 3 10 7 and occurs at the right endpoint (1, E 9 (1)). Indeed, the maximum error on the interval is E 9 (1) = 2.718281828 2.718281526 3.024 10 7. Therefore, N = 9isjustified. Methods for Evaluating a Polynomial There are several mathematically equivalent ways to evaluate a polynomial. Consider, for example, the function (9) f (x) = (x 1) 8. The evaluation of f will require the use of an exponential function. Or the binomial formula can be used to expand f (x) in powers of x: (10) f (x) = 8 k=0 ( ) 8 x 8 k ( 1) k k = x 8 8x 7 + 28x 6 56x 5 + 70x 4 56x 3 + 28x 2 8x + 1. Horner s method (see Section 1.1), which is also called nested multiplication, can now be used to evaluate the polynomial in (10). When applied to formula (10), nested multiplication permits us to write (11) f (x) = (((((((x 8)x + 28)x 56)x + 70)x 56)x + 28)x 8)x + 1. To evaluate f (x) now requires seven multiplications and eight additions or subtractions. The necessity of using an exponential function to evaluate the polynomial has now been eliminated. We end this section with the theorem that relates the Taylor series in Table 4.1 and the Taylor polynomials of Theorem 4.1. Theorem 4.2 (Taylor Series). Assume that f (x) is analytic on an interval (a, b) containing x 0. Suppose that the Taylor polynomials (2) tend to a limit (12) S(x) = lim N P N (x) = lim N N k=0 f (k) (x 0 ) (x x 0 ) k ; k! then f (x) has the Taylor series expansion (13) f (x) = k=0 f (k) (x 0 ) (x x 0 ) k. k!

SEC. 4.1 TAYLOR SERIES AND CALCULATION OF FUNCTIONS 195 Proof. This follows directly from the definition of convergence of series in Section 1.1. The limit condition is often stated by saying that the error term must go to zero as N goes to infinity. Therefore, a necessary and sufficient condition for (13) to hold is that (14) lim N E N (x) = lim N f (N+1) (c)(x x 0 ) N+1 (N + 1)! = 0, where c depends on N and x.

Numerical Methods Using Matlab, 4 th Edition, 2004 John H. Mathews and Kurtis K. Fink ISBN: 0-13-065248-2 Prentice-Hall Inc. Upper Saddle River, New Jersey, USA http://vig.prenhall.com/