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

Size: px
Start display at page:

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

Transcription

1 COURSE 7 3. Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method The presence of derivatives in the remainder difficulties in applicability to practical problems and to computer programs. There are preferred, in this sense, the iterative quadratures. Consider the iterative generation method of a repeated formula by the Romberg s method. In the case of the trapezium formula we have Q T0 (f) = h [f(a) + f(b)], h = b a, Q T0 (f) being the first element of the sequence.

2 We divide the interval [a, b] in two equal parts, of length h and applying to each subinterval [a, a + h ] and [a + h, b] the trapezium formula we get Q T1 (f) = h [ ( f(a) + f a + h ) ] + f(b) 4 or Q T1 (f) = 1 Q T 0 (f) + hf ( a + h ). Dividing now each previous divisions [a, a+b ] and [a+b, b] in two equal parts, we obtain a division of the initial interval in 4 = equal parts, each of length 4 h. Applying the repeated trapezium formula, we get Q T (f) = h 8 f(a) + 3 i=1 = 1 Q T 1 (f) + h [f Continuing in an analogous manner, we get Q Tk (f) = 1 Q T k 1 (f) + h k 1 k f j=1 ( a + ih ) + f(b) (1) 4 (a + 1 ) h + f (a + 3 )] h. f ( a + j 1 ) k h, k = 1,,... ()

3 We obtain the sequence Q T0 (f), Q T1 (f),..., Q Tk (f),... (3) which converges to the value I = a f(x)dx. We approximate the error by Q Tn (f) Q Tn 1 (f). If we want to approximate I with error less than ε, we compute successively the elements of (3) until the first index for which Q Tn (f) being the required value. Q Tn (f) Q Tn 1 (f) ε, Similarly, one may iteratively generate the repeated Simpson s formula. Denoting by Q Sk (f) the Simpson s formula repeated k times, we have Q Sk (f) = 1 3 [ 4QTk+1 (f) Q T k (f) ], k = 0, 1,... where Q S0 (f) = h 6 [ f(a) + 4f ( a + h ) ] + f(b)

4 is the Simpson s quadrature formula Adaptive quadrature methods The repeated integration methods require equidistant nodes. There are problems where the function contains both regions with large variations and with small variations. It is needed a smaller step for the regions with large variations than for the regions with small variations in order that the error to be uniformly distributed. Such methods, which adapt the size of the step in accordance with the need, are called adaptive quadrature methods. We present the method based on the repeated Simpson s quadrature formula. Suppose we want to approximate with precision ε the integral I = a f (x) dx.

5 First step: we apply the Simpson s formula for x 0 = a, x 1 = a+ h, x = b, with h = b a. a f (x) dx = b a 6 ( f(a) + 4f(a + h ) + f(b) ) (b a)5 880 f (4) (ξ) = := S (a, b) h5 90 f (4) (ξ) It may be proved that the error of approximating I by S ( a, a + h ) + S ( a + h, b), h = b a, is 15 times smaller than the expression S (a, b) S ( a, a + h ) S ( a + h, b ). Hence, if (4) S (a, b) S ( a, a + h ) S ( a + h, b ) < 15ε, then (5) a f (x) dx S ( a, a + h ) S ( a + h, b ) < ε. When (5) does not hold, the procedure is applied individually on [a, (a+ b)/] and [(a + b)/, b] in order to determine if the approx. of the integral on each two subintervals is performed with error ε/. If yes,

6 the sum of these two approx. offer an approx. of I with precision ε. If on a subinterval it is not obtained the error ε/, then we divide that subinterval and we analyze if the approx. on the resulted two subintervals has precision ε/4, and so on. This procedure of halfing is continued until the corresponding error is attained on each subinterval.

7 Algorithm: (the idea: divide and conquer ) function I=adquad(a,b,er) I1=Simpson(a,b) I=Simpson(a, a+b )+Simpson(a+b,b) if I1-I <15*er I=I return else end I=adquad(a, a+b,er )+adquad(a+b,b,er ) Remark 1 For example, for evaluating the integral x sin 10 x dx with ε = 10 4, repeated Simpson formula requires 177 function evaluations, nearly twice as many as adaptive quadrature.

8 3.5. General quadrature formulas Using the interpolation formulas, there are obtained a large variety of quadrature formulas. In the case of some concrete applications, the choosing of the quadrature formula is made according to the information about the function f. A general quadrature formula is given by: a f(x)dx = m k=0 j I k A kj f (j) (x k ) + R(f), For example, if we know only the values of f (a) and f(b),

