APPROXIMATE INTEGRATION

Similar documents
Midpoint Approximation

Math& 152 Section Integration by Parts

6.5 Numerical Approximations of Definite Integrals

Math 131. Numerical Integration Larson Section 4.6

Z b. f(x)dx. Yet in the above two cases we know what f(x) is. Sometimes, engineers want to calculate an area by computing I, but...

Section 6.1 Definite Integral

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2.

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Math 1B, lecture 4: Error bounds for numerical methods

Lecture 14: Quadrature

The Regulated and Riemann Integrals

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

The Trapezoidal Rule

Sections 5.2: The Definite Integral

Definite integral. Mathematics FRDIS MENDELU

INTRODUCTION TO INTEGRATION

Definite integral. Mathematics FRDIS MENDELU. Simona Fišnarová (Mendel University) Definite integral MENDELU 1 / 30

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

The Fundamental Theorem of Calculus, Particle Motion, and Average Value

Distance And Velocity

Tangent Line and Tangent Plane Approximations of Definite Integral

Math 8 Winter 2015 Applications of Integration

Definite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +

Numerical Integration

different methods (left endpoint, right endpoint, midpoint, trapezoid, Simpson s).

5.1 How do we Measure Distance Traveled given Velocity? Student Notes

Big idea in Calculus: approximation

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

Numerical Analysis: Trapezoidal and Simpson s Rule

Chapter 6 Notes, Larson/Hostetler 3e

The Riemann Integral

1 The Riemann Integral

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

Chapter 2. Numerical Integration also called quadrature. 2.2 Trapezoidal Rule. 2.1 A basic principle Extending the Trapezoidal Rule DRAWINGS

x = b a n x 2 e x dx. cdx = c(b a), where c is any constant. a b

Lecture 20: Numerical Integration III

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Review of Calculus, cont d

The Fundamental Theorem of Calculus

NUMERICAL INTEGRATION

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx...

AP Calculus AB Unit 5 (Ch. 6): The Definite Integral: Day 12 Chapter 6 Review

1 Part II: Numerical Integration

Math 190 Chapter 5 Lecture Notes. Professor Miguel Ornelas

Review of basic calculus

Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

Integrals - Motivation

Chapters 4 & 5 Integrals & Applications

Riemann is the Mann! (But Lebesgue may besgue to differ.)

1 The fundamental theorems of calculus.

7.2 The Definite Integral

Lab 11 Approximate Integration

MATH , Calculus 2, Fall 2018

Section 4.8. D v(t j 1 ) t. (4.8.1) j=1

Lecture 12: Numerical Quadrature

x = b a N. (13-1) The set of points used to subdivide the range [a, b] (see Fig. 13.1) is

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral

1 The fundamental theorems of calculus.

Indefinite Integral. Chapter Integration - reverse of differentiation

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1

We divide the interval [a, b] into subintervals of equal length x = b a n

Section 6: Area, Volume, and Average Value

Topics Covered AP Calculus AB

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

4.6 Numerical Integration

!0 f(x)dx + lim!0 f(x)dx. The latter is sometimes also referred to as improper integrals of the. k=1 k p converges for p>1 and diverges otherwise.

5.7 Improper Integrals

Math 360: A primitive integral and elementary functions

Calculus I-II Review Sheet

Unit Six AP Calculus Unit 6 Review Definite Integrals. Name Period Date NON-CALCULATOR SECTION

Section Areas and Distances. Example 1: Suppose a car travels at a constant 50 miles per hour for 2 hours. What is the total distance traveled?

Chapter 5. Numerical Integration

ROB EBY Blinn College Mathematics Department

4.4 Areas, Integrals and Antiderivatives

Taylor Polynomial Inequalities

MATH SS124 Sec 39 Concepts summary with examples

Integration Techniques

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

5 Accumulated Change: The Definite Integral

Math 113 Exam 2 Practice

The Definite Integral

2 b. , a. area is S= 2π xds. Again, understand where these formulas came from (pages ).

AB Calculus Review Sheet

Best Approximation. Chapter The General Case

If u = g(x) is a differentiable function whose range is an interval I and f is continuous on I, then f(g(x))g (x) dx = f(u) du

Math 116 Calculus II

5: The Definite Integral

f(x)dx . Show that there 1, 0 < x 1 does not exist a differentiable function g : [ 1, 1] R such that g (x) = f(x) for all

( ) as a fraction. Determine location of the highest

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

( ) where f ( x ) is a. AB Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

38 Riemann sums and existence of the definite integral.

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

Transcription:

