Problem 1. Produce the linear and quadratic Taylor polynomials for the following functions:

Similar documents
Lecture 32: Taylor Series and McLaurin series We saw last day that some functions are equal to a power series on part of their domain.

Section Taylor and Maclaurin Series

8.7 Taylor s Inequality Math 2300 Section 005 Calculus II. f(x) = ln(1 + x) f(0) = 0

f (r) (a) r! (x a) r, r=0

Taylor Series. Math114. March 1, Department of Mathematics, University of Kentucky. Math114 Lecture 18 1/ 13

AP Calculus Testbank (Chapter 9) (Mr. Surowski)

Taylor and Maclaurin Series. Approximating functions using Polynomials.

1 + lim. n n+1. f(x) = x + 1, x 1. and we check that f is increasing, instead. Using the quotient rule, we easily find that. 1 (x + 1) 1 x (x + 1) 2 =

Taylor and Maclaurin Series. Approximating functions using Polynomials.

b n x n + b n 1 x n b 1 x + b 0

Section 5.8. Taylor Series


LEAST SQUARES APPROXIMATION

Taylor and Maclaurin Series

CHAPTER 2 POLYNOMIALS KEY POINTS

Downloaded from

MATH 163 HOMEWORK Week 13, due Monday April 26 TOPICS. c n (x a) n then c n = f(n) (a) n!

MORE APPLICATIONS OF DERIVATIVES. David Levermore. 17 October 2000

ECONOMICS 207 SPRING 2006 LABORATORY EXERCISE 5 KEY. 8 = 10(5x 2) = 9(3x + 8), x 50x 20 = 27x x = 92 x = 4. 8x 2 22x + 15 = 0 (2x 3)(4x 5) = 0

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

MATH 118, LECTURES 27 & 28: TAYLOR SERIES

Advanced Calculus Math 127B, Winter 2005 Solutions: Final. nx2 1 + n 2 x, g n(x) = n2 x

Ma 530 Power Series II

Introduction and Review of Power Series

Families of Functions, Taylor Polynomials, l Hopital s

Calculus I Announcements

evaluate functions, expressed in function notation, given one or more elements in their domains

Integration by Parts

Taylor series - Solutions

Chapter 8. Exploring Polynomial Functions. Jennifer Huss

11.10a Taylor and Maclaurin Series

MTH30 Review Sheet. y = g(x) BRONX COMMUNITY COLLEGE of the City University of New York DEPARTMENT OF MATHEMATICS & COMPUTER SCIENCE

1.4 Techniques of Integration

TAYLOR AND MACLAURIN SERIES

Math Numerical Analysis

Solution of Algebric & Transcendental Equations

Algebra I Unit Report Summary

Algebra III Chapter 2 Note Packet. Section 2.1: Polynomial Functions

Review all the activities leading to Midterm 3. Review all the problems in the previous online homework sets (8+9+10).

As f and g are differentiable functions such that. f (x) = 20e 2x, g (x) = 4e 2x + 4xe 2x,

Math 2233 Homework Set 7

Homework and Computer Problems for Math*2130 (W17).

Math 113 (Calculus 2) Exam 4

Ch 7 Summary - POLYNOMIAL FUNCTIONS

f (x) = x 2 Chapter 2 Polynomial Functions Section 4 Polynomial and Rational Functions Shapes of Polynomials Graphs of Polynomials the form n

Advanced Math Quiz Review Name: Dec Use Synthetic Division to divide the first polynomial by the second polynomial.

Math 113 Winter 2005 Key

CHALLENGE! (0) = 5. Construct a polynomial with the following behavior at x = 0:

Chapter 4: More Applications of Differentiation

Math 261 Calculus I. Test 1 Study Guide. Name. Decide whether the limit exists. If it exists, find its value. 1) lim x 1. f(x) 2) lim x -1/2 f(x)

1. Use the properties of exponents to simplify the following expression, writing your answer with only positive exponents.

e x = 1 + x + x2 2! + x3 If the function f(x) can be written as a power series on an interval I, then the power series is of the form

Table of Contents. Module 1

1 Question related to polynomials

Infinite series, improper integrals, and Taylor series

f (x) = k=0 f (0) = k=0 k=0 a k k(0) k 1 = a 1 a 1 = f (0). a k k(k 1)x k 2, k=2 a k k(k 1)(0) k 2 = 2a 2 a 2 = f (0) 2 a k k(k 1)(k 2)x k 3, k=3

Review: Power series define functions. Functions define power series. Taylor series of a function. Taylor polynomials of a function.

