D01BBF NAG Fortran Library Routine Document

Similar documents
NAG Fortran Library Routine Document D01BBF.1

Module 11.4: nag quad util Numerical Integration Utilities. Contents

Numerical integration

3.4 Numerical integration

Numerical Integration

Lecture 6: Singular Integrals, Open Quadrature rules, and Gauss Quadrature

Orthogonal Polynomials

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

COSC 3361 Numerical Analysis I Numerical Integration and Differentiation (III) - Gauss Quadrature and Adaptive Quadrature

Review of Gaussian Quadrature method

Theoretical foundations of Gaussian quadrature

Review of Calculus, cont d

4.4 Improper Integrals

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

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

Interpolation. Gaussian Quadrature. September 25, 2011

Lecture 14 Numerical integration: advanced topics

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

Construction of Gauss Quadrature Rules

JDEP 384H: Numerical Methods in Business

Section 6.1 Definite Integral

p(x) = 3x 3 + x n 3 k=0 so the right hand side of the equality we have to show is obtained for r = b 0, s = b 1 and 2n 3 b k x k, q 2n 3 (x) =

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014

1 The Lagrange interpolation formula

Overview of Calculus I

CS514 Fall '00 Numerical Analysis (Sketched) Solution of Homework 3 1. Questions from text in Chapter 3 Problem 1: 0 f 0 1 f 8 1 8(f 1 f 0 ) 1 f 4 2 8

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

11 An introduction to Riemann Integration

7.2 The Definite Integral

Lecture 19: Continuous Least Squares Approximation

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

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

Section 7.1 Integration by Substitution

CLOSED EXPRESSIONS FOR COEFFICIENTS IN WEIGHTED NEWTON-COTES QUADRATURES

Discrete Least-squares Approximations

Numerical Integration

Math 113 Fall Final Exam Review. 2. Applications of Integration Chapter 6 including sections and section 6.8

Lecture 20: Numerical Integration III

AM1 Mathematical Analysis 1 Oct Feb Exercises Lecture 3. sin(x + h) sin x h cos(x + h) cos x h

Numerical quadrature based on interpolating functions: A MATLAB implementation

B.Sc. in Mathematics (Ordinary)

Lab 11 Approximate Integration

Lecture 23: Interpolatory Quadrature

Abstract inner product spaces

4.1. Probability Density Functions

Math& 152 Section Integration by Parts

Main topics for the First Midterm

Numerical Analysis: Trapezoidal and Simpson s Rule

Solutions to Assignment #8

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2019

4.4 Areas, Integrals and Antiderivatives

The Riemann-Lebesgue Lemma

Lecture 14: Quadrature

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

Continuous Random Variables

Numerical Integration

Chapter 3 Polynomials

APPROXIMATE INTEGRATION

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

First midterm topics Second midterm topics End of quarter topics. Math 3B Review. Steve. 18 March 2009

University of Texas MD Anderson Cancer Center Department of Biostatistics. Inequality Calculator, Version 3.0 November 25, 2013 User s Guide

1 Linear Least Squares

2008 Mathematical Methods (CAS) GA 3: Examination 2

Session 13

NAG Fortran Library Routine Document D02JAF.1

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

OPEN NEWTON - COTES QUADRATURE WITH MIDPOINT DERIVATIVE FOR INTEGRATION OF ALGEBRAIC FUNCTIONS

Numerical Integration. Newton Cotes Formulas. Quadrature. Newton Cotes Formulas. To approximate the integral b

1 The fundamental theorems of calculus.

Reliable Optimal Production Control with Cobb-Douglas Model

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Chapter 5. Numerical Integration

Elementary Linear Algebra

8 J. Roumeliotis, P. Cerone, S.S. Drgomir In this pper, we extend the ove result nd develop n Ostrowski-type inequlity for weighted integrls. Applicti

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

Read section 3.3, 3.4 Announcements:

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

F04JGF NAG Fortran Library Routine Document

III. Lecture on Numerical Integration. File faclib/dattab/lecture-notes/numerical-inter03.tex /by EC, 3/14/2008 at 15:11, version 9

Quadrature Rules for Evaluation of Hyper Singular Integrals

Markscheme May 2016 Mathematics Standard level Paper 1

4 7x =250; 5 3x =500; Read section 3.3, 3.4 Announcements: Bell Ringer: Use your calculator to solve