APPROXIMATE INTEGRATION. Introduction We hve seen tht there re functions whose nti-derivtives cnnot be expressed in closed form. For these resons ny definite integrl involving these integrnds cnnot be determined in n exct mnner. Alterntively, function my only be determined by scientific experiment in the form of tbles of dt. In this sitution there my be no formul for the function. In these cses we cn find pproximte vlues of definite integrls. We hve lredy seen bsic pproch to this, nmely Riemnn sums. Any Riemnn sum could be used s n pproximtion to the ctul integrl. Tht is if we divide [, b] into n subintervls of equl length x = b n then we hve f(x)dx f(x i ) x i= where x i is ny point in the i th subintervl [x i, x i ]. If we choose x i to be the left endpoint of the intervl, x i = x i then () f(x)dx L n = f(x i ) x. A If f(x), the integrl represents n re nd () will be n pproximtion of this re by n rectngles. If insted we choose the right endpoint s x i, so tht x i = x i, then () f(x)dx R n = f(x i ) x A The pproximtions L n nd R n defined by equtions () nd () re clled (unsurprisingly) the left endpoint pproximtion nd right endpoint pproximtion respectively. i= i=. Other Approximtions These re not the only pproximtions possible. If one chose x i to be the midpoint x i of the subintervl [x i, x i ] we produce the midpoint pproximtion M n which will perform better thn L n or R n. Proposition.. MidPoint Rule A f(x)dx M n = where x = b n nd x i = (x i + x i ) f( x i ) x i=

APPROXIMATE INTEGRATION Another pproximtion tht is more ccurte thn L n or R n is the Trpezoidl Rule which cn be found by verging equtions () nd (): [ f(x)dx n f(x i ) x + i= ] f(x i ) x i= = x [ n ] f(x i ) + f(x i ) = x [(f(x ) + f(x )) + (f(x ) + f(x )) +... + (f(x n ) + f(x n ))] = x [f(x ) + f(x ) + f(x ) +... + f(x n ) + f(x n )] This pproch cn be summrized s the following formul Proposition.. Trpezoidl Rule [ ] b f(x)dx T n = x n f(x ) + f(x i ) + f(x n ) where x = b x nd x i = + i x For f(x) the nme of the Trpezoidl rule becomes pprent if one drws the sums for prticulr function; we re no longer dding rectngles, but trpezoids over ech subintervl with the re of the i th trpezoid: ( ) f(xi + f(x i ) x = x [f(x i ) + f(x i )]. Adding up the re of ech trpezoids we recover the bove formul. i= Exmple.3. For n = 5, evlute the integrl () the Trpezoidl Rule () the Midpoint rule xdx using i= Proof. () Plugging in n = 5, = nd b = x = b x Trpezoidl rule produces = 5 =. nd the x dx T 5 =. (f() + f(.) + f(.4) + f(.6) + f(.8) + f()) ( =. +. +.4 +.6 +.8 + ).695635 () Averging the six points, we hve x dx M 5 = x[f(.) + f(.3) + f(.5) + f(.7) + f(.9)] = ( 5. +.3 +.5 +.7 + ).9.6998

APPROXIMATE INTEGRATION 3 3. Error Bounds This exmple ws delibertely chosen so tht its exct vlue could be computed, nd comprison of ccurcy could be drwn between the trpezoidl nd midpoint rules. The Fundmentl Theorem of clculus implies x dx = ln x] = ln =.69347... The error in using n pproximtion is defined to be the mount tht must be dded to mke the pproximtion equl the exct vlue. From exmple, we my compute the errors for n=5 from the trpezoidl nd midpoint rule to be More generlly, these re E T = E T.488, E M.39. f(x)dx T n, E M = f(x)dx M n. To compre the ccurcy of ech of L n, R n, M n nd T n consider the following tbles for n = 5,, nd n L n R n T n M n 5.745635.645635.695635.6998.7877.66877.69377.69835.7583.6883.69333.69369 n E L E R E T E M 5.5488.475.488.39.564.4376.64.3.656.344.56.78 From this tble, one cn mke the following observtions For ll of the methods, if we increse the vlue of n the pproximtion becomes more ccurte. Bewre lrge vlues of n due to the round-off error rising from the lrge number of rithmetic opertions. The error in the left nd right endpoint pproximtion hve opposite sign nd their error decresed by fctor of when n is doubled. The Trpezoidl nd Midpoint rule re better pproximtions thn the endpoint pproximtions. The trpezoidl nd midpoint rules hve error with opposite sign nd they decrese by rougly fctor of 4 by doubling n The mgnitude of the error for the Midpoint rule is roughly hlf the size of the error for the Trpezoidl rule. This lst fct cn be proven with elementry geometry - see Figure 5 in chpter 7.5 of the textbook. Any textbook in numericl nlysis will support these observtions. For exmple the fourth observtion rises from the fct tht n is involved in the sum, so tht (n) = 4n. As f (x) mesures how much the grph curves, the estimtes will depend on the size of the second derivtive of f(x)

