Numerical integration

Similar documents
QUADRATURE METHODS. July 19, Kenneth L. Judd. Hoover Institution

SUBSTITUTION I.. f(ax + b)

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Factoring Polynomials

Integration by Substitution

Lecture 3 Gaussian Probability Distribution

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Reasoning to Solve Equations and Inequalities

g(y(a), y(b)) = o, B a y(a)+b b y(b)=c, Boundary Value Problems Lecture Notes to Accompany

Graphs on Logarithmic and Semilogarithmic Paper

e.g. f(x) = x domain x 0 (cannot find the square root of negative values)

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

MATH 150 HOMEWORK 4 SOLUTIONS

Review guide for the final exam in Math 233

15.6. The mean value and the root-mean-square value of a function. Introduction. Prerequisites. Learning Outcomes. Learning Style

Applications to Physics and Engineering

SPECIAL PRODUCTS AND FACTORIZATION

AREA OF A SURFACE OF REVOLUTION

6.2 Volumes of Revolution: The Disk Method

CHAPTER 11 Numerical Differentiation and Integration

Vectors Recap of vectors

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

The Velocity Factor of an Insulated Two-Wire Transmission Line

Operations with Polynomials

The Riemann Integral. Chapter 1

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Integration. 148 Chapter 7 Integration

How To Understand The Theory Of Inequlities

Math 135 Circles and Completing the Square Examples

4.11 Inner Product Spaces

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

4 Approximations. 4.1 Background. D. Levy

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

Warm-up for Differential Calculus

Experiment 6: Friction

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

Review Problems for the Final of Math 121, Fall 2014

All pay auctions with certain and uncertain prizes a comment

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

EQUATIONS OF LINES AND PLANES

Distributions. (corresponding to the cumulative distribution function for the discrete case).

Numerical Methods of Approximating Definite Integrals

Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration

9 CONTINUOUS DISTRIBUTIONS

Lectures 8 and 9 1 Rectangular waveguides

The invention of line integrals is motivated by solving problems in fluid flow, forces, electricity and magnetism.

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

6.5 - Areas of Surfaces of Revolution and the Theorems of Pappus

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

CUBIC-FOOT VOLUME OF A LOG

Basic Analysis of Autarky and Free Trade Models

MODULE 3. 0, y = 0 for all y

Linear Equations in Two Variables

The Definite Integral

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Introduction to Integration Part 2: The Definite Integral

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

Real Analysis and Multivariable Calculus: Graduate Level Problems and Solutions. Igor Yanovsky

Physics 43 Homework Set 9 Chapter 40 Key

Section 7-4 Translation of Axes

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

Binary Representation of Numbers Autar Kaw

Exam 1 Study Guide. Differentiation and Anti-differentiation Rules from Calculus I

Derivatives and Rates of Change

Math 314, Homework Assignment Prove that two nonvertical lines are perpendicular if and only if the product of their slopes is 1.

19. The Fermat-Euler Prime Number Theorem

Euler Euler Everywhere Using the Euler-Lagrange Equation to Solve Calculus of Variation Problems

APPLICATION OF INTEGRALS

COMPONENTS: COMBINED LOADING

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply?

Harvard College. Math 21a: Multivariable Calculus Formula and Theorem Review

2 DIODE CLIPPING and CLAMPING CIRCUITS

6 Energy Methods And The Energy of Waves MATH 22C

LECTURE #05. Learning Objectives. How does atomic packing factor change with different atom types? How do you calculate the density of a material?

Or more simply put, when adding or subtracting quantities, their uncertainties add.

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

M5A42 APPLIED STOCHASTIC PROCESSES PROBLEM SHEET 1 SOLUTIONS Term

Section 5-4 Trigonometric Functions

Treatment Spring Late Summer Fall Mean = 1.33 Mean = 4.88 Mean = 3.

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

Decision Rule Extraction from Trained Neural Networks Using Rough Sets

3 The Utility Maximization Problem

PROBLEMS 13 - APPLICATIONS OF DERIVATIVES Page 1

Rotating DC Motors Part II

Homework 3 Solutions

Helicopter Theme and Variations

Econ 4721 Money and Banking Problem Set 2 Answer Key

