Simpson s 1/3 Rule Simpson s 1/3 rule assumes 3 equispaced data/interpolation/integration points

Similar documents
LECTURE 14 NUMERICAL INTEGRATION. Find

The total error in numerical differentiation

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes).

Numerical Differentiation

8.3 Numerical Quadrature, Continued

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

Consider a function f we ll specify which assumptions we need to make about it in a minute. Let us reformulate the integral. 1 f(x) dx.

Math 102 TEST CHAPTERS 3 & 4 Solutions & Comments Fall 2006

MTH-112 Quiz 1 Name: # :

Chapter 1 Functions and Graphs. Section 1.5 = = = 4. Check Point Exercises The slope of the line y = 3x+ 1 is 3.

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

1. Consider the trigonometric function f(t) whose graph is shown below. Write down a possible formula for f(t).

COURSE Numerical integration of functions

lecture 26: Richardson extrapolation

DEFINITION OF A DERIVATIVE

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

3.4 Worksheet: Proof of the Chain Rule NAME

Fall 2014 MAT 375 Numerical Methods. Numerical Differentiation (Chapter 9)

Solutions Manual for Precalculus An Investigation of Functions

Order of Accuracy. ũ h u Ch p, (1)

1 Lecture 13: The derivative as a function.

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

Numerical Analysis MTH603. dy dt = = (0) , y n+1. We obtain yn. Therefore. and. Copyright Virtual University of Pakistan 1

Section 3.1: Derivatives of Polynomials and Exponential Functions

. Compute the following limits.

Polynomial Interpolation

Continuity. Example 1

Name: Answer Key No calculators. Show your work! 1. (21 points) All answers should either be,, a (finite) real number, or DNE ( does not exist ).

Numerical Integration

AMS 147 Computational Methods and Applications Lecture 09 Copyright by Hongyun Wang, UCSC. Exact value. Effect of round-off error.

5.1 introduction problem : Given a function f(x), find a polynomial approximation p n (x).

Click here to see an animation of the derivative

NUMERICAL DIFFERENTIATION

Chapter 4: Numerical Methods for Common Mathematical Problems

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Calculus I Practice Exam 1A

How to Find the Derivative of a Function: Calculus 1

Math 262 Exam 1 - Practice Problems. 1. Find the area between the given curves:

= 0 and states ''hence there is a stationary point'' All aspects of the proof dx must be correct (c)

Precalculus Test 2 Practice Questions Page 1. Note: You can expect other types of questions on the test than the ones presented here!

Combining functions: algebraic methods

Chapter 5: Numerical Integration and Differentiation

Week #15 - Word Problems & Differential Equations Section 8.2

Lecture 21. Numerical differentiation. f ( x+h) f ( x) h h

Numerical Methods. King Saud University

Polynomial Functions

The Derivative as a Function

Calculus I - Spring 2014

Polynomial Functions. Linear Functions. Precalculus: Linear and Quadratic Functions

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods

Higher Derivatives. Differentiable Functions

Test 2 Review. 1. Find the determinant of the matrix below using (a) cofactor expansion and (b) row reduction. A = 3 2 =

7.1 Using Antiderivatives to find Area

Exam 1 Review Solutions

2.3 Algebraic approach to limits

UNIVERSITY OF MANITOBA DEPARTMENT OF MATHEMATICS MATH 1510 Applied Calculus I FIRST TERM EXAMINATION - Version A October 12, :30 am

Polynomial Interpolation

Tangent Lines-1. Tangent Lines

Derivatives. if such a limit exists. In this case when such a limit exists, we say that the function f is differentiable.

4. The slope of the line 2x 7y = 8 is (a) 2/7 (b) 7/2 (c) 2 (d) 2/7 (e) None of these.

2.3 Product and Quotient Rules

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

1 1. Rationalize the denominator and fully simplify the radical expression 3 3. Solution: = 1 = 3 3 = 2

MVT and Rolle s Theorem

Math 151 Project 1 (60 points) Due Thursday 20 th September

Section 15.6 Directional Derivatives and the Gradient Vector

Practice Problem Solutions: Exam 1

Lab 6 Derivatives and Mutant Bacteria

The algebra of functions Section 2.2

Continuity and Differentiability Worksheet

MAT 145. Type of Calculator Used TI-89 Titanium 100 points Score 100 possible points

Root Finding (and Optimisation)

LIMITS AND DERIVATIVES CONDITIONS FOR THE EXISTENCE OF A LIMIT

Name: Sept 21, 2017 Page 1 of 1

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

CHAPTER (A) When x = 2, y = 6, so f( 2) = 6. (B) When y = 4, x can equal 6, 2, or 4.

