Trapezoid Rule. y 2. y L

Similar documents
SAT Subject Math Level 1 Facts & Formulas

ACT Math Facts & Formulas

Instantaneous Rate of Change:

Derivatives Math 120 Calculus I D Joyce, Fall 2013

1.6. Analyse Optimum Volume and Surface Area. Maximum Volume for a Given Surface Area. Example 1. Solution

Lecture 10: What is a Function, definition, piecewise defined functions, difference quotient, domain of a function

Math 113 HW #5 Solutions

New Vocabulary volume

f(a + h) f(a) f (a) = lim

Tangent Lines and Rates of Change

2 Limits and Derivatives

Verifying Numerical Convergence Rates

Determine the perimeter of a triangle using algebra Find the area of a triangle using the formula

M(0) = 1 M(1) = 2 M(h) = M(h 1) + M(h 2) + 1 (h > 1)

SAT Math Facts & Formulas

In other words the graph of the polynomial should pass through the points

Chapter 7 Numerical Differentiation and Integration

FINITE DIFFERENCE METHODS

13 PERIMETER AND AREA OF 2D SHAPES

Geometric Stratification of Accounting Data

The EOQ Inventory Formula

SAT Math Must-Know Facts & Formulas

Sections 3.1/3.2: Introducing the Derivative/Rules of Differentiation

The Derivative as a Function

Estimating the Average Value of a Function

Section 3.3. Differentiation of Polynomials and Rational Functions. Difference Equations to Differential Equations

Math Test Sections. The College Board: Expanding College Opportunity

Volumes of Pyramids and Cones. Use the Pythagorean Theorem to find the value of the variable. h 2 m. 1.5 m 12 in. 8 in. 2.5 m

2.1: The Derivative and the Tangent Line Problem

Note nine: Linear programming CSE Linear constraints and objective functions. 1.1 Introductory example. Copyright c Sanjoy Dasgupta 1

3 Ans. 1 of my $30. 3 on. 1 on ice cream and the rest on 2011 MATHCOUNTS STATE COMPETITION SPRINT ROUND

6. Differentiating the exponential and logarithm functions

MATHEMATICS FOR ENGINEERING DIFFERENTIATION TUTORIAL 1 - BASIC DIFFERENTIATION

f(x + h) f(x) h as representing the slope of a secant line. As h goes to 0, the slope of the secant line approaches the slope of the tangent line.

7.6 Approximation Errors and Simpson's Rule

Average and Instantaneous Rates of Change: The Derivative

CHAPTER 7. Di erentiation

Solutions to Homework 10

- 1 - Handout #22 May 23, 2012 Huffman Encoding and Data Compression. CS106B Spring Handout by Julie Zelenski with minor edits by Keith Schwarz

Research on the Anti-perspective Correction Algorithm of QR Barcode

CHAPTER 8: DIFFERENTIAL CALCULUS

Perimeter, Area and Volume of Regular Shapes

Writing Mathematics Papers

f(x) f(a) x a Our intuition tells us that the slope of the tangent line to the curve at the point P is m P Q =

Notes: Most of the material in this chapter is taken from Young and Freedman, Chap. 12.

Theoretical calculation of the heat capacity

Chapter 11. Limits and an Introduction to Calculus. Selected Applications

OPTIMAL DISCONTINUOUS GALERKIN METHODS FOR THE ACOUSTIC WAVE EQUATION IN HIGHER DIMENSIONS

The modelling of business rules for dashboard reporting using mutual information

Optimized Data Indexing Algorithms for OLAP Systems


Chapter 10: Refrigeration Cycles

Projective Geometry. Projective Geometry

Distances in random graphs with infinite mean degrees

Pressure. Pressure. Atmospheric pressure. Conceptual example 1: Blood pressure. Pressure is force per unit area:

2.12 Student Transportation. Introduction

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

Solutions by: KARATUĞ OZAN BiRCAN. PROBLEM 1 (20 points): Let D be a region, i.e., an open connected set in

Chapter 6 Tail Design

An inquiry into the multiplier process in IS-LM model

Strategic trading in a dynamic noisy market. Dimitri Vayanos

Catalogue no XIE. Survey Methodology. December 2004

Answers to Exercises. Answers to Exercises 24.

Schedulability Analysis under Graph Routing in WirelessHART Networks

A strong credit score can help you score a lower rate on a mortgage