UNIVERSITY OF OSLO FACULTY OF MATHEMATICS AND NATURAL SCIENCES

Basically, logarithmic transformations ask, a number, to what power equals another number?

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

Lecture 5. Inner Product

Karlstad University. Division for Engineering Science, Physics and Mathematics. Yury V. Shestopalov and Yury G. Smirnov. Integral Equations

The remaining two sides of the right triangle are called the legs of the right triangle.

Project 6 Aircraft static stability and control

Regular Sets and Expressions

COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE. Skandza, Stockholm ABSTRACT

Week 11 - Inductance

Transcription:

Chpter 4 Numericl integrtion Contents 4.1 Definite integrls.............................. 4. Closed Newton-Cotes formule..................... 4 4. Open Newton-Cotes formule...................... 8 4.4 Guss qudrture............................. 8 4.5 Composite methods............................ 8 4.1 Definite integrls The definite integrl of function f on the intervl [,b] is written s nd cn be defined s the limit of the Riemnn series i.e. s the re under the curve (x,y = f(x)). f(x)dx (4.1) (b )/h f(x)dx = lim hf(+(i 1)h), h 0 i=1 f(x) h b x Hence, numericl integrtion is often clled qudrture (i.e. computtion of n re under curve).

4 4. Closed Newton-Cotes formule The definite integrl of function exists even if there is no nlytic ntiderivtive function F(x) such tht d F(x) = f(x). dx 4. Closed Newton-Cotes formule The definite integrl (4.1) cn be pproximted using the polynomil interpolting f(x) through n equispced points (x k ), leding to f(x)dx 4..1 Trpezium rule n w k f(x k ) with x k = +(k 1) b n 1. This is the simplest numericl method for evluting definite integrl. It clcultes the re of the trpezium formed by pproximting f(x) using liner interpoltion. 000 111 0000 1111 00000 11111 000000 111111 0000000 1111111 f() P(x) f(b) f(x) b x f(x)dx b (f()+f(b)). (4.) Thus, the trpezium rule cn be obtined by integrting the liner interpoltion function (Check tht P(x) = f() x b b +f(b)x b f(x)dx P(x)dx leds to (4.).) over the intervl [,b]. Mesure of the error: From Eqution (.4), we know the error in the liner interpoltion, f(x) = P(x)+ 1 f (ξ(x))(x )(x b), ξ(x) [,b]. Therefore, 1 f(x)dx = P(x)dx+ f (ξ(x))(x )(x b)dx. So, the error in the trpezium rule is equl to E = 1 f (ξ(x))(x )(x b)dx. To evlute this integrl, we shll mke use of the following theorem (generlistion of the Men Vlue Theorem).

Chpter 4 Numericl integrtion 5 Theorem 4.1 (Weighted Men Vlue for Integrls) If h C[,b], if the integrl of g(x) exists on [,b], nd if g(x) does not chnge sign on [,b], then there exists c [,b] such tht Hence, 1 h(x)g(x)dx = h(c) f (ξ(x))(x )(x b)dx = f (c) since (x )(x b) 0 on the intervl [,b]. E = 1 f (c) 0 = 1 [ u f (c) u (b ) g(x)dx. (x )(x b)dx u(u (b ))du with u = x, ] b 0 = f (c) (b ). 1 Thus, the error in the trpezium method scles with the cube of the size on the intervl. (Note tht this method is exct for liner functions.) We cn generte other integrtion rules by using higher order Lgrnge polynomils. f(x)dx P(x)dx = = n f(x k )L k (x)dx n f(x k ) where w k = L k (x)dx re clled weights. f (n) (ξ(x)) n The error is given by (x x k )dx. n! L k (x)dx = n w k f(x k ), This method provides mens of finding the weights nd error terms. However, their evlution becomes more nd more complex with incresing n. (Theorem 4.1 cnnot be used to n evlute the error since (x x k ) chnges sign for n.) 4.. Method of undetermined coefficients Alterntive wy of evluting Newton-Cotes integrtion formule. To illustrte this method, let us derive the trpezium rule gin. Trpezium rule We wish to find n pproximtion of the form f(x)dx w 1 f()+w f(b). Since, we hve two unknown prmeters, w 1 nd w, we cn mke this formule exct for liner functions (i.e. functions re of the form αx + β). So, the error term must be of the form Kf (ξ) for some ξ (,b).