Study # 1 11, 15, 19

cc) c, >o,, c, =c7 $"(x\ <o - S ~ Z

Math 227 Sample Final Examination 1. Name (print) Name (sign) Bing ID number

Assignment # 8, Math 370, Fall 2018 SOLUTIONS:

Math 651 Introduction to Numerical Analysis I Fall SOLUTIONS: Homework Set 1

Function Junction: Homework Examples from ACE

Convergence of sequences and series

Radicals: To simplify means that 1) no radicand has a perfect square factor and 2) there is no radical in the denominator (rationalize).

n=0 ( 1)n /(n + 1) converges, but not

Unit 1 Vocabulary. A function that contains 1 or more or terms. The variables may be to any non-negative power.

Functions and Equations

Harman Outline 1A Calculus CENG 5131 PDF

Further Mathematics SAMPLE. Marking Scheme

6x 3 12x 2 7x 2 +16x 7x 2 +14x 2x 4

Polynomial expression

Question 1: The graphs of y = p(x) are given in following figure, for some Polynomials p(x). Find the number of zeroes of p(x), in each case.

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Review Problems for the Final

EXAMPLES OF PROOFS BY INDUCTION

Integration of Rational Functions by Partial Fractions

Math 106 Fall 2014 Exam 2.1 October 31, ln(x) x 3 dx = 1. 2 x 2 ln(x) + = 1 2 x 2 ln(x) + 1. = 1 2 x 2 ln(x) 1 4 x 2 + C

UMUC MATH-107 Final Exam Information

How many solutions are real? How many solutions are imaginary? What are the solutions? (List below):

Week 1: need to know. November 14, / 20

Math 1431 Final Exam Review

Chapter 2 Polynomial and Rational Functions

Assignment 6, Math 575A

AP Calculus (BC) Chapter 9 Test No Calculator Section Name: Date: Period:

Power Series Solutions We use power series to solve second order differential equations

Error Bounds in Power Series

Integration of Rational Functions by Partial Fractions

Sect Polynomial and Rational Inequalities

Chapter 11. Taylor Series. Josef Leydold Mathematical Methods WS 2018/19 11 Taylor Series 1 / 27

Math 3 Variable Manipulation Part 3 Polynomials A

Section 9.7 and 9.10: Taylor Polynomials and Approximations/Taylor and Maclaurin Series

INFINITE SEQUENCES AND SERIES

Pure Mathematics P1

Analysis/Calculus Review Day 3

Chapter 2 Polynomial and Rational Functions

Test for Increasing and Decreasing Theorem 5 Let f(x) be continuous on [a, b] and differentiable on (a, b).

Polynomial Review Problems

Polynomial Functions

The Plane of Complex Numbers

Transcription:

Problem. Produce the linear and quadratic Taylor polynomials for the following functions: (a) f(x) = e cos(x), a = (b) log( + e x ), a = The general formula for any Taylor Polynomial is as follows: (a) Thus, for the linear and quadratic Taylor Polynomials P n (x) = f n (a) (x a) n n! f(x) = e cos(x) f() = e f (x) = sin(x)e cos(x) f () = f (x) = sin(x)( sin(x)e cos(x) ) cos(x)e cos(x) f () = e P (x) = e P (x) = e e x Plot of Taylor Polynomials for f(x) = e cos(x) (b) Thus, for the linear and quadratic Taylor Polynomials f(x) = log( + e x ) f() = log() f (x) = (+e x ) ex f () = f (x) = e x (+e x ) ex (+e x ) f () = 4 P (x) = log() + x P (x) = log() + x + 4! x = log() + x + 8 x Plot of Taylor Polynomials for f(x) = log( + e x )

