hypergeo               package:Davies               R Documentation

_T_h_e _h_y_p_e_r_g_e_o_m_e_t_r_i_c _f_u_n_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     The Hypergeometric and generalized hypergeometric functions as
     defined by Abramowitz and Stegun.  *These functions are defunct
     and will be removed altogether soon.  To evaluate hypergeometric
     functions, use the 'hypergeo' package*

_U_s_a_g_e:

     hypergeo (A, B, C, z, tol = 1e-06, maxiter = 2000, strict=TRUE)
     hypergeo2(A, B, C, z, tol = 1e-06, maxiter = 2000, strict=TRUE)
     genhypergeo(U, L, z, tol = 1e-06, maxiter = 2000, strict=TRUE)

_A_r_g_u_m_e_n_t_s:

   A,B,C: Parameters for 'hypergeo()'

     U,L: Upper and lower vector parameters for 'genhypergeo()'

       z: argument

     tol: absolute tolerance

 maxiter: Maximum number of iterations

  strict: Boolean, with default 'TRUE' meaning to return 'NA' if the
          series appears not to converge, and 'FALSE' meaning to return
          the partial sum

_D_e_t_a_i_l_s:

     The hypergeometric function as defined by Abramowitz and Stegun,
     equation 15.1.1, page 556 is

                          [omitted; see PDF]


     where (a)_n=Gamma(a+n)/Gamma(a) is the Pochammer symbol (6.1.22,
     page 256).

     The generalized hypergeometric function appears from time to time
     in the literature (eg Mathematica) as


                          [omitted; see PDF]


     where U=(u_1,...,u_i) and L=(l_1,...,l_i) are the upper and
     lower vectors respectively.

     For the Confluent Hypergeometric function, use 'genhypergeo()'
     with length-1 vectors for arguments 'U' and 'V'.

     For the 0F1 function (ie no upper arguments), use
     'genhypergeo(NULL,L,x)'.

_N_o_t_e:

     Abramowitz and Stegun state:

     The radius of convergence of the Gauss hypergeometric series ...
     is |z|=1 (AMS-55, section 15.1, page 556).

     This reference book gives the correct radius of convergence; use
     the ratio test to verify it.  Just to be absolutely specific: if
     |z|>1, the hypergeometric series will diverge.

     However, AMS-55 give a transformation: eqn 15.3.7, page 559
     converts a function of z to one of 1/z.  This is used in function
     'hypergeo2()'; note that values are coerced to complex.

     *The functions described here are defunct.  For the hypergeometric
     function, see function 'hypergeo()' of the 'hypergeo' package,
     which supports a wide range of transformations and is able to deal
     with a wide range of special cases of the parameters*

_A_u_t_h_o_r(_s):

     Robin K. S. Hankin

_R_e_f_e_r_e_n_c_e_s:

     Abramowitz and Stegun 1955. _Handbook of mathematical functions
     with formulas,  graphs and mathematical tables_ (AMS-55). National
     Bureau of Standards

_E_x_a_m_p_l_e_s:

     ## Not run: 
     #  equation 15.1.3, page 556:
     f1 <- function(x){-log(1-x)/x}
     f2 <- function(x){hypergeo(1,1,2,x)}
     f3 <- function(x){hypergeo(1,1,2,x,tol=1e-10)}
     x <- seq(from = -0.6,to=0.6,len=14)
     f1(x)-f2(x)
     f1(x)-f3(x)  # Note tighter tolerance

     # equation 15.1.7, p556:
     g1 <- function(x){log(x + sqrt(1+x^2))/x}
     g2 <- function(x){hypergeo(1/2,1/2,3/2,-x^2)}
     g1(x)-g2(x)  # should be small 
     abs(g1(x+0.1i) - g2(x+0.1i))  # should have small modulus.

     # Just a random call, verified by Maple [ Hypergeom([],[1.22],0.9087) ]:
     genhypergeo(NULL,1.22,0.9087)
     ## End(Not run)