9 using the Birkhoff interpolation formula f(x) = (x b)f (a) + f(b) + (R 1 f)(x) we obtain the quadrature formula with a f(x)dx = A 0f (a) + A 1 f(b) + R 1 (f), A 0 = A 01 = A 1 = A 10 = a a b) (x b)dx = (a dx = b a.

10 3.6. Quadrature formulas of Gauss type All the previous rules can be written in the form a f(x)dx = m k=1 A k f(x k ) + R m (f), (6) where the coefficients A k, k = 1,..., m, do not depend on the function f. We have picked the nodes x k, k = 1,..., m equispaced and have then calculated the coefficients A k, k = 1,..., m. This guarantees that the rule is exact for polynomials of degree m. It is possible to make such a rule exact for polynomials of degree m 1, by choosing also the nodes appropriately. This is the basic idea of the gaussian rules. Let f : [a, b] R be an integrable function and w : [a, b] R + a weight function, integrable on [a, b].

11 Definition A formula of the following form a w(x)f(x)dx = m k=1 A k f(x k ) + R m (f) (7) is called a quadrature formula of Gauss type or with maximum degree of exactness if the coefficients A k and the nodes x k, k = 1,..., m are determined such that the formula has the maximum degree of exactness. Remark 3 The coefficients and the nodes are determined such that to minimize the error, to produce exact result for the largest class of polynomials. A k and x k, k = 1,..., m from (7) are m unknown parameters m equations obtained such that the formula (7) is exact for any polynomial degree at most m 1. It is often possible to rewrite the integral a g(x)dx as a w(x)f(x)dx, where w(x) is a nonnegative integrable function, and f(x) = g(x) w(x) is smooth, or it is possible to consider the simple choice w(x) = 1.

12 For the general case, consider e k (x) = x k ; k = 0,..., m 1 and obtain the system s.t. R m (e k ) = 0 : with m k=1 m k=1.. ṁ k=1 A k e 0 (x k ) = a w(x)e 0 (x) dx A k e 1 (x k ) = a w(x)e 1 (x) dx A k e m 1 (x k ) = a w(x)e m 1 (x) dx A 1 + A A m = µ 0 A 1 x 1 + A x A m x m = µ 1... A 1 x m A x m A m x m 1 m = µ m 1 µ k = a w(x)xk dx. As, the system (8) is difficult to solve, there have been found other ways to find the unknown parameters. (8)

13 If w(x) = 1 (this case was studied by Gauss), then the nodes are the roots of Legendre orthogonal polynomial u(x) = m! (m)! [(x a)m (x b) m ] (m) and for finding the coefficients we use the first m equations from the system (8). For example, for m =, the interval [ 1, 1] and w(x) = 1, we get the system A 1 + A = 1 1 dx = A 1 x 1 + A x = 1 1 xdx = 0 A 1 x 1 + A x = 1 1 x dx = 3 A 1 x A x 3 = 1 1 x 3 dx = 0 with solution A 1 = A = 1 and x 1 = 3 3, x = fomula 1 1 f(x)dx f( 3 3 ) + f( 3 3 ). (9) 3 3, which gives the

14 This formula has degree of precision 3, i.e., it gives exact result for every polynomial of the 3 rd degree or less. Remark 4 The resulting rules look more complicated than the interpolatory rules. Both nodes and weights for gaussian rules are, in general, irrational numbers. But, on a computer, it usually makes no difference whether one evaluates a function at x = 3 or at x = 1/ 3. Once the nodes and weights of such a rule are stored, these rules are as easily used as the trapezium rule or Simpson s rule. At the same time, these gaussian rules are usually much more accurate when compared with the last ones on the basis of number of function values used. Example 5 Consider m = 1 and obtain the following Gauss type quadrature formula a f(x)dx = A 1f(x 1 ) + R 1 (f).

15 The system (8) becomes A 1 = a dx = b a A 1 x 1 = a xdx = b a. The unique solution of this system is A 1 = b a, x 1 = a+b. The same result is obtained considering x 1 the root of the Legendre polynomial of the first degree, u(x) = 1 [(x a)(x b)] = x a + b.

16 The Gauss type quadrature formula with one node is ( ) a + b f(x)dx = (b a)f + R 1 (f), a with (b a)3 R 1 (f) = f (ξ), ξ [a, b] 4 which is called the rectangle quadrature rule (also called the midpoint rule). The repeated rectangle (midpoint) quadrature formula is a f(x)dx = b a n R n (f) = n i=1 f(x i ) + R n (f), (b a)3 4n f (ξ), ξ [a, b] with x 1 = a + b a n, x i = x 1 + (i 1) b a n, i =,..., n.

17 We have R n (f) (b a)3 4n M f, with M f = max x [a,b] f (x). Remark 6 There is another rectangle rule: f(x)dx = (b a)f (a) + R(f), with a R(f) = (b a) f (ξ), ξ [a, b].

18 Romberg s algorithm for the rectangle (midpoint) quadrature formula. Applying successively the rectangle formula on [a, b], we get Q D0 (f) = (b a)f(x 1 ), x 1 = a + b Q D1 (f) = 1 3 Q D 0 (f) + b a 3 [f(x ) + f (x 3 )], x = a + b a 6, x 3 = b b a 6. Continuing in an analogous manner, we obtain the sequence Q D0 (f), Q D1 (f),..., Q Dk (f),... (10) which converges to the value I of the integral a f(x)dx. If we want to approximate the integral I with error less than ε, we compute successively the elements of (10) until the first index for which Q Dm (f) being the required value. Q Dm (f) Q Dm 1 (f) ε,

19 The algorithm for generating the elements of the sequence (10) is: I. Let h := b a,h 1 := h,x 1 : a + h 1 and Q D0 (f) := hf(x 1 ). II. For k := 1,,... do h := h 3,h 1 := h 1 3,h := 4h 1,h 3 := h 1, m := 3 k 1,x 1 := a + h 1 ; for i = 1,..., m 1,do x i := x i 1 + h, x i+1 := x i + h 3 ; x m := x m 1 + h and Q Dk (f) = 1 3 Q D k 1 (f) + h m i=1 f(x i ), (for k = 1(m = 1)the generation of x i,x i+1 is missing). Example 7 Approximate ln, with ε = 10, using the repeated rectangle (midpoint) method.

20 Solution. We have f(x)dx = b a a n so f(x) = 1 x ln = b a n and we get R n (f) = f(a + b a n ) + n i=1 f(x i ) + R n (f), (b a)3 4n f (ξ), ξ [a, b]. ln = n i= 1 dx x, f(a + b a n We have f(x) = 1 x, f (x) = 1 x, f (x) = ξ [1, ] so it follows a + (i 1)b n ) + (b a)3 4n f (ξ) x 3, and f (ξ), for R n (f) 1 4n < 10 1n > 100 n = 3.

21 Therefore, ln = 1 3 ( ) = (real value is ) Example 8 For m =, the Gauss type quadrature formula is a f(x)dx = A 1f(x 1 ) + A f(x ) + R (f). The corresponding Legendre polynomial is u(x) = 4! [ (x a) (x b) ] = x (a + b)x (a + b + 4ab),

22 with the roots x 1 = a + b x = a + b (b a) 3, 6 (b a) For finding A 1 and A we use the first two equations: { A1 + A = b a A 1 x 1 + A x = (b a )/. We get A 1 = A = (b a)/, so the Gauss type quadrature formula with two nodes is f(x)dx = b a [ ( a + b f a b a ) ( a + b 3 + f 6 + b a )] 3 +R (f). 6 Remark 9 a) The coefficients A k, k = 1,..., m of a Gauss type formula are positive.

23 b) The coefficients A k, k = 1,..., m and the roots of the Legendre polynomials can be found in tables, for a = 1, b = 1. For example, for m = and m = 3 : m nodes coefficients c) For different weight functions, tables are available for both the nodes and the coefficients. Example 10 Approximate 1 1 e x cos xdx using a Gauss type quadrature formula for m = 3. Sol. 1 1 ex cos xdx 0.55e 0.77 cos cos e 0.77 cos( 0.77) =