Grade 12 Assessment Exemplars

How To Ensure That An Eac Edge Program Is Successful

EC201 Intermediate Macroeconomics. EC201 Intermediate Macroeconomics Problem set 8 Solution

Graphing Quadratic Functions

SAT Subject Math Level 2 Facts & Formulas

Binary Search Trees. Adnan Aziz. Heaps can perform extract-max, insert efficiently O(log n) worst case

Section 2.3 Solving Right Triangle Trigonometry

(b)using the left hand end points of the subintervals ( lower sums ) we get the aprroximation

Math 229 Lecture Notes: Product and Quotient Rules Professor Richard Blecksmith

Shell and Tube Heat Exchanger

Can a Lump-Sum Transfer Make Everyone Enjoy the Gains. from Free Trade?

College Planning Using Cash Value Life Insurance

SAMPLE DESIGN FOR THE TERRORISM RISK INSURANCE PROGRAM SURVEY

MATH 132: CALCULUS II SYLLABUS

CHAPTER TWO. f(x) Slope = f (3) = Rate of change of f at 3. x 3. f(1.001) f(1) Average velocity = s(0.8) s(0) 0.8 0

Week 13 Trigonometric Form of Complex Numbers

The Dynamics of Movie Purchase and Rental Decisions: Customer Relationship Implications to Movie Studios

Cyber Epidemic Models with Dependences

ON LOCAL LIKELIHOOD DENSITY ESTIMATION WHEN THE BANDWIDTH IS LARGE

Comparison between two approaches to overload control in a Real Server: local or hybrid solutions?

Use finite approximations to estimate the area under the graph of the function. f(x) = x 3

Factoring Synchronous Grammars By Sorting

On a Satellite Coverage

Torchmark Corporation 2001 Third Avenue South Birmingham, Alabama Contact: Joyce Lane NYSE Symbol: TMK

SWITCH T F T F SELECT. (b) local schedule of two branches. (a) if-then-else construct A & B MUX. one iteration cycle

MA107 Precalculus Algebra Exam 2 Review Solutions

Referendum-led Immigration Policy in the Welfare State

Guide to Cover Letters & Thank You Letters

THE NEISS SAMPLE (DESIGN AND IMPLEMENTATION) 1997 to Present. Prepared for public release by:

The use of visualization for learning and teaching mathematics

2.23 Gambling Rehabilitation Services. Introduction

Area of Parallelograms, Triangles, and Trapezoids (pages )

Strategic trading and welfare in a dynamic market. Dimitri Vayanos

Understanding Basic Calculus

PROBLEM SET. Practice Problems for Exam #1. Math 1352, Fall Oct. 1, 2004 ANSWERS

Transcription:

Trapezoid Rule and Simpson s Rule c 2002, 2008, 200 Donald Kreider and Dwigt Lar Trapezoid Rule Many applications of calculus involve definite integrals. If we can find an antiderivative for te integrand, ten we can evaluate te integral fairly easily. Wen we cannot, we turn to numerical metods. Te numerical metod we will discuss ere is called te Trapezoid Rule. Altoug we often can carry out te calculations by and, te metod is most effective wit te use of a computer or programmable calculator. But at te moment let s not concern ourselves wit tese details. We will describe te metod first, and ten consider ways to implement it. f y 2 y 0 y y 3 a = x 0 x x 2 x 3 = b Te general idea is to use trapezoids instead of rectangles to approximate te area under te grap of a function. A trapezoid looks like a rectangle except tat it as a slanted line for a top. Working on te interval [a, b], we subdivide it into n subintervals of equal widt = (b a)/n. Tis gives rise to te partition a = x 0 x x 2 x n = b, were for eac j, x j = a + j, 0 j n. Moreover, we let y j = f(x j ), 0 j n. Tat is, te vertical edges go from te x-axis to te grap of f. Consult te sketc above were we ave sown a finite number of subintervals. If we are going to use trapezoids instead of rectangles as our basic area elements, ten we ave to ave a formula for te area of a trapezoid. y R - y L y R y L Wit reference to te sketc above, te area of a trapezoid consists of te area of te rectangle plus te area of te triangle, or y L + (/2)(y R y L ) = (y L + y R )/2. So, te area is times te average of te lengts of te two vertical edges. Now, we return to te original problem of finding te definite integral of a function f defined on te interval [a, b]. We define te Trapezoid Rule as follows.