4 APPROXIMATE INTEGRATION Proposition 3.. Error Bounds If f (x) K for x [, b], then the error bounds for the Trpezoidl nd Midpoint rule re respectively bounded by E T K(b )3 K(b )3 n, nd E M 4n Returning to exmple, we cn determine the error estimte for the Trpezoidl rule. With f(x) = x, f (x) = x nd f (x) = x, then since /x for x [, ] 3 f (x) = 3 =. x 3 Choosing K =, with =, b = nd n = 5 the error estimte from Proposition 3. will be ( )3 E T 5 = 5.6667 The ctul error for this exmple ws.488 <.6667, this shows it cn hppen tht the ctul error is substntilly less thn the upper bound for the error given by Proposition 3.. Exmple 3.. How lrge should n be chosen in order to gurntee the Trpezoidl nd Midpoint rule pproximte xdx to within.? Proof. Previously we sw tht f (x) for x [, ], thus tking K =, =, b = nd leving n rbitrry we hve Solving the inequlity for n, () 3 n. n > (.) n > (.6) 4.8 Choosing the lrger integer, n = 4 will ensure the desired ccurcy. Repeting this process for the Midpoint rule error bound 9 () 3 4n <. n > (.) Exmple 3.3. () Use the Midpoint Rule with n = to pproximte the integrl ex dx. () Give n upper bound for the error involved in this pproximtion. Proof. () Since =, b = nd n = we hve x =. nd the Midpoint rule yields e x dx x[f(.5) + f(.) +... + f(.85) + f(.95)] =.[e.5 + e.5 + e.65 + e.5 + e.5 + e.35 +e.45 + e.565 + e.75 + e.95 ].46393

APPROXIMATE INTEGRATION 5 () As f(x) = e x, then f (x) = xe x nd f (x) = ( + 4x)e x As x for ll x [, ] this implies f (x) = ( + 4x )e x 6e Choosing K = 6e, =, b =, nd n = in the error estimte of Proposition 3. the upper bound for the error is 6e() 3 4() = e 4.7 4. Simpson s Rule As n lterntive to using stright line segments to pproximte curve, we could use prbols insted. We divide the intervl [, b] into n subintervls of equl length h = x = b n, however now we require tht n is even. For ech consecutive pir of intervls we pproximte the curve y = f(x) by prbol. If y i = f(x i ) then P i (x i, y i ) is the point on the curve lying bove x i. Typiclly prbol psses through three consecutive points P i, P i+, nd P i+. For moment, let us suppose tht x = h, x = nd x = h, to mke our clcultion simpler. It is known tht the eqution of the prbol through P, P, nd P is of the form y = Ax + Bx + C nd the re under the prbol from x = h to x = h is h h (Ax + Bx + C)dx = h (Ax + C)dx ] h = [A x3 3 + Cx ) = (A h3 3 + Ch = h 3 (Ah + 6C). As the point psses through P ( h, y ), P (, y ), nd P (h, y ) implying thus y = A( h) + B( h) + C = Ah Bh + C y = C y = Ah + Bh + C y + 4y + y = Ah + 6C. Therefore we cn rewrite the re under the prbol s h 3 (y + 4y + y ) If we shift the prbol horizontlly we do not chnge the re under it. The re under the prbol through P, P 3, nd P 4 from x = x to x = x 4 is lso h 3 (y + 4y 3 + y 4 )

6 APPROXIMATE INTEGRATION Computing the res under ll of the prbols in this mnner nd dding the res together, A f(x)dx h 3 (y + 4y + y ) + h 3 (y + 4y 3 + y 4 ) +... + h 3 (y n + 4y n + y n ) = h 3 (y + 4y + y + 4y 3 + y 4 +... + y n + 4y n + y n While we only considered the cse where f(x), this pproch will work for ny continuous function f. This pproximtion is clled Simpson s Rule nd it is nmed fter the English mthemticin Thoms Simpson (7-76). It is importnt to remember the pttern of the coefficients, 4,, 4,, 4,,..., 4,, 4, ]. Proposition 4.. Simpson s Rule f(x)dx S n = x 3 [f(x ) + 4f(x ) + f(x ) + 4f(x 3 ) +... where n is even nd x = b x. +f(x n ) + 4f(x n ) + f(x n )] Exmple 4.. Use Simpson s Rule with n = to pproximte x dx Proof. Setting f(x) = /x, n =, = nd b = then x =. nd Simpson s rule yields x dx = [f() + 4f(.) + f(.) + 4f(.3) +...f(.8) + 4f(.9) + f()] x 3 =. ( 3 + 4. +. + 4.3 +.4 + 4.5 +.6 + 4.7 +.8 + 4.9 + ).6935 Compring with our previous exmple, it is cler tht Simpson s Rule gives significntly better pproximtion S.6935) to the true vlue of the integrl ln..69347). In fct, one cn prove tht the pproximtions in Simpson s Rule re weighted verges of those in the Trpezoidl nd Midpoint rules: S n = 3 T n + 3 M n It hs been mentioned tht often one must evlute n integrl even if one hs no explicit formul for y s function of x. Tht is, the function my be given grphiclly or s tble of vlues of collected dt. If the vlues do not chnge rpidly, the Trpezoidl rule or Simpson s rule cn be used to determine n pproximte vlue for ydx. Exmple 4.3. The following figure shows dt trffic on the link from the United Sttes to SWITCH the Swiss Acdemic nd Reserch Network on Februry, 998. Use Simpson s Rule to estimte the totl mount of dt trnsmitted on the link from midnight to noon on tht dy. Proof. As D(t) is mesured in megbits per second, we hve to convert the units for t from hours to seconds. Defining A(t) s the mount of dt trnsmitted by