24 (Exact value is ) Absolute error is < The integral a f(x)dx for an arbitrary interval [a, b] could be transfomed in an integral on [ 1, 1] using the change of variable t = x a b x = 1 [(b a)t + a + b]. b a The Gauss type quadrature formulas may be applied on the following way: ( ) 1 (b a)t + (b + a) (b a) f(x)dx = f dt. (11) a 1 Example 11 Consider the integral 3 1 (x 6 x sin(x))dx = a) Compare the result obtained for Newton-Cotes type formula with m = 1 and the gaussian formula for m = ; b) Compare the result obtained for Newton-Cotes type formula with m = and the gaussian formula for m = 3.

25 Sol. a) Each formula needs evaluations of the function f(x) = x 6 x sin(x). We have Trapezium formula (m = 1) : [f(1) + f(3)] = ; and a Gauss type formula for m =, using (11): (x6 x sin(x))dx = ((t + 1 )6 (t + ) sin((t + )))dt f( ) + f( ) = b) Each formula needs 3 evaluations of the function. We have Simpson s F. (m = ) : 1 3 [f(1) + 4f() + f(3)] = 333.3; and a Gauss type formula for m = 3, using (11): (x6 x sin(x))dx = ((t + 1 )6 (t + ) sin((t + )))dt 0.55f( ) f() f( ) =

COURSE Numerical integration of functions

COURSE Numerical integration of functions COURSE 6 3. Numerical integration of functions The need: for evaluating definite integrals of functions that has no explicit antiderivatives or whose antiderivatives are not easy to obtain. Let f : [a,

More information

MA2501 Numerical Methods Spring 2015

MA2501 Numerical Methods Spring 2015 Norwegian University of Science and Technology Department of Mathematics MA5 Numerical Methods Spring 5 Solutions to exercise set 9 Find approximate values of the following integrals using the adaptive

More information

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

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes). CE 025 - Lecture 6 LECTURE 6 GAUSS QUADRATURE In general for ewton-cotes (equispaced interpolation points/ data points/ integration points/ nodes). x E x S fx dx hw' o f o + w' f + + w' f + E 84 f 0 f