Code for plots %Code for graphing f(x)=e^cos(x) and the linear and quadraic Taylor %Polynomials of f(x) figure() g=@(t)exp().^(cos(t)); x=linspace(-,,); y=g(x); clf plot(x,y, b-+ ); hold on %Linear polynomial about x= p=@(t)exp()*t.^; y=p(x) plot(x,y, r-. ); %Quadratic Polynomial about x= p=@(t)exp()-exp()/*t.^; y=p(x); plot(x,y, k--* ) title ( Linear and Quadratic Taylor Approximation to e^cos(x) ) legend( e^cos(x), p_, p_ ) xlabel( x ) ylabel( y ) %Code for graphing f(x)=log(+e^x) and the linear and quadracti Taylor %Polynomials of f(x) figure() f=@(t)log(+exp().^t); y=f(x); clf plot(x,y, b-+ ) hold on %Linear Polynomial about x= p=@(t)log()+.5*t; y=p(x); plot(x,y, r-. ); %Quadratic Polynomial about x=

p=@(t)log()+.5*t+(/8)*t.^; y=p(x); plot(x,y, k--* ) title ( Linear and Quadratic Taylor Approximation to log(+e^x) ) legend( log(+e^x), p_, p_ ) xlabel( x ) ylabel( y ) Problem. Produce a general form for the degree n Taylor Polynomials for the following functions, using a = as the point of expansion (a)f(x) = /(x ) (b)f(x) = ( + x) /3 (a) f(x) = ( x) f() = f (x) = ( x) f () = f (x) = ( x) 3 f () = f (x) = 6 ( x) 4 f () = 6 Thus, inputting into the general equation for a Taylor polynomial gives: Thus, in the general form (b) P 3 (x) = + x + x! P n (x) = + 6x3 n i= = + x + x + x 3 x i f(x) = ( + x) /3 f() = f (x) = 3 ( + x) 3 f () = 3 f (x) = 3 ( 3 )( = x) 3 f () = 3 ( 3 ) f (x) = 3 ( 3 )( 3 )( = x) 3 f () = 3 ( 3 )( 3 ) Thus, using the general form for a Taylor polynomial gives: P 3 (x) = + 3 x + 3 ( 3 ) x +! However, using the notation for binomial coefficients gives ( ) 3 = n 3 ( 3 )( 3 ) 3 ( 3 )( 3 )... ( 3 n + ) n! Thus, the general form for the Taylor polynomial may be given as P n (x) = n i= ( ) 3 x i i Problem 3. Compare f(x) = sin(x) with its Taylor polynomials of degrees,3, and 5. x 3 f(x) = sin(x) f() = f (x) = cos(x) f () = f (x) = sin(x) f () = f (x) = cos(x) f () = 3

Thus, using the general form of the Taylor polynomial gives the following: P (x) = x P 3 (x) = x x3 P 5 (x) = x x3 + x5 5! Table for Taylor polynomial error x sin(x) p_(x) sin(x)-p_(x) p_3(x) sin(x)-p_3(x) p_5(x) sin(x)-p_5(x) -. -.8447 -..5859 -.8333333.8377 -.846667.957 -.9 -.783369 -.9.6673 -.7785.4869 -.78347.938 -.8 -.77356 -.8.86439 -.746667.6894 -.773973.4 -.7 -.64477 -.7.55783 -.648333.3844 -.644339.6 -.6 -.564645 -.6.353575 -.564.645 -.564648.55 -.5 -.479455 -.5.5745 -.479667.589 -.47947.5 -.4 -.389483 -.4.587 -.3893333.85 -.389487.3 -.3 -.955 -.3.44798 -.955. -.9553. -. -.986693 -..337 -.986667.7 -.986693. -. -.998334 -..666 -.998333. -.998334...........998334..666.998333..998334...986693..337.986667.7.986693..3.955.3.44798.955..9553..4.389483.4.587.3893333.85.389487.3.5.479455.5.5745.479667.589.47947.5.6.564645.6.353575.564.645.564648.55.7.64477.7.55783.648333.3844.644339.6.8.77356.8.86439.746667.6894.773973.4.9.783369.9.6673.7785.4869.78347.938..8447..5859.8333333.8377.846667.957 Code for generating table %Code for finding error in Taylor Polynomials g=@(t)sin(t); x=linspace(-,,); y=g(x); %First Degree Taylor polynomial about x= p=@(t)t; y=p(x); %Third Degree Taylor Polynomial about x= p3=@(t)t-t.^3/factorial(3); y3=p3(x); %Fifth Degree Taylor Polynomial about x= p5=@(t)t-t.^3/factorial(3)+t.^5/factorial(5); y5=p5(x); %Calculating Error in Taylor approximation and actual function err=abs(y-y); err3=abs(y-y3); err5=abs(y-y5); %Code for generating table fprintf( %s %s %s %5s %s %5s %s %5s\n, x, sin(x), p_(x), sin(x)-p_(x), p_3(x), sin(x)-p_3(x), p_5(x), sin(x)-p_5(x) ), for i=: 4

fprintf( %.7f %.7f %.7f %5.7f %.7f %5.7f %.7f %5.7f\n, x(i),y(i),y(i),err(i), y3(i),err3(i),y5(i),err5(i)) end Problem 4. Explain why the quotients are undefined for x =, then use Taylor polynomials in the numerator of each quotient to determine the natural definition of g(). (a) g(x) = log( + x) x The function is undefined when x = because of division by zero. However using a Taylor polynomial in the numerator, one can define a natural definition for g(). Let n(x) = log( + x). Thus, n(x) = log( + x) n() = log() = n (x) = (+x) n () = n (x) = (+x) n () = n (x) = (+x) n () = 3 Thus, using the general formula for the Taylor polynomial gives the following Thus, in general P n (x) = i= P 3 (x) = x x! + x3 Then, substituting the Taylor polynomial in the numerator gives Expanding the sum shows Then, g() = as a natural definition. n ( ) i+ x i n ( ) i+ x i = x i i g(x) x n ( ) i+ x i i= i x = i= n ( ) i+ x i i= g(x) x + x 3 + i (b) g(x) = log( x) + xex/ x 3 This function is undefined at x = because of division by zero. However, by approximating the numerator with a Taylor polynomial, one can naturally define g(). A Taylor polynomial will be created for each addition term in the numerator, and then the two Taylor polynomials will be added together to create the complete Taylor polynomial for the numerator. This begin as follows, Thus, the Taylor polynomial may be written as, n (x) = log( x) n () = n (x) = ( x) n () = n (x) = ( x) n () = n (x) = 3 ( x n () = P n, (x) = x x x3 3 + For the second part of the numerator, let n (x) = xe x/. The Taylor polynomial for this function can be found by beginning with the well known Taylor polynomial for e x. P ex,n(x) = + x + x! + 5

Thus, to find the Taylor polynomial for e x/ simply replace x with x/ as follows: P e x/,n(x) = + x + ( x )! + = + x + x 4! + Lastly, to obtain the Taylor polynomial for xe x/ simply multiply the Taylor polynomial for e x/ by x, as follows, P n, (x) = x[ + x + x 4! + ] = x + x + x3 4! + Then the Taylor polynomial for the entire numerator may be found by adding P n, to P n, as follows, P n (x) = x + x + x3 x + + x 4! x3 3 + = x3 ( 8 3 ) + Thus, replacing the numerator with the new Taylor polynomial yields Finally, a natural definition for g() can be found as follows. g(x) P n(x) x 3 = x3 ( 8 3 ) + x4 x 3 = ( 8 3 ) + x g() = ( 8 3 ) = 5 4 Problem 5. Find the linear and quadratic Taylor polynomials for f(x) = 3 x about a = 8. f(x) = x /3 f(8) = f (x) = 3 x 3 f (8) = f (x) = 9 x 5 9 f (8) = 44 f (x) = 7 x 8 3 f (8) = 5 3456 Then, using the general formula for a Taylor polynomial gives the linear and quadratic Taylor polynomials to be, (x 8) P (x) = + (x 8) P 3 (x) = + (x 8) 44 The general formula for finding the error in a Taylor approximation can then be found by the following where a c x x Thus finding the error in the linear Taylor polynomial R n (x) = f n+ (c x ) (x a)n+ (n + )! f n+ (c x ) = f (c x ) = 9 c 5 3 x R n (x) = 9 (c x) 5 3! (x 8) On the range x [8, 8 + δ], c x may be bound by (8 + δ) and x may also be bound by (8 + δ), giving Then, when δ =. such that x [8, 8.] R n (x) = 9 (8 + δ) 5 3! R n (x) 9 (8.) 5 3! ((8 + δ) 8) = 9 (8 + δ) 5 3! (.) = 3.4 5 (δ) 6

Now, finding the error in the quadratic Taylor polynomial, f n+ (c x ) = f 3 (c x ) = R n (x) = 8 7 c 3 x 7 (c x) 8 3 (x 8) 3 On the range x [8, 8 + δ], c x may be bound by (8 + δ) and x may also be bound by (8 + δ), giving R n (x) = Then, when δ =. such that x [8, 8.] 7 (8 + δ) 8 3 ((8 + δ) 8) 3 = R n (x) = 7 (8 + δ) 8 3 (δ) 3 7 (8.) 8 3 (.) 3 =.33 7 Linear and Quadratic Taylor Polynomial Error Code for generating error plot %Code to graph the error in the linear and quadratic Taylor polynomial approximation of %(x)^(/3) %Code for finding the actual value of the function f=@(t)(t).^(/3); x=linspace(7.9,8.,); y=f(x); %Code for the linear Taylor approximation p=@(t)+(t-8)/; y=p(x); %Code for the quadratic Taylor approximation p=@(t)+(t-8)/-(t-8).^/44; y=p(x); %Calculate the error in the liner Taylor polynomial err=y-y clf semilogy(x,abs(err), r.- ); title( Taylor Polynomial Approximation Errors ) xlabel( x ) ylabel( Absolute Value of Approximation Error ) 7

hold on %Calculate the error in the quadratic Taylor polynomial err=y-y semilogy(x,abs(err), b*- ) legend( Linear Taylor Polynomial, Quadratic Taylor Polynomial ) Problem 6. Let p n (x) be the Taylor polynomial of degree n of the function f(x) = log( x). How large should one choose n for R n 4? The Taylor approximation for log( x) can be found utilizing the known Taylor approximation for x as shown below: f(x) = log( x) f (x) = = x Since the Taylor polynomial for x is well known as ( + x + x + +x 3 + + x n + xn+ x ), then the following is true, f(x) = Thus, the error term is given by t t df dx dx = t ( + x + x + x 3 + + x n )dx + t x n+ x dx and using the integral mean value theorem gives R n = c x t x n+ dx = t n+ c x n + x n+ x dx To determine how large to make n, one needs to know the interval and the target maximum error. In this problem, let R n = 4 (a)x [, ] thus, let t [, ] and since c x x let c x [, ] In creating an upper bound, bound t by and bound c x by, giving: n+ n+ R n = n + = n + 4 Then for n = 8, R n = 4 and for n = 9, R n = 8.9 5, thus a value of n = 9 is needed. (b) x [, ] thus, let t [, ] and since c x x let c x [, ] In creating an upper bound, use t = and c x =, giving Rn = ( ) n+ n + = n + 4 For this inequality to hold, a least value of n = 9998 must be chosen. Problem 7. (a) Give a Taylor approximation to f(x) about x = f(c) = x x cos(t) t dt To write the Taylor polynomial, begin with the well known Taylor polynomial for the cos(t) such that Thus, f(x) may be written as cos(t) = x! + x4 xn + + ( )n 4! (n)! + x n+ ( )n+ (n + )! cos(c) f(x) = x x [ t! + t4 tn 4! + + ( )n (n)! + ( )n+ t ] tn+ (n+)! cos(c) dt 8

= x = x = x [ x x x t! t4 tn 4! + + ( )n+ (n)! + ( )n t tn+ (n+)! cos(c)! t t(n ) + + ( )n+ + ( ) n t n 4! (n)! (n + )! cos(c)dt! t t(n ) + + ( )n+ 4! (n)! dt + x dt ( ) n t n ] (n + )! cos(c)dt In bounding the error, cos(c), so for an upper bound, assume cos(c) =, giving R n = x ( ) n t n [ ] x (n + )! dt = ( ) n x n x n = x (n + )(n + )! (n + )(n + )! The complete Taylor polynomial for f(x) may then be given by f(x) = [ x 3 4! + + ( )n+ x n (n )(n)! (b) Bound the error in the degree n approximation for x. On this boundary, one may bound x by, giving R n R n ] + ( ) n x n (n + )(n + )! (n + )(n + )! ( ) n x n (n + )(n + )! (c) Find n so as to have a Taylor approximation with an error of at most 9 on [, ] R n (n + )(n + )! 9 Thus for n = 4, R n 3. 8 and for n = 5, R n Then to satisfy the required error, one should choose n = 54 (d) Plot a graph of Cint(x) on [-,] Cint(x) x [, ] Code for Cint(x) graph %Matlab program to approximate Cint(x) x=linspace(-,,); %Create the x values to be evaluated deg=5; %Enter the degree of the Taylor approximation 9

%Calculate the coefficients for each term of the Taylor polynomial c=cint_tay(deg); %Calculate the Taylor polynomial p=polyeven(x,c,deg); plot(x,p) hold on xlabel( x ) ylabel( f(x) ) title( Cint(x) x\in [-,] ) function [ coeff ] = cint_tay( m ) %This function calculates the coefficients for the Taylor polynomial that %approximates Cint(x). coeff=ones(m,); sign=-; fact=; for i=:m sign=-sign; d=*i-; fact=fact*(*i)*(*i-); coeff(i)=sign/(d*fact); end end function [ value ] = polyeven( x,coeff,m ) %Evaluate the polynomial xsq=x.*x; value=coeff(m)*ones(size(x)); for i=m-:-: value=coeff(i)+ xsq.*value; end end