MATH 1080: Calculus of One Variable II Fall 2017 Textbook: Single Variable Calculus: Early Transcendentals, 7e, by James Stewart.

Chapter 3 Solving Nonlinear Equations

Numerical Methods I Orthogonal Polynomials

CAAM 453 NUMERICAL ANALYSIS I Examination There are four questions, plus a bonus. Do not look at them until you begin the exam.

Harmonic Mean Derivative - Based Closed Newton Cotes Quadrature

Orthogonal Polynomials and Least-Squares Approximations to Functions

Efficient Computation of a Class of Singular Oscillatory Integrals by Steepest Descent Method

Math 426: Probability Final Exam Practice

NAG Library Routine Document D02JAF.1

Matrices and Determinants

1. Gauss-Jacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ),

Lecture 12: Numerical Quadrature

Lecture 1. Functional series. Pointwise and uniform convergence.

Lecture 3 Gaussian Probability Distribution

Polynomials and Division Theory

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

1 The fundamental theorems of calculus.

Chapter 3. Vector Spaces

Transcription:

D01 Qudrture D01BBF NAG Fortrn Librry Routine Document Note. Before using this routine, plese red the Users Note for your implementtion to check the interprettion of bold itlicised terms nd other implementtion-dependent detils. 1 Purpose D01BBF returns the weights nd bscisse pproprite to Gussin qudrture formul with specified number of bscisse. The formule provided re Guss Legendre, Guss Rtionl, Guss Lguerre nd Guss Hermite. 2 Specifiction SUBROUTINE D01BBF(D01XXX, A, B, ITYPE, N, WEIGHT, ABSCIS, IFAIL) ITYPE, N, IFAIL rel A, B, WEIGHT(N), ABSCIS(N) EXTERNAL D01XXX 3 Description This routine returns the weights nd bscisse for use in the Gussin qudrture of function f(x). The qudrture tkes the form n S = w i f(x i ) i=1 where w i re the weights nd x i re the bscisse (see Dvis nd Rbinowitz [1], Froberg [2], Rlston [3] or Stroud nd Secrest [4]). Weights nd bscisse re vilble for Guss Legendre, Guss Rtionl, Guss Lguerre nd Guss Hermite qudrture, nd for selection of vlues of n (see Section 5). () Guss Legendre Qudrture: b f(x) dx where nd b re finite nd it will be exct for ny function of the form (b) Guss Rtionl qudrture: f(x) dx ( + b>0) or nd will be exct for ny function of the form 2n+1 i=2 f(x) dx ( + b<0) c i (x + b) i = c 2n+1 i (x + b) i (x + b) 2n+1 (c) Guss Lguerre qudrture, djusted weights option: f(x) dx (b >0) or nd will be exct for ny function of the form e bx f(x) dx (b <0) D01BBF.1

D01BBF D01 Qudrture (d) Guss Hermite qudrture, djusted weights option: nd will be exct for ny function of the form + f(x) dx e b(x )2 (b>0) (e) Guss Lguerre qudrture, norml weights option: e bx f(x) dx (b >0) or nd will be exct for ny function of the form e bx f(x) dx (b <0) (f) Guss Hermite qudrture, norml weights option: + nd will be exct for ny function of the form: e b(x )2 f(x) dx Note. Tht the Guss Legendre bscisse, with = 1, b = +1, re the zeros of the Legendre polynomils; the Guss Lguerre bscisse, with =0,b = 1, re the zeros of the Lguerre polynomils; nd the Guss Hermite bscisse, with =0,b = 1, re the zeros of the Hermite polynomils. 4 References [1] Dvis P J nd Rbinowitz P (1975) Methods of Numericl Integrtion Acdemic Press [2] Froberg C E (1970) Introduction to Numericl Anlysis Addison Wesley [3] Rlston A (1965) A First Course in Numericl Anlysis McGrw Hill 87 90 [4] Stroud A H nd Secrest D (1966) Gussin Qudrture Formuls Prentice Hll 5 Prmeters 1: D01XXX SUBROUTINE, supplied by the NAG Fortrn Librry. Externl Procedure The nme of the routine indictes the qudrture formul: D01BAZ, for Guss Legendre weights nd bscisse; D01BAY, for Guss Rtionl weights nd bscisse; D01BAX, for Guss Lguerre weights nd bscisse; D01BAW, for Guss Hermite weights nd bscisse. The nme used must be declred s EXTERNALin the (sub)progrm from which D01BBF is clled. In certin implementtions, to void nme clshes between single nd double precision versions, nmes of uxiliry routines hve been chnged, e.g., D01BAX to BAXD01. Plese refer to the Users Note for your implementtion. D01BBF.2