More information

(x x 0 )(x x 1 )... (x x n ) (x x 0 ) + y 0.

(x x 0 )(x x 1 )... (x x n ) (x x 0 ) + y 0. > 5. Numerical Integration Review of Interpolation Find p n (x) with p n (x j ) = y j, j = 0, 1,,..., n. Solution: p n (x) = y 0 l 0 (x) + y 1 l 1 (x) +... + y n l n (x), l k (x) = n j=1,j k Theorem Let

More information

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

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

More information

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

Section 6.6 Gaussian Quadrature

Section 6.6 Gaussian Quadrature Section 6.6 Gaussian Quadrature Key Terms: Method of undetermined coefficients Nonlinear systems Gaussian quadrature Error Legendre polynomials Inner product Adapted from http://pathfinder.scar.utoronto.ca/~dyer/csca57/book_p/node44.html

More information

12.0 Properties of orthogonal polynomials

12.0 Properties of orthogonal polynomials 12.0 Properties of orthogonal polynomials In this section we study orthogonal polynomials to use them for the construction of quadrature formulas investigate projections on polynomial spaces and their

More information

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form Qualifying exam for numerical analysis (Spring 2017) Show your work for full credit. If you are unable to solve some part, attempt the subsequent parts. 1. Consider the following finite difference: f (0)

More information

Romberg Integration and Gaussian Quadrature

Romberg Integration and Gaussian Quadrature Romberg Integration and Gaussian Quadrature P. Sam Johnson October 17, 014 P. Sam Johnson (NITK) Romberg Integration and Gaussian Quadrature October 17, 014 1 / 19 Overview We discuss two methods for integration.

More information

NUMERICAL ANALYSIS PROBLEMS

NUMERICAL ANALYSIS PROBLEMS NUMERICAL ANALYSIS PROBLEMS JAMES KEESLING The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.. Solving Equations Problem.

More information

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

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx, Panel integration Week 12: Monday, Apr 16 Suppose we want to compute the integral b a f(x) dx In estimating a derivative, it makes sense to use a locally accurate approximation to the function around the

More information

Numerical Methods I: Numerical Integration/Quadrature

Numerical Methods I: Numerical Integration/Quadrature 1/20 Numerical Methods I: Numerical Integration/Quadrature Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 30, 2017 umerical integration 2/20 We want to approximate the definite integral

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

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

Integration, differentiation, and root finding. Phys 420/580 Lecture 7 Integration, differentiation, and root finding Phys 420/580 Lecture 7 Numerical integration Compute an approximation to the definite integral I = b Find area under the curve in the interval Trapezoid Rule:

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

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

Simpson s 1/3 Rule Simpson s 1/3 rule assumes 3 equispaced data/interpolation/integration points 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

More information

OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph.

OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph. 4.1 The Area under a Graph OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph. 4.1 The Area Under a Graph Riemann Sums (continued): In the following

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation Outline Numerical Integration Numerical Differentiation Numerical Integration Numerical Differentiation 3 Michael T. Heath Scientific Computing / 6 Main Ideas Quadrature based on polynomial interpolation:

More information

LECTURE 14 NUMERICAL INTEGRATION. Find

LECTURE 14 NUMERICAL INTEGRATION. Find LECTURE 14 NUMERCAL NTEGRATON Find b a fxdx or b a vx ux fx ydy dx Often integration is required. However te form of fx may be suc tat analytical integration would be very difficult or impossible. Use

More information

Numerical Integration

Numerical Integration Numerical Integration Sanzheng Qiao Department of Computing and Software McMaster University February, 2014 Outline 1 Introduction 2 Rectangle Rule 3 Trapezoid Rule 4 Error Estimates 5 Simpson s Rule 6

More information

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

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration. Unit IV Numerical Integration and Differentiation Numerical integration and differentiation quadrature classical formulas for equally spaced nodes improper integrals Gaussian quadrature and orthogonal

More information

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1. The Bisection method or BOLZANO s method or Interval halving method: Find the positive root of x 3 x = 1 correct to four decimal places by bisection method Let f x = x 3 x 1 Here f 0 = 1 = ve, f 1 = ve,

More information

Chapter 5: Numerical Integration and Differentiation

Chapter 5: Numerical Integration and Differentiation Chapter 5: Numerical Integration and Differentiation PART I: Numerical Integration Newton-Cotes Integration Formulas The idea of Newton-Cotes formulas is to replace a complicated function or tabulated

More information

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

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.

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. NUMERICAL METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018 Numerical Analysis Preliminary Exam 0.00am.00pm, January 9, 208 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

More information

8.3 Numerical Quadrature, Continued

8.3 Numerical Quadrature, Continued 8.3 Numerical Quadrature, Continued Ulrich Hoensch Friday, October 31, 008 Newton-Cotes Quadrature General Idea: to approximate the integral I (f ) of a function f : [a, b] R, use equally spaced nodes