Definition: Te n-subinterval trapezoid approximation to b f(x) dx is given by a T n = 2 (y 0 + 2y + 2y 2 + 2y 3 + + 2y n + y n ) = n y 0 + y n + 2 y j 2 j= To see were te formula comes from, let s carry out te process of adding te areas of te trapezoids. Refer to te original sketc, and use te formula we derived for te area of a trapezoid. Note tat wen we add te areas of te trapezoids starting on te left, te area of te first, second, and tird are: 2 (y 0 + y ) 2 (y + y 2 ) 2 (y 2 + y 3 ) So, y 0 and y 3, te first and te last, eac appear once; and all te oter y j s appear exactly twice. We can see from tis example tat tere will be a similar pattern no matter te number of trapezoids: Te first and te last vertical edge appears once, and all oter vertical edges appear two times wen we sum te areas of te trapezoids. Tis is exactly wat te Trapezoid Rule entails in te formula above. Example : Find T 5 for 2 and x j = + j/5, 0 j 5. x dx. We can readily determine tat f(x) = /x, = /5 (so /2 = /0), /5 /5 /5 /5 /5 So, T 5 = ( + ( 5 0 2 + 2 6 + 5 7 + 5 8 + 5 )).0696 9 Example 2: Find T 5 for 0 x2 dx. Tat is, we are going to approximate one-quarter of te area of a circle of radius. Te exact answer is π/4, or approximately.785398635. Note tat = /5, y 0 = and y 5 = 0. Tus, or about.7592622072. T 5 = + 2 0 4 j2 25 j= Simpson s Rule Anoter tecnique for approximating te value of a definite integral is called Simpson s Rule. Wereas te main advantage of te Trapezoid rule is its rater easy conceptualization and derivation, Simpson s rule 2

approximations usually acieve a given level of accuracy faster. Moreover, te derivation of Simpson s rule is only marginally more difficult. Bot rules are examples of wat we refer to as numerical metods. In te Trapezoid rule metod, we start wit rectangular area-elements and replace teir orizontal-line tops wit slanted lines. Te area-elements used to approximate, say, te area under te grap of a function and above a closed interval ten become trapezoids. Simpson s metod replaces te slanted-line tops wit parabolas. Toug two points determine te equation of a line, tree are required for a parabola. We also need to develop a formula for te area of a parabolic-top area-element if te sum of suc areas is to become te Simpson approximation. Suppose we consider a parabola y = Ax 2 + Bx + C wit its axis parallel to te y-axis and passing troug tree equally spaced points (, y L ), (0, y M ), and (, y R ). Ten substituting te tree points into te equation gives tree equations in te tree unknowns A, B, C. y L = A 2 B + C y M = C y R = A 2 + B + C Solving tese tree equations by adding te first to te last, and ten by subtracting te last from te first, yields: 2A 2 = y L + y R 2y M B = y R y L 2 C = y M Next, we compute te area under te parabola y = Ax 2 + Bx + C and above te interval [, ] for te values of A, B, and C we just found: 3