du(l) 5 dl = U(0) = 1 and 1.) Substitute for U an unspecified trial function into governing equation, i.e. dx + = =

Some Review Problems for First Midterm Mathematics 1300, Calculus 1

Mathematics 5 Worksheet 11 Geometry, Tangency, and the Derivative

Exam 2. Average: 85.6 Median: 87.0 Maximum: Minimum: 55.0 Standard Deviation: Numerical Methods Fall 2011 Lecture 20

5.1 We will begin this section with the definition of a rational expression. We

1. State whether the function is an exponential growth or exponential decay, and describe its end behaviour using limits.

Recall from our discussion of continuity in lecture a function is continuous at a point x = a if and only if

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

The Verlet Algorithm for Molecular Dynamics Simulations

MAT 1339-S14 Class 2

5 Ordinary Differential Equations: Finite Difference Methods for Boundary Problems

Chapter 2 Limits and Continuity

1 Solutions to the in class part

Numerical di erentiation. Quentin Louveaux (ULg - Institut Montefiore) Numerical analysis / 12

MATH 155A FALL 13 PRACTICE MIDTERM 1 SOLUTIONS. needs to be non-zero, thus x 1. Also 1 +

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

Numerical Integra/on

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

Time (hours) Morphine sulfate (mg)

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.

f a h f a h h lim lim

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

A = h w (1) Error Analysis Physics 141

Transcription:

CE 05 - Lecture 5 LECTURE 5 UMERICAL ITEGRATIO COTIUED Simpson s / Rule Simpson s / rule assumes equispaced data/interpolation/integration points Te integration rule is based on approximating fx using Lagrange quadratic (second degree) interpolation. Te sub-interval is defined as [x o,x ] and te integration point to integration point x spacing equals x o --------------- 79 f 0 f(x) f g(x) f x 0 x x x 0 0 x x coordinate sift p. 5.

CE 05 - Lecture 5 Lagrange quadratic interpolation over te sub-interval: gx f o V o x + f V x + f V x were V o x x x x x ----------------------------------------- x o x x o x V o x x x + ----------------------------------- V x x x o x x ----------------------------------------- x x o x x V x 4x x ----------------------- V x x x o x x ----------------------------------------- x x o x x V x x x ---------------- p. 5.

CE 05 - Lecture 5 Integration rule is obtained by integrating gx I x x fx I gxdx + E x o x o x x I f ----------------------------------- x + o f 4x ----------------------- x f x + + ---------------- x d x + E x o 0 I x -------- f x o ---- ----------- + x f 4x x ----------- ------- x + + f ---- ---- x 0 + E I -------- f o 8---- ----------- + 4 0 f 8 6 ----- 8 + + f -------- -------- 4 + E Simpson s / Rule I -- f o + 4f + f + E p. 5.

CE 05 - Lecture 5 Evaluation of te Error for Simpson s / Rule Error is defined as: E I -- f o + 4f + f E 0 fxdx -- f o + 4f + f We develop Taylor series expansions for fx, f o, f and f about x fx f x f -- x f -- x 6 f + + + + ----- x 4 4 f 4 + Ox 5 f o f f f f + -- f ---- 6 f + 4 ----- 4 f4 + O 5 f f f -- f ---- 6 f + + + + 4 ----- 4 f4 + O 5 p. 5.4

CE 05 - Lecture 5 Substituting into te expression for E E f x f -- x f -- x 6 f + + + + ----- x 4 4 f 4 + Ox 5 dx 0 -- f f + -- f ---- 6 f + ----- 4 4 f 4 + O 5 + 4f + f + f + -- f ---- 6 f + + 4 ----- 4 f4 + O 5 E f -- f -- + f 6 + + + ----- 4 4 f 4 + -------- 5 + 5 f 0 4 + O 6 -- 6f f + + ----- 4f4 + O 5 p. 5.5

CE 05 - Lecture 5 E f -- 6 ---- f 5 + + ----- ----- 5 f 4 + 60 6 O 6 Error for Simpson s / Rule E 90 ----- 5 f 4 Tis is te error for integration over one sub-interval of widt! Fift order accurate. Simpson s / Rule is exact for any cubic polynomial function We note tat E can also be derived by Estimating te error for Lagrange quadratic interpolation, series form ex fx gx, in Integrating e(x) over te integration interval x o x E x x o 0 exdx p. 5.6

CE 05 - Lecture 5 Extended Simpson s / Rule Simply add up integrated values obtained using Simpson s / rule over eac subinterval. 80 f(x) f 0 f f f f 4 f f(x) x a b subint. subint. Sub-interval size umber of sub-intervals --- Sub-interval widt is wile te integration point to integration point spacing is b a equal to ----------- p. 5.7