More information

3. Numerical Quadrature. Where analytical abilities end...

3. Numerical Quadrature. Where analytical abilities end... 3. Numerical Quadrature Where analytical abilities end... Numerisches Programmieren, Hans-Joachim Bungartz page 1 of 32 3.1. Preliminary Remarks The Integration Problem Numerical quadrature denotes numerical

More information

Physics 115/242 Romberg Integration

Physics 115/242 Romberg Integration Physics 5/242 Romberg Integration Peter Young In this handout we will see how, starting from the trapezium rule, we can obtain much more accurate values for the integral by repeatedly eliminating the leading

More information

Engg. Math. II (Unit-IV) Numerical Analysis

Engg. Math. II (Unit-IV) Numerical Analysis Dr. Satish Shukla of 33 Engg. Math. II (Unit-IV) Numerical Analysis Syllabus. Interpolation and Curve Fitting: Introduction to Interpolation; Calculus of Finite Differences; Finite Difference and Divided

More information

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45 Two hours MATH20602 To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER NUMERICAL ANALYSIS 1 29 May 2015 9:45 11:45 Answer THREE of the FOUR questions. If more

More information

Numerical Integra/on

Numerical Integra/on Numerical Integra/on Applica/ons The Trapezoidal Rule is a technique to approximate the definite integral where For 1 st order: f(a) f(b) a b Error Es/mate of Trapezoidal Rule Truncation error: From Newton-Gregory

More information

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests. NUMERICAL ANALYSIS PRACTICE PROBLEMS JAMES KEESLING The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.. Solving Equations

More information

Scientific Computing: Numerical Integration

Scientific Computing: Numerical Integration Scientific Computing: Numerical Integration Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Fall 2015 Nov 5th, 2015 A. Donev (Courant Institute) Lecture

More information

Numerical methods. Examples with solution

Numerical methods. Examples with solution Numerical methods Examples with solution CONTENTS Contents. Nonlinear Equations 3 The bisection method............................ 4 Newton s method.............................. 8. Linear Systems LU-factorization..............................

More information

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V Numerical integration - I M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V deterministic methods in 1D equispaced points (trapezoidal, Simpson...), others...

More information

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

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error In this method we assume initial value of x, and substitute in the equation. Then modify x and continue till we

More information

Mathematics Notes for Class 12 chapter 7. Integrals

Mathematics Notes for Class 12 chapter 7. Integrals 1 P a g e Mathematics Notes for Class 12 chapter 7. Integrals Let f(x) be a function. Then, the collection of all its primitives is called the indefinite integral of f(x) and is denoted by f(x)dx. Integration

More information

Announcements. Topics: Homework:

Announcements. Topics: Homework: Announcements Topics: - sections 7.1 (differential equations), 7.2 (antiderivatives), and 7.3 (the definite integral +area) * Read these sections and study solved examples in your textbook! Homework: -

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

More information

Differentiation and Integration

Differentiation and Integration Differentiation and Integration (Lectures on Numerical Analysis for Economists II) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 February 12, 2018 1 University of Pennsylvania 2 Boston College Motivation

More information

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

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

Resources: http://www.calcchat.com/book/calculus-9e/ http://apcentral.collegeboard.com/apc/public/courses/teachers_corner/27.html http://www.calculus.org/ http://cow.math.temple.edu/ http://www.mathsisfun.com/calculus/

More information

Examination paper for TMA4125 Matematikk 4N

Examination paper for TMA4125 Matematikk 4N Department of Mathematical Sciences Examination paper for TMA45 Matematikk 4N Academic contact during examination: Anne Kværnø a, Louis-Philippe Thibault b Phone: a 9 66 38 4, b 9 3 0 95 Examination date:

More information