Ax 2 + Bx + C dx = ) (A x3 3 + B x2 2 + Cx = 3 2A3 + 2C ( ) = 3 2A2 + 2C ( ) = 3 (y L + y R 2y M ) + 2y M = 3 (y L + y R 2y M + 6y M ) = 3 (y L + y R + 4y M ) Te above formula olds for te area of a parabolic topped area element wit base of lengt 2 and vertical edges of lengt y L on te left and y R on te rigt. Te eigt at te midpoint is y M. Now, let n be an even positive integer, and suppose we divide an interval [a, b] into n equal parts eac of lengt = b a n. And suppose f is a function defined on [a, b]. As before we label te resulting partition a = x 0 x x 2 x n = b, were for eac j, x j = a + j, 0 j n. And again, we let y j = f(x j ), 0 j n. Tat is, te vertical edges go from te x-axis to te grap of f. Next, start at te left endpoint a of te interval and erect a parabolic-top area-element on te first two subintervals. Te base of tis area-element goes from x 0 to x 2, and we use as vertical sides te lines tat intersect te grap at (x 0, y 0 ) on te left and (x 2, y 2 ) on te rigt. Te point (x, y ) on te grap of f at te midpoint of te interval gives te tird point we need to determine te parabola tat forms te top of te area-element. From te formula we developed above, te area of tis area-element is equal to 3 (y 0 + y 2 + 4y ). If we repeat tis process using te next two subintervals tat go from x 2 to x 4, ten te area of te resulting parabolic-top element will be (from an application of te formula above) 3 (y 2 + y 4 + 4y 3 ). Tus, te sum of te areas of te two parabolic-top elements equals 3 (y 0 + 4y + 2y 2 + 4y 3 + y 4 ). We continue in tis way until we ave calculated te areas of te n 2 parabolic-top area elements and added tem togeter. A pattern begins to emerge in te form of te sum of te areas of te n 2 parabolic-top area-elements. Te sum will equal 3 multiplied by: y 0 + y n, i.e. te sum of te eigts of te leftmost and rigtmost vertical edges; plus 4 times te sum of te odd-indexed eigts; plus 2 times te sum of te even-indexed eigts because tese edges belong to two successive area-elements, one on te left and te oter on te rigt. Tis explains te form of te Simpson s Rule approximation wic we now state Definition: Let n be even. Te n-subinterval Simpson approximation to b f(x) dx is given by a S n = 3 (y 0 + 4y + 2y 2 + 4y 3 + 2y 4 + + 2y n 2 + 4y n + y n ) = (y 0 + y n + 4 y odd + 2 ) y even 3 Example 3: Find S 4 for 2 x dx. Te exact answer is ln 2, or approximately 0.69347806. In Example we found tat T 5 is equal to about 0.0696. If we are to use Simpson s rule for an approximation, ten n as to be even. Terefore, S 4 is a legitimate sum to calculate. Note tat = /4. Te five points of te partition are x 0 =, x = 5/4, x 2 = 3/2, x 3 = 7/4, x 4 = 2. And te corresponding y-values are y 0 =, 4

y = 4/5, y 2 = 2/3, y 3 = 4/7 and y 4 = /2. Tus, S 4 = ( + ) 2 2 + 4 (y + y 3 ) + 2 (y 2 ) = ( + ( 4 2 2 + 4 5 + 4 ) ( )) 2 + 2 7 3 0.6932539683. Note tat S 4 wit a smaller n is a better approximation to te actual value of te integral tan T 5. Example 4: Find S 4 for 0 x2 dx. Te exact answer is π/4, or approximately 0.785398635, onequarter of te area of a circle of radius. In Example 2 we found tat T 5 is equal to about 0.7592622072. If we are to use Simpson s rule for an approximation, ten n as to be even, so S 4 makes sense. Note tat = /4. Te five points of te partition are x 0 = 0, x = /4, x 2 = /2, x 3 = 3/4, x 4 =. And te corresponding y-values are y 0 =, y = /6, y 2 = /4, y 3 = 9/6 and y 4 = 0. Tus, S 4 = 2 ( + 0 + 4 (y + y 3 ) + 2 (y 2 )) = ( ( ) + 0 + 4 5/6 + 7/6 + 2 ) 3/4 2 or about 0.7708987887. Te latter is a better approximation wit a smaller n tan we got wit te Trapezoid rule. Error Comparisons: As we found to be true in te examples, Simpson s rule is indeed muc better tan te Trapezoid rule. As n it generally converges muc more rapidly to te value of te definite integral tan does te Trapezoid rule. We can get a sense of te differences in te rates of convergence of te two metods from te folowing two teorems: T: Suppose te second derivative of f is continuous and ence necessarily bounded by a positine number M 2 on [a, b]. If error Tn = b a f(x) dx T n, ten error Tn M 2(b a) 3 2n 2 T2: Suppose te fourt derivative of f is continuous and ence necessarily bounded by a positive number M 4 on [a, b]. If error Sn = b a f(x) dx S n, ten error Sn M 4(b a) 5 80n 4 Tese teorems imply tat in many situations, as n, error Tn 0 like /n 2 and error Sn 0 like /n 4. Tis explains wy in general we are not surprised to find tat Simpson s rule converges to te value of te integral muc faster tan te Trapezoid rule. Importance of te Trapezoid and Simpson Rules: You migt ask,wat is te point of te Trap and Simp approximations in tis age of computers? Te answer is tat tey are simple to use and give excellent results, surprisingly so even for small n. A little aritmetic can yield a good estimate of a definite integral wit only modest effort. Not bad, e? Applet: Numerical Integration Try it! Exercises: Problems Ceck wat you ave learned! Videos: Tutorial Solutions See problems worked out! 5