Skip to content

Julia package to compute weights and points for the classical Gauss quadrature rules

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

billmclean/GaussQuadrature.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

GaussQuadrature.jl

Julia package to compute points and weights for Gauss quadrature rules using the Golub-Welsch algorithm.

Handles the classical Legendre, Chebyshev, Jacobi, Laguerre and Hermite weights, as well as a logarithmic weight function. In fact, the Gauss rule is available for any custom weight function such that the coefficients are known for the three-term recurrence relation satisfied by the associated orthogonal polynomials. The modified Chebyshev algorithm is provided to determine these coefficients from the modified moments of the weight function.

The Lobatto and Radau variants of all these rules are also provided by appropriate choice of the endpt argument: neither (the default), both, left or right.

For example, to obtain a plain 5-point Gauss-Legendre rule with weight function w(x)=1 on the interval -1 < x < -1 do

julia> using GaussQuadrature
julia> x, w = legendre(5)

whereas for the Lobatto version do

julia> x, w = legendre(5, both)

The package supports BigFloats; for example,

julia> x, w = legendre(BigFloat, 5)

gives a plain 5-point Gauss-Legendre rule accurate to about 75 significant figures.

Read the initial comments in the src/GaussQuadrature.jl module for full details, or read the help documentation for the individual functions called legendre, chebyshev, jacobi, laguerre, hermite, logweight and custom_gauss_rule.

About

Julia package to compute weights and points for the classical Gauss quadrature rules

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages