Previous Page Next Page Contents

numeric::gldata -- weights and abscissae of Gauss-Legendre quadrature

Introduction

numeric::gldata(n, ..) returns the weights and the abscissae of the Gauss-Legendre quadrature rule with n nodes.

Call(s)

numeric::gldata(n, digits)

Parameters

n - the number of nodes: a positive integer
digits - the number of decimal digits: a positive integer

Returns

A list [b,c] is returned. The lists b=[b[1],..,b[n]] and c=[c[1],..,c[n]] are numerical approximations of the weights and abscissae with digits significant digits.

Side Effects

The function uses option remember. It is not sensitive to the environment variable DIGITS, because the numerical working precision is specified by the second argument digits.

Related Functions

numeric::gtdata, numeric::ncdata, numeric::quadrature

Details

Example 1

The following call computes the Gaussian data with the default precision of DIGITS=10 decimal digits:

>> numeric::gldata(4, DIGITS)
      [[0.1739274226, 0.3260725774, 0.3260725774, 0.1739274226],
      
         [0.0694318442, 0.3300094782, 0.6699905218, 0.9305681558]]

Example 2

For odd n exact rational data for c[(n+1)/2] and b[(n-1)/2] are returned:

>> DIGITS := 4: numeric::gldata(5, DIGITS)
      [[0.1185, 0.2393, 64/225, 0.2393, 0.1185],
      
         [0.04691, 0.2308, 1/2, 0.7692, 0.9531]]
>> delete DIGITS:

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000