D01 Qudrture D01BBF 2: A rel Input 3: B rel Input On entry: the quntities nd b s described in the pproprite subsection of Section 3. 4: ITYPE Input On entry: indictes the type of weights for Guss Lguerre or Guss Hermite qudrture (see Section 3): if ITYPE = 1, djusted weights will be returned; if ITYPE = 0, norml weights will be returned. Constrint: ITYPE = 0 or 1. For Guss Legendre or Guss Rtionl qudrture, this prmeter is not used. 5: N Input On entry: the number of weights nd bscisse to be returned, n. Constrint: N = 1,2,3,4,5,6,8,10,12,14,16,20,24,32,48 or 64. 6: WEIGHT(N) rel rry Output On exit: the N weights. For Guss Lguerre nd Guss Hermite qudrture, these will be the djusted weights if ITYPE = 1, nd the norml weights if ITYPE = 0. 7: ABSCIS(N) rel rry Output On exit: the N bscisse. 8: IFAIL Input/Output On entry: IFAILmust be set to 0, 1 or 1. For users not fmilir with this prmeter (described in Chpter P01) the recommended vlue is 0. On exit: IFAIL= 0 unless the routine detects n error (see Section 6). 6 Error Indictors nd Wrnings Errors detected by the routine: IFAIL= 1 The N-point rule is not mong those stored. If the soft fil option is used, the weights nd bscisse returned will be those for the lrgest vlid vlue of N less thn the requested vlue, nd the excess elements of WEIGHT nd ABSCIS (i.e., up to the requested N) will be filled with zeros. IFAIL= 2 The vlue of A nd/or B is invlid. Guss Rtionl: A + B = 0 Guss Lguerre: B = 0 Guss Hermite: B 0 If the soft fil option is used the weights nd bscisse re returned s zero. IFAIL= 3 Lguerre nd Hermite norml weights only: underflow is occurring in evluting one or more of the norml weights. If the soft fil option is used, the underflowing weights re returned s zero. A smller vlue of N must be used; or djusted weights should be used (ITYPE = 1). In the ltter cse, tke cre tht underflow does not occur when evluting the integrnd pproprite for djusted weights. D01BBF.3

D01BBF D01 Qudrture 7 Accurcy The weights nd bscisse re stored for stndrd vlues of A nd B to full mchine ccurcy. 8 Further Comments Timing is negligible. 9 Exmple This exmple progrm returns the bscisse nd (djusted) weights for the six-point Guss Lguerre formul. 9.1 Progrm Text Note. The listing of the exmple progrm presented below uses bold itlicised terms to denote precision-dependent detils. Plese red the Users Note for your implementtion to check the interprettion of these terms. As explined in the Essentil Introduction to this mnul, the results produced my not be identicl for ll implementtions. D01BBF ExmpleProgrm Text Mrk 14 Revised. NAG Copyright 1989... Prmeters.. N PARAMETER (N=6) NOUT PARAMETER (NOUT=6).. Locl Sclrs.. rel A, B IFAIL, ITYPE, J.. Locl Arrys.. rel ABSCIS(N), WEIGHT(N).. Externl Subroutines.. EXTERNAL D01BAX, D01BBF.. Executble Sttements.. D01BBF ExmpleProgrm Results A = 0.0e0 B = 1.0e0 ITYPE = 1 IFAIL = 0 CALL D01BBF(D01BAX,A,B,ITYPE,N,WEIGHT,ABSCIS,IFAIL) WRITE (NOUT,99998) Lguerre formul,, N, points AbscisseWeights WRITE (NOUT,99999) (ABSCIS(J),WEIGHT(J),J=1,N) STOP 99999 FORMAT (1X,2e15.6) 99998 FORMAT (1X,A,I3,A) END 9.2 Progrm Dt None. D01BBF.4

D01 Qudrture D01BBF 9.3 Progrm Results D01BBF ExmpleProgrm Results Lguerre formul, 6 points AbscisseWeights 0.222847E+00 0.118893E+01 0.299274E+01 0.577514E+01 0.983747E+01 0.159829E+02 0.573536E+00 0.136925E+01 0.226068E+01 0.335052E+01 0.488683E+01 0.784902E+01 D01BBF.5 (lst)