d01bbf

d01bbf © Numerical Algorithms Group, 2002.

Purpose

D01BBF Pre-computed weights and abscissae for Gaussian quadrature rules, restricted choice of rule

Synopsis

[weight,abscis,ifail] = d01bbf(d01xxx,a,b<,n,itype,ifail>)

Description

 
 This routine returns the weights and abscissae for use in the 
 Gaussian quadrature of a function f(x). The quadrature takes the 
 form
 
                              n        
                              --       
                           S= >  w f(x )
                              --  i   i
                              i=1      
 
 where w  are the weights and x  are the abscissae.
        i                      i
 Weights and abscissae are available for Gauss-Legendre, Gauss-
 Rational, Gauss-Laguerre and Gauss-Hermite quadrature, and for a 
 selection of values of n.
 
 (a)   Gauss-Legendre Quadrature:
                                   b
                                   /
                               S~= |f(x)dx
                                   /
                                   a
       where a and b are finite and it will be exact for any 
       function of the form
                                   2n-1   
                                   --     i
                             f(x)= >   c x 
                                   --   i 
                                   i=0    
 
 (b)   Gauss-Rational quadrature:
            infty                           a     
            /                               /     
        S~= |    f(x)dx  (a+b>0)   or   S~= |     f(x)dx  (a+b<0)
            /                               /     
            a                               -infty
       and will be exact for any function of the form
                                      2n-1            
                                      --              i
                                      >   c      (x+b) 
                        2n+1   c      --   2n+1-i     
                        --      i     i=0             
                  f(x)= >    ------= ------------------
                        --        i           2n+1
                        i=2  (x+b)       (x+b) 
 
 (c)   Gauss-Laguerre quadrature, adjusted weights option:
             infty                          a     
             /                              /     
         S~= |    f(x)dx  (b>0<)   or   S~= |     f(x)dx  (b<0)
             /                              /     
             a                              -infty
       and will be exact for any function of the form
                                     2n-1   
                                 -bx --     i
                           f(x)=e    >   c x 
                                     --   i 
                                     i=0    
 
 (d)   Gauss-Hermite quadrature, adjusted weights option:
                                +infty
                                /     
                            S~= |     f(x)dx
                                /     
                                -infty
       and will be exact for any function of the form
                                           
                                  2 2n-1    
                           -b(x-a)  --     i
                     f(x)=e         >   c x   (b>0)
                                    --   i  
                                    i=0     
 
 (e)   Gauss-Laguerre quadrature, normal weights option:
       
           infty                             a         
           /     -bx                         /      -bx
       S~= |    e   f(x)dx  (b>0)   or   S~= |     e   f(x)dx 
           /                                 /         
           a                                 -infty    
       
       
        (b<0)
       
       
       and will be exact for any function of the form
                                   2n-1   
                                   --     i
                             f(x)= >   c x 
                                   --   i 
                                   i=0    
 
 (f)   Gauss-Hermite quadrature, normal weights option:
                                   
                            +infty        2
                            /      -b(x-a) 
                        S~= |     e        f(x)dx
                            /              
                            -infty         
       and will be exact for any function of the form:
                                   2n-1   
                                   --     i
                             f(x)= >   c x 
                                   --   i 
                                   i=0    
 
 Note: that the Gauss-Legendre abscissae, with a=-1, b=+1, are the
 zeros of the Legendre polynomials; the Gauss-Laguerre abscissae, 
 with a=0, b=1, are the zeros of the Laguerre polynomials; and the
 Gauss-Hermite abscissae, with a=0, b=1, are the zeros of the 
 Hermite polynomials.
 

Parameters

d01bbf

Required Input Arguments:

d01xxx                                function (NAG-Supplied)
  Use:
      'd01baz' for Gauss-Legendre weights and ascissae
      'd01bay' for Gauss-Rational weights and ascissae
      'd01bax' for Gauss-Laguere weights and ascissae
      'd01baw' for Gauss-Hermite weights and ascissae
a                                     real
b                                     real

Optional Input Arguments:                       <Default>

n                                     integer  64
itype                                 integer  0
ifail                                 integer  -1

Output Arguments:

weight (n)                            real
abscis (n)                            real
ifail                                 integer