CE 05 - Lecture 5 Again we integrate over points (te same as extended trapezoidal rule). Terefore I b a fxdx I -- f o + 4f + f + f + 4f + f 4 + f 4 + 4f 5 + f 6 + + f 4 + 4f + f + f + 4f + f + E a b I -- f + o 4f + f + 4f + f + 4 4f + 5 + f + 4f + f E + ab In general we can write I -- fa + fb + 4 fa + i + fa + i + E ab i i p. 5.8

CE 05 - Lecture 5 ote tat te total number of integration points + must be odd and terefore must be even! Te error term is also summed over te sub-intervals and eac sub-interval term is evaluated at te mid node of te sub-interval. --- - 5 E ab i i ----- f 4 90 E a b - 5 --- ----- 90 --- --- f 4 i i E a b - 5 ----- 90 --- f 4 were f 4 average of te 4t derivative over eac sub-interval in te interval a b. p. 5.9

CE 05 - Lecture 5 However we wis dependence on error to be expressed in terms of, not in terms of te number of integration points. oting tat for te interval a b b a ----------- b a ----------- Terefore E ab - ----- 5 b a ----------- 90 -- f 4 E ab - 4 -------- b af 80 4 Overall te error is 4t order p. 5.0

CE 05 - Lecture 5 ewton Cotes Closed Formulae Derived by integrating Lagrange approximating polynomials (or equivalently ewton Interpolating formulae) using equispaced integration points (interpolating points, nodes, etc.) over te sub-interval defined by te interpolating data points 8 f 0 g(x) f f f x s x 0 x x x E x Te general form of ewton-cotes closed formulae: x E fx dx w o f o + w f + w f + + w f + E x S were f i x x o fx i x i x S + i ---------------- p. 5.

CE 05 - Lecture 5 Closed formulae: Te sub-interval is closed by te first and last integration points. w i, i 0 E ote Trapezoidal Rule -- ----- f 4 -- ----- 90 5 f 4 -- ----- 8 80 5 f 4 Simpson s -- Rule Simpson s -- Rule 8 4 7 7 ----- 45 8 -------- 945 7 f 6 0 5 6067 0600-4855 - 0.004 Round off error tends to ----------------- f 9976 7400-60550 4768 become a serious -60550 7400-4855 problem! 0600 6067 p. 5.

CE 05 - Lecture 5 otes All tese formulae integrate over one sub-interval only. Tey can be extended over ab simply by summing up integrals over eac sub-interval. In addition te error is summed resulting in one less order of accuracy tan te error over te individual sub-interval! Accuracy for Simpson s -- rule is very similar to accuracy of Simpson s -- rule. 8 In general eac formula will be exact for polynomials of one degree less tan te order of te derivatives in te error terms. gx E Exact for linear linear f quadratic cubic f 4 cubic cubic f 4 4 quartic quintic f 6 p. 5.

CE 05 - Lecture 5 It appears tat for even, te integration is exact for polynomials one degree greater tan te interpolation function. For Simpson s / Rule: 8 It turns out tat if fx is a cubic and gx is quadratic, E xo x E x x E[x 0,x ] f(x) f 0 f E[x,x ] f g(x) x 0 x x Te errors cancel over te interval due to te location of point! We can actually improve te accuracy of integration formulae by locating integration points in special locations! We do not experience any improvement in accuracy for odd. x p. 5.4

CE 05 - Lecture 5 ewton-cotes Open Formulae Derived by integrating Lagrange approximating formulae (or equivalently ewton Interpolating formulae) using equispaced data points/nodes/integration points over te sub-interval defined by te interpolating data points and extended to te left and rigt by. 8 f 0 f f g(x) f(x) f x s x 0 x x x x E x region of extrapolation region of extrapolation ote tat x S x o x E x + and x x o ---------------- p. 5.5

CE 05 - Lecture 5 ote tat gx does not generally pass troug fx S or troug fx E ewton Cotes open formula: x E fx dx w 0 f 0 + w f + + w f + E x S w i i 0 E / 4/ - 5/4 Error compared to closed interval Interval size compared to closed interval -- 4 f 8 ----- 90 5 f 4 8 95 -------- 44 5 f 4 8.7 p. 5.6

CE 05 - Lecture 5 otes Eac formula and error is for one sub-interval wit + data/node/integration points. We can extend te interval to ab by summing integrals and errors (error increases by one order). Sub-interval errors are greater tan closed formulae since sub-interval is larger te error in te interpolation functions tended to be greater near te ends and especially outside of te interpolating region! Higer order formulae involve large coefficients wit +/- signs. Tis leads to roundoff problems. Open formulae can be used wen functional values are not available at te integrating limits. p. 5.7