Transcription of Numerical integration: Gaussian quadrature rules
{{id}} {{{paragraph}}}
APMA 0160 (A. Yew) Spring 2011 Numerical integration : Gaussian quadrature rulesMatlab s built-in Numerical integration function[Q,fcount]=quad(f,a,b,tol)is essentially oursimp_compextrcode with some further efficiency-enhancing thatquadrequires scalar functions to be defined with elementwise operations, sof(x) =21+x2should be entered asf=inline( (1+x.^2) , x )orf=@(x) (1+x.^2)The default tolerance forquadis 10 has another efficient integration command calledquadl, with the same input and outputarguments. The method underlyingquadlis a Gaussian quadrature rule .Recall that each Newton Cotes quadrature rule came from integrating the Lagrange polynomial thatinterpolates the integrandfatnequally spacednodes in the interval [a,b]. Thus, in general , we expectthe degree of exactness of the rule to ben 1 (though, as we ve seen, some rules turn out to have ahigher-than-expected degree of exactness ).Is it possible to find quadrature rules that usennodes but have degree of exactness higher thann 1?
In general, 2n parameters could potentially define a polynomial of degree up to 2n−1. Therefore, the highest degree of exactness we can expect to achieve with any quadrature rule is 2n−1. To illustrate the procedure of finding such a quadrature rule with degree of exactness 2n −1, let us consider how to choose the w i and x
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}