f(x) g(x) = [f (x)g(x) dx + f(x)g (x)dx

f(x) g(x) = [f (x)g(x) dx + f(x)g (x)dx Chapter 7 is concerned with all the integrals that can t be evaluated with simple antidifferentiation. Chart of Integrals on Page 463 7.1 Integration by Parts Like with the Chain Rule substitutions with

More information

Math 473: Practice Problems for Test 1, Fall 2011, SOLUTIONS

Math 473: Practice Problems for Test 1, Fall 2011, SOLUTIONS Math 473: Practice Problems for Test 1, Fall 011, SOLUTIONS Show your work: 1. (a) Compute the Taylor polynomials P n (x) for f(x) = sin x and x 0 = 0. Solution: Compute f(x) = sin x, f (x) = cos x, f

More information

A = (a + 1) 2 = a 2 + 2a + 1

A = (a + 1) 2 = a 2 + 2a + 1 A = (a + 1) 2 = a 2 + 2a + 1 1 A = ( (a + b) + 1 ) 2 = (a + b) 2 + 2(a + b) + 1 = a 2 + 2ab + b 2 + 2a + 2b + 1 A = ( (a + b) + 1 ) 2 = (a + b) 2 + 2(a + b) + 1 = a 2 + 2ab + b 2 + 2a + 2b + 1 3 A = (

More information

Notes on floating point number, numerical computations and pitfalls

Notes on floating point number, numerical computations and pitfalls Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1

More information

Simpson s Rule. f(x)dx = h 3 [f(x 0) + 4f(x 1 ) + f(x 2 )] h2 90 f (4) (ɛ)

Simpson s Rule. f(x)dx = h 3 [f(x 0) + 4f(x 1 ) + f(x 2 )] h2 90 f (4) (ɛ) Simpson s Rule Simpson s rule is another closed Newton-Cotes formula for approximating integrals over an interval with equally spaced nodes. Unlike the trapezoidal rule, which employs straight lines to

More information

MATH 1A - FINAL EXAM DELUXE - SOLUTIONS. x x x x x 2. = lim = 1 =0. 2) Then ln(y) = x 2 ln(x) 3) ln(x)

MATH 1A - FINAL EXAM DELUXE - SOLUTIONS. x x x x x 2. = lim = 1 =0. 2) Then ln(y) = x 2 ln(x) 3) ln(x) MATH A - FINAL EXAM DELUXE - SOLUTIONS PEYAM RYAN TABRIZIAN. ( points, 5 points each) Find the following limits (a) lim x x2 + x ( ) x lim x2 + x x2 + x 2 + + x x x x2 + + x x 2 + x 2 x x2 + + x x x2 +

More information

GENG2140, S2, 2012 Week 7: Curve fitting

GENG2140, S2, 2012 Week 7: Curve fitting GENG2140, S2, 2012 Week 7: Curve fitting Curve fitting is the process of constructing a curve, or mathematical function, f(x) that has the best fit to a series of data points Involves fitting lines and

More information

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018 Numerical Analysis Preliminary Exam 1 am to 1 pm, August 2, 218 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

Chapter 8. Exploring Polynomial Functions. Jennifer Huss

Chapter 8. Exploring Polynomial Functions. Jennifer Huss Chapter 8 Exploring Polynomial Functions Jennifer Huss 8-1 Polynomial Functions The degree of a polynomial is determined by the greatest exponent when there is only one variable (x) in the polynomial Polynomial

More information

4. We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x

4. We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x 4 We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x x, x > 0 Since tan x = cos x, from the quotient rule, tan x = sin

More information

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations

More information

Lecture : The Indefinite Integral MTH 124

Lecture : The Indefinite Integral MTH 124 Up to this point we have investigated the definite integral of a function over an interval. In particular we have done the following. Approximated integrals using left and right Riemann sums. Defined the

More information

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker. Integration Topic: Trapezoidal Rule Major: General Engineering Author: Autar Kaw, Charlie Barker 1 What is Integration Integration: The process of measuring the area under a function plotted on a graph.

More information

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4215 Numerical Mathematics Department of Mathematical Sciences Examination paper for TMA425 Numerical Mathematics Academic contact during examination: Trond Kvamsdal Phone: 93058702 Examination date: 6th of December 207 Examination

More information

MATH 104: INTRODUCTORY ANALYSIS SPRING 2008/09 PROBLEM SET 8 SOLUTIONS

MATH 104: INTRODUCTORY ANALYSIS SPRING 2008/09 PROBLEM SET 8 SOLUTIONS MATH 04: INTRODUCTORY ANALYSIS SPRING 008/09 PROBLEM SET 8 SOLUTIONS. Let f : R R be continuous periodic with period, i.e. f(x + ) = f(x) for all x R. Prove the following: (a) f is bounded above below

More information

APPM/MATH Problem Set 6 Solutions

APPM/MATH Problem Set 6 Solutions APPM/MATH 460 Problem Set 6 Solutions This assignment is due by 4pm on Wednesday, November 6th You may either turn it in to me in class or in the box outside my office door (ECOT ) Minimal credit will

More information

Computing Integrals. Lectures INF2320 p. 1/48

Computing Integrals. Lectures INF2320 p. 1/48 Computing Integrals Lectures INF2320 p. 1/48 Lectures INF2320 p. 2/48 Bagels We study a simple example of scientific computing. Assume that you run a Bagel&Juice cafè Each night you have to decide how

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

We consider the problem of finding a polynomial that interpolates a given set of values:

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

Exam in TMA4215 December 7th 2012

Exam in TMA4215 December 7th 2012 Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Contact during the exam: Elena Celledoni, tlf. 7359354, cell phone 48238584 Exam in TMA425 December 7th 22 Allowed

More information

Numerical Integration (Quadrature) Another application for our interpolation tools!

Numerical Integration (Quadrature) Another application for our interpolation tools! Numerical Integration (Quadrature) Another application for our interpolation tools! Integration: Area under a curve Curve = data or function Integrating data Finite number of data points spacing specified

More information

