MATH 149 LABORATORY ASSIGNMENT 8 THE FUNDAMENTAL THEOREM OF CALCULUS In class we defined the definite integral of the function f x on the interval a b as b f x dx Lim a n f c x k k xk 1 k 1 where a x0 x1 x2 xn 1 xn b is a partition of a b xk 1 ck xk for k 1 n and the limit is taken as n and the lengths of the subintervals xk 1 xk determined by the partition go to 0 The easiest and best way to evaluate the definite integral is by using the Fundamental Theorem of Calculus which says that b f x dx F b F a a where F is any antiderivative of f i e F x f x In this laboratory we will verify the Fundamental Theorem by first using MAPLE to evaluate the limit of the sum directly and then by finding F and computing F b F a EXAMPLE Let f x x cos x 0 x 2 We will use partitions in which the xk s are equally spaced and each ck is the midpoint of xk 1 xk First we illustrate the approximating rectangles using a partition with 20 points followed by computing the limit of the Riemann sum with student f x x cos Pi x f x x cos x middlebox f x x 0 2 Pi 20 The corresponding approximating sum is ms20 middlesum f x x 0 2 Pi 20 2 1 19 i 2 1 1 1 ms20 i cos 10 10 i 0 10 2 or mv20 value ms mv20 ms evalf mv20 ms If we use a partition with n points an approximating sum using middle points as sample points is msn middlesum f x x 0 2 Pi n 1 2 2 i 1 2 2 i cos n 1 n 2 2 n i 0 msn n MAPLE knows a formula for this sum mvn value msn 2 2 2 2 2 2 2 cos 1 cos sin cos 2 n n n mvn 2 2 2 2 1 cos n n 2 2 2 2 2 2 1 cos n 1 cos n 1 cos n n n We now take the limit as n this will agree with be equal to the exact value of 2 2 2 2 sin sin cos n 2 2 2 cos cos n 2 cos n 2 x cos x dx 0 ml limit mvn n infinity 2 ml 2 2 cos 2 4 sin cos 2 2 2 evalf ml 1 51618535331448 To use the Fundamental Theorem of Calculus we first use MAPLE to find an antiderivative F x for f x The command is int f x x cos x x sin x NOTE THAT MAPLE DOES NOT INCLUDE THE C 2 2 F x cos Pi x Pi x sin Pi x Pi 2 F x cos x x sin x You should differentiate F x by hand to check that the derivative is actually f x non computer methods for finding antiderivatives of functions like f x x cos x will be developed in Math 152 2 2 By the Fundamental Theorem x cos x dx F 2 F 0 0 JFTC F 2 Pi F 0 cos 2 2 sin 2 2 JFTC 2 2 1 This looks different from the answer obtained above but the two are actually equal Indeed evalf JFTC 2 2 1 51618535331451 evalf 2 2 sin Pi 2 cos Pi 2 Pi 2 1 cos Pi 2 2 Pi 2 1 51618535331448 This apparent differance is due to round off errors If we increase the number of digits and repeat the computations the agreement is closer Digits 15 Digits 15 The fifteen digit value from computing the limit of the Riemann sum is evalf 2 2 sin Pi 2 cos Pi 2 Pi 2 1 cos Pi 2 2 Pi 2 1 51618535331448 The fifteen digit value from the Fundamental Theorem of Calculus is evalf cos 2 Pi 2 2 Pi 2 sin 2 Pi 2 Pi 2 1 Pi 2 1 51618535331451
View Full Document
Unlocking...