APPROXIMATE INTEGRATION 7 Figure. Grph of D(t) dt throughput, mesured in Mb/s time t, where t is mesured in seconds, then A (t) = D(t). From the Net Chnge Theorem, the totl mount of dt trnsmitted by noon (t = x6 = 43, ) is A(43, ) = 43, D(t)dt. Estimting the vlues of D(t) t hourly intervls from the grph: t(hours) t(seconds) D(t) 3. 3, 6.7 7,.9 3, 8.7 4 4, 4.3 5 8,. 6, 6. 7 5,.3 8 8, 8.8 9 3, 4 5.7 36, 7. 39, 6 7.7 43, 7.9 Using Simpson s rule with n = nd t = 36 to estimte the integrl 43 D(t)dt t [D() + 4D(36) + D(7) +... + 4D(39, 6) + D(43, )] 3 36 [3.4(.7) + (.9) + 4(.7) + (.3) + 4(.) + (.) + 4(.3) 3 +(.8) + 4(5.7) + (7.) + 4(7.7) + 7.9] = 43, 88

8 APPROXIMATE INTEGRATION Thus the totl mount of dt trnsmitted from midnight to noon is 44, megbits or 44 gigbits. We cn compre the Simpson s rule nd the Midpoint rule, in the first tble, for the integrl xdx whise ctul vlue is.693478. In the second tble we cn compute the error for ech pproximtion. Notice tht E s decreses by fctor of bout 6 when n is doubled. This fct is consistent with the following error bound for Simpson s rule n M n S n 4.69989.6935453 8.696655.6934765 6.6935.69347 n M n S n 4.979.735 8.48663.47 6.97.3 Proposition 4.4. Error Bound for Simpson s Rule Suppose tht f (4) (x) K for x b. If E s is the error involved in using Simpson s Rule then E s K(b )5 8n 4 Exmple 4.5. How lrge should we tke n in order to gurntee tht the Simpson s Rule pproximtion for xdx is ccurte to within.? Proof. Since f(x) = /x then f(x) = 4/x 5 ; requiring x, /x nd so f (4) (x) = 4 4 x 5 Therefore we cn tke K = 4. Requiring tht the error is less thn. we choose n so tht This yields which gives n > 4() 5 8n 4 <. n 4 > 4 8(.) 4.75 6.4 Since n must be even, n = 8 will give us the ccurcy we require. This is pretty good compred to n = 9 for the midpoint rule nd n = 4 for the Trpezoidl rule. Exmple 4.6. () Use Simpson s Rule with n = to pproximte the integrl ex dx. () Estimte the error involved in this pproximtion.

Proof. APPROXIMATE INTEGRATION 9 () If n =, = nd b =, Simpson s rule gives e x dx x [f() + 4f(.) + f(.) +... + f(.8) + 4f(.9) + f()] 3 =. 3 [e + 4e. + e.4 + 4e.9 + e.6 + 4e.5 + e.36 +4e.49 + e.64 + 4e.8 + e ].4668 () The fourth derivtive of f(x) = e x is nd since x we hve f (4) (x) = ( + 48x + 6x 4 )e x ( + 48 + 6)e = 76e. Setting K = 76e, with =, b = nd n = the error is 76e() 5 8() 4.5 From this we know the correct nswer to three deciml plces is e x dx.463