Roots of Equations. ITCS 4133/5133: Introduction to Numerical Methods 1 Roots of Equations

Roots of Equations. ITCS 4133/5133: Introduction to Numerical Methods 1 Roots of Equations Roots of Equations Direct Search, Bisection Methods Regula Falsi, Secant Methods Newton-Raphson Method Zeros of Polynomials (Horner s, Muller s methods) EigenValue Analysis ITCS 4133/5133: Introduction

More information

April 15 Math 2335 sec 001 Spring 2014

April 15 Math 2335 sec 001 Spring 2014 April 15 Math 2335 sec 001 Spring 2014 Trapezoid and Simpson s Rules I(f ) = b a f (x) dx Trapezoid Rule: If [a, b] is divided into n equally spaced subintervals of length h = (b a)/n, then I(f ) T n (f

More information

August 20, Review of Integration & the. Fundamental Theorem of Calculus. Introduction to the Natural Logarithm.

August 20, Review of Integration & the. Fundamental Theorem of Calculus. Introduction to the Natural Logarithm. to Natural Natural to Natural August 20, 2017 to Natural Natural 1 2 3 Natural 4 Incremental Accumulation of Quantities to Natural Natural Integration is a means of understanding and computing incremental

More information

Ch. 03 Numerical Quadrature. Andrea Mignone Physics Department, University of Torino AA

Ch. 03 Numerical Quadrature. Andrea Mignone Physics Department, University of Torino AA Ch. 03 Numerical Quadrature Andrea Mignone Physics Department, University of Torino AA 2017-2018 Numerical Quadrature In numerical analysis quadrature refers to the computation of definite integrals. y

More information

In numerical analysis quadrature refers to the computation of definite integrals.

In numerical analysis quadrature refers to the computation of definite integrals. Numerical Quadrature In numerical analysis quadrature refers to the computation of definite integrals. f(x) a x i x i+1 x i+2 b x A traditional way to perform numerical integration is to take a piece of

More information

X. Numerical Methods

X. Numerical Methods X. Numerical Methods. Taylor Approximation Suppose that f is a function defined in a neighborhood of a point c, and suppose that f has derivatives of all orders near c. In section 5 of chapter 9 we introduced

More information

COURSE Iterative methods for solving linear systems

COURSE Iterative methods for solving linear systems COURSE 0 4.3. Iterative methods for solving linear systems Because of round-off errors, direct methods become less efficient than iterative methods for large systems (>00 000 variables). An iterative scheme

More information

MA2501 Numerical Methods Spring 2015

MA2501 Numerical Methods Spring 2015 Norwegian University of Science and Technology Department of Mathematics MA2501 Numerical Methods Spring 2015 Solutions to exercise set 7 1 Cf. Cheney and Kincaid, Exercise 4.1.9 Consider the data points

More information

Questions from Larson Chapter 4 Topics. 5. Evaluate

Questions from Larson Chapter 4 Topics. 5. Evaluate Math. Questions from Larson Chapter 4 Topics I. Antiderivatives. Evaluate the following integrals. (a) x dx (4x 7) dx (x )(x + x ) dx x. A projectile is launched vertically with an initial velocity of

More information

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight Applied Numerical Analysis (AE0-I) R. Klees and R.P. Dwight February 018 Contents 1 Preliminaries: Motivation, Computer arithmetic, Taylor series 1 1.1 Numerical Analysis Motivation..........................

More information

Stat 451 Lecture Notes Numerical Integration

Stat 451 Lecture Notes Numerical Integration Stat 451 Lecture Notes 03 12 Numerical Integration Ryan Martin UIC www.math.uic.edu/~rgmartin 1 Based on Chapter 5 in Givens & Hoeting, and Chapters 4 & 18 of Lange 2 Updated: February 11, 2016 1 / 29

More information

CS 257: Numerical Methods

CS 257: Numerical Methods CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus

More information

Introduction to Numerical Analysis

Introduction to Numerical Analysis Introduction to Numerical Analysis S. Baskar and S. Sivaji Ganesh Department of Mathematics Indian Institute of Technology Bombay Powai, Mumbai 400 076. Introduction to Numerical Analysis Lecture Notes

More information

2.12: Derivatives of Exp/Log (cont d) and 2.15: Antiderivatives and Initial Value Problems

2.12: Derivatives of Exp/Log (cont d) and 2.15: Antiderivatives and Initial Value Problems 2.12: Derivatives of Exp/Log (cont d) and 2.15: Antiderivatives and Initial Value Problems Mathematics 3 Lecture 14 Dartmouth College February 03, 2010 Derivatives of the Exponential and Logarithmic Functions

More information

Numerical Analysis: Interpolation Part 1

Numerical Analysis: Interpolation Part 1 Numerical Analysis: Interpolation Part 1 Computer Science, Ben-Gurion University (slides based mostly on Prof. Ben-Shahar s notes) 2018/2019, Fall Semester BGU CS Interpolation (ver. 1.00) AY 2018/2019,

More information

Linear Operators and the General Solution of Elementary Linear Ordinary Differential Equations

Linear Operators and the General Solution of Elementary Linear Ordinary Differential Equations CODEE Journal Volume 9 Article 11 5-12-2012 Linear Operators and the General Solution of Elementary Linear Ordinary Differential Equations Norbert Euler Follow this and additional works at: http://scholarship.claremont.edu/codee

More information

MA 3021: Numerical Analysis I Numerical Differentiation and Integration

MA 3021: Numerical Analysis I Numerical Differentiation and Integration MA 3021: Numerical Analysis I Numerical Differentiation and Integration Suh-Yuh Yang ( 楊肅煜 ) Department of Mathematics, National Central University Jhongli District, Taoyuan City 32001, Taiwan syyang@math.ncu.edu.tw

More information

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

More information

Principles of Scientific Computing Local Analysis

Principles of Scientific Computing Local Analysis Principles of Scientific Computing Local Analysis David Bindel and Jonathan Goodman last revised January 2009, printed February 25, 2009 1 Among the most common computational tasks are differentiation,

More information

Indian Institute of Technology Bombay

Indian Institute of Technology Bombay Indian Institute of Technology Bombay MA 5 Calculus Autumn SRG/AA/VDS/KSK Solutions and Marking Scheme for the Mid-Sem Exam Date: September, Weightage: 3 % Time: 8.3 AM.3 AM Max. Marks:. (i) Consider the

More information

Bisection and False Position Dr. Marco A. Arocha Aug, 2014

Bisection and False Position Dr. Marco A. Arocha Aug, 2014 Bisection and False Position Dr. Marco A. Arocha Aug, 2014 1 Given function f, we seek x values for which f(x)=0 Solution x is the root of the equation or zero of the function f Problem is known as root

More information

Lecture 5: Integrals and Applications

Lecture 5: Integrals and Applications Lecture 5: Integrals and Applications Lejla Batina Institute for Computing and Information Sciences Digital Security Version: spring 2012 Lejla Batina Version: spring 2012 Wiskunde 1 1 / 21 Outline The

More information

Scientific Computing

Scientific Computing 2301678 Scientific Computing Chapter 2 Interpolation and Approximation Paisan Nakmahachalasint Paisan.N@chula.ac.th Chapter 2 Interpolation and Approximation p. 1/66 Contents 1. Polynomial interpolation

More information

Lecture 4: Integrals and applications

Lecture 4: Integrals and applications Lecture 4: Integrals and applications Lejla Batina Institute for Computing and Information Sciences Digital Security Version: autumn 2013 Lejla Batina Version: autumn 2013 Calculus en Kansrekenen 1 / 18

More information

Applications of Differentiation

Applications of Differentiation Applications of Differentiation Definitions. A function f has an absolute maximum (or global maximum) at c if for all x in the domain D of f, f(c) f(x). The number f(c) is called the maximum value of f

More information

8.7 Taylor s Inequality Math 2300 Section 005 Calculus II. f(x) = ln(1 + x) f(0) = 0

8.7 Taylor s Inequality Math 2300 Section 005 Calculus II. f(x) = ln(1 + x) f(0) = 0 8.7 Taylor s Inequality Math 00 Section 005 Calculus II Name: ANSWER KEY Taylor s Inequality: If f (n+) is continuous and f (n+) < M between the center a and some point x, then f(x) T n (x) M x a n+ (n

More information

Examination paper for TMA4130 Matematikk 4N

Examination paper for TMA4130 Matematikk 4N Department of Mathematical Sciences Examination paper for TMA4130 Matematikk 4N Academic contact during examination: Morten Nome Phone: 90 84 97 83 Examination date: 13 December 2017 Examination time (from

More information

International Competition in Mathematics for Universtiy Students in Plovdiv, Bulgaria 1994

International Competition in Mathematics for Universtiy Students in Plovdiv, Bulgaria 1994 International Competition in Mathematics for Universtiy Students in Plovdiv, Bulgaria 1994 1 PROBLEMS AND SOLUTIONS First day July 29, 1994 Problem 1. 13 points a Let A be a n n, n 2, symmetric, invertible

More information

Homework set #7 solutions, Math 128A J. Xia

Homework set #7 solutions, Math 128A J. Xia Homework set #7 solutions, Math 18A J. Xia Sec 4.4: 1a, a, 3a, 7abc, 17 1a. Compute by hand or use a program. Matlab code for the Composite Trapezoidal rule: function integral = cmptrap(a,b,n,f) h = (b-a)/n;

More information

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b) Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

Calculus I Announcements

Calculus I Announcements Slide 1 Calculus I Announcements Read sections 4.2,4.3,4.4,4.1 and 5.3 Do the homework from sections 4.2,4.3,4.4,4.1 and 5.3 Exam 3 is Thursday, November 12th See inside for a possible exam question. Slide

More information