6 4. Closed Newton-Cotes formule Hence, we seek qudrture rule of the form f(x)dx = w 1 f()+w f(b)+kf (ξ), ξ (,b). Tofindw 1 ndw weneedtoensurethttheformulisexctforlllinerfunctions. However, using the principle of superposition, it is sufficient to mke this work for ny two independent liner polynomils (i.e. polynomils of degree one t most). E.g. choose the two independent polynomils f 1 nd f x. For f 1 : for f x : Solving these simultneous equtions gives dx = w 1 +w = b ; xdx = w 1 +bw = b. w 1 = w = b. To find the vlue of K, we cn use ny qudrtic function so tht f (ξ) is non-zero constnt, independent of the unknown ξ. E.g. tke f x, Hence, x dx = b = b ( +b ) +K (f = ), K = b b ( +b ), [ 1 ( = (b ) +b+b ) 1 ( +b )], [ = (b ) 1 ( b+b )] = (b ), 6 6 f(x)dx = b K = (b ). 1 in greement with 4..1 (but esier to derive). (f()+f(b)) (b ) f (ξ), ξ (,b), (4.) 1 Simpson s rule Three points integrtion rule derived using the method of undetermined coefficients. Suppose tht we dd qudrture point t the middle of the intervl [,b], To void lgebr, substitute x = +b ( ) +b f(x)dx w 1 f()+w f +w f(b). +u nd define h = b so tht the integrl becomes F(u)du w 1 F()+w F(0)+w F(h), with F(u) = f(x).

Chpter 4 Numericl integrtion 7 Since we hve three unknowns, we cn mke this formul exct for ll qudrtic functions; so, let us use, e.g., F 1, F u nd F u. F 1 F u F u w = h w 1 w = h h = 4 h. Hence we obtin the pproximtion which trnsltes into This is clled Simpson s rule. du = h = w 1 +w +w ; udu = 0 = w 1 +hw w 1 = w ; u du = h = h w 1 +h w w 1 = w = h ; F(u)du h F()+ 4h F(0)+ h F(h), f(x)dx b 6 [ f()+4f ( +b ) ] +f(b). As this formul is exct for ll qudrtic functions, we expect the error to be of the form KF (ξ). However, if we exmine F u, the integrl h [ () +4 0+h ] = 0 K 0. u du = 0 nd Simpson s rule gives Therefore Simpson s rule is exct for cubic functions s well. Consequently, we try n error term of the form KF (iv) (ξ), ξ (,h). To find the vlue of K use, e.g., F(u) x 4 (with F (iv) (ξ) = 4!, independent of ξ). u 4 du = h5 5 = h [ () 4 +h 4] [ 1 +4!K 4!K = h 5 5 1 ] = 4h5 15, K = h5 90. Simpson s rule is fifth-order ccurte: the error vries s the fifth power of the width of the intervl. Simpson s rule is given by f(x)dx = b 6 [ f()+4f ( +b ) +f(b) ] (b )5 880 f(iv) (ξ), ξ (,b). (4.4) Exmple 4.1 Mteril covered in clss. Plese, see your lecture notes. Closed Newton-Cotes formul of higher order cn be derived using more equispced intermedite points (n = : trpezium; n = : Simpson). As observed for Simpson s rule, the error for n odd is of order (b ) n+ rther thn (b ) n+1, due to symmetry.

