LearningGuide

07333000221 2 6 add this value to the set of critical

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: s(1) This answer is, of course, the value of f (x0). To see this, ﬁrst deﬁne the function f 1 to be the ﬁrst derivative of f . Since f is a function, use D. Important: The D operator computes derivatives of functions, while diff computes derivatives of expressions. For more information, refer to the ?operators,D help page. > f1 := D(f); f1 := x → cos(x) esin(x) As expected, f 1(x0) equals the previous limit. > f1(x0); esin(1) cos(1) 7.1 Introductory Calculus • 219 In this case, the second derivative exists. > diff( f(x), x, x ); −sin(x) esin(x) + cos(x)2 esin(x) Deﬁne the function f 2 to be the second derivative of f . > f2 := unapply( %, x ); f2 := x → −sin(x) esin(x) + cos(x)2 esin(x) When you plot f and its ﬁrst and second derivatives, f is increasing whenever f 1 is positive, and f is concave down whenever f 2 is negative. > plot( [f(x), f1(x), f2(x)], x=0..10 ); 2 1 0 –1 –2 2 4 6 8 10 x The graph of f has an inﬂection point where the second derivative changes sign, and the second derivative can change sign at the values of x where f 2(x) is zero. > sol := { solve( f2(x)=0, x ) }; 220 • Chapter 7: Solving Calculus Problems sol := arctan 2 1√ 1 5− 2 2 √ , −arctan 2 −2 + 2 5 −2 − 2 √ 5), 1√ 1 5− 2 2 √ + π, −2 + 2 5 arctan(− 1√ 5− 2 1√ 5− arctan(− 2 11 , 22 1 1 ,− 2 2 √ −2 − 2 5) Two of these solutions are complex. > evalf( sol ); {0.6662394321, 2.475353222, −1.570796327 + 1.061275064 I, −1.570796327 − 1.061275064 I } In this example, only the real solutions are of interest. Use the select command to select the real constants from the solution set. > infl := select( type, sol, realcons ); inﬂ := arctan 2 > evalf( infl ); 1√ 1 5− 2 2 √ , −arctan 2 −2 + 2 5 1√ 1 5− 2 2 +π √ −2 + 2 5 {0.6662394321, 2.475353222} Observe that f 2 actually does change sign at these x-values. The set of inﬂection points is given by the following. > { seq( [x, f(x)], x=infl ) }; 7.1 Introductory Calculus • 221 arctan 2 −arctan 2 2 1 1√ √ √ 5− −2+2 5 2 2 , e √ −2 + 2 5 √ 1/2 5−1/2 √ (1/2 5−√ 2)2 1/ 1+4 −2+2 5 , 2 1 1√ √ √ 5− −2+2 5 2 2 + π, e √ −2 + 2 5 √ 1/2 5−1/2 √ (1/2 5−√ 2)2 1/ 1+4 −2+2 5 > evalf( % ); {[0.6662394321, 1.855276958], [2.475353222, 1.855276958]} Since f is periodic, it has, of course, inﬁnitely many inﬂection points. You can obtain these by shifting the two inﬂection points above horizontally by integer multiples of 2π . A Taylor Approximation This section illustrates how you can use Maple to analyze the error term in a Taylor approximation. The following is Taylor’s formula. > taylor( f(x), x=a ); f(a) + D(f )(a) (x − a) + 1 1 (2) (D )(f )(a) (x − a)2 + (D(3) )(f )(a) 2 6 1 1 (x − a)3 + (D(4) )(f )(a) (x − a)4 + (D(5) )(f )(a) (x − a)5 + 24 120 O((x − a)6 ) You can use it to ﬁnd a polynomial approximation of a function f near x = a. > f := x -> exp( sin(x) ); f := x → esin(x) > a := Pi; 222 • Chapter 7: Solving Calculus Problems a := π > taylor( f(x), x=a ); 1 − (x − π ) + 1 1 1 (x − π )2 − (x − π )4 + (x − π )5 + O((x...
View Full Document

This note was uploaded on 08/27/2012 for the course MATH 1100 taught by Professor Nil during the Spring '12 term at National University of Singapore.

Ask a homework question - tutors are online