8 4. Open Newton-Cotes formule 4. Open Newton-Cotes formule Closed Newton-Cotes formule such s (4.) nd (4.4) include the vlue of the function t the endpoints. By contrst, open Newton-Cotes formule re bsed on the interior points only. Midpoint rule. For exmple, consider the open Newton-Cotes formul ( ) +b f(x)dx w 1 f. Agin, we cn substitute u = x +b nd h = b ; F(u)du w 1 F(0). This formul must hold for constnt functions. So, tking, e.g. F 1 h = w 1. However, since for F(u) u, F(u)du = 0, the qudrture rule is exct for liner functions s well. So, we look for n error of the form KF (ξ), ξ (,h); F(u)du = hf(0)+kf (ξ), ξ (,h). Substitute F(u) = u, h = 0+K K = h. ( +b f(x)dx = (b )f )+ (b ) f (ξ), ξ (,b). (4.5) 4 Sme order s trpezium nd coefficient of the error smller (hlved). Exmple 4. Mteril covered in clss. Plese, see your lecture notes. 4.4 Guss qudrture There is no necessity to use equispced points. By choosing the qudrture points x k ppropritely we cn derive n-points methods of order n+1 (i.e. error vries s (b ) n+1 ), exct for polynomils of degree (n 1). These re clled Guss formule nd cn give stunning ccurcy. However, for n, the vlues of x k (roots of Legendre polynomils) nd the weights w k re non rtionl. 4.5 Composite methods Disdvntge of higher order methods: Since higher order methods re bsed on Lgrnge interpoltion, they lso suffer the sme weknesses. While very ccurte for functions with well-behved higher order derivtives, they becomes inccurte for functions with unbounded higher derivtives.

Chpter 4 Numericl integrtion 9 Therefore, it is often sfer to use low order methods, such s trpezium nd Simpson s rules. While these qudrture rules re not very ccurte on lrge intervls (error vrying s (b ) nd s (b ) 5 ), ccurte pproximtions cn be obtined by breking the intervl [,b] into n subintervls of equl width h. 4.5.1 Composite trpezium rule Split the intervl [,b] into n intervls of width h = b, i.e. consider n + 1 equispced n points x j = +jh, j = 0,...,n. The subintervl j is [x j,x j+1 ], j = 0,...,n 1. f(x) x 0 x 1 x x j h x j+1 x n b x n 1 f(x)dx = n 1 { } h f(x)dx = x j [f(x j)+f(x j+1 )] h 1 f (ξ j ) xj+1 ξ j (x j,x j+1 ), Error: since f(x)dx = h [f()+f(x 1)]+ h [f(x 1)+f(x )]+... + h [f(x n )+f(x n 1 )]+ h [f(x n 1)+f(b)] minf (ξ j ) K = 1 n 1 f (ξ j ) mxf (ξ j ), j n j h [ f (ξ 0 )+f (ξ 1 )+...+f (ξ n 1 ) ]. 1 nd f is continuous, there exits ξ (,b) with f (ξ) = K (nlogous to the intermedite vlue theorem). Hence, the totl error is of the form E = nh 1 f (ξ) = b 1 h f (ξ) since b = nh. We cn rewrite the composite trpezium rule s f(x)dx = h n 1 f()+ f(x j )+f(b) b 1 h f (ξ), ξ (,b). (4.6) j=1 Composite trpezium rule hs error of order h, compred to h for ech individul intervl.

0 4.5 Composite methods 4.5. Composite Simpson s rule Consider n/ intervls [x j,x j+ ], j = 0,...,n/ 1, of width h = b n/ qudrture points x j = +jh, j = 0,...,n. with equispced f(x) x 0 x 1 x x x 4 x j x j+1 x j+ h x n b x f(x)dx = = n/ 1 n/ 1 x j+ x j f(x)dx, { h [f(x j)+4f(x j+1 )+f(x j+ )] h5 90 f(iv) (ξ j ) } ξ j [x j,x j+ ], f(x)dx = h [f()+4f(x 1)+f(x )]+ h [f(x )+4f(x )+f(x 4 )]+... + h [f(x n )+4f(x n 1 )+f(b)] h5 [ ] f (iv) (ξ 0 )+f (iv) (ξ 1 )+...+f (iv) (ξ 90 n/ 1 ). As for the composite trpezium rule, there exists ξ (,b) such tht n/ 1 n f(iv) (ξ) = f (iv) (ξ j ). Using lso h = b, we cn rewrite the composite Simpson s rule s n f(x)dx = h f()+ n/ 1 j=1 n/ 1 f(x j )+4 So, the composite Simpson s rule is 4 th order ccurte. f(x j+1 )+f(b) b 180 h4 f (iv) (ξ), ξ (,b). (4.7)