Special Functions
*****************

Introduction to Special Functions
=================================

 -- %J:
     [index](expr) - Bessel Funct 1st Kind (in SPECINT)

 -- %K: [index](expr)
     Bessel Funct 2nd Kind (in SPECINT)

     Constant, in ODE2

GAMALG
======

- A Dirac gamma matrix algebra program which takes traces of and does manipulations on gamma matrices in n dimensions.  It may be loaded into MACSYMA by LOADFILE("gam"); A preliminary manual is contained in the file SHARE;GAM USAGE and may be printed using PRINTFILE(GAM,USAGE,SHARE);

SPECINT
=======

- The Hypergeometric Special Functions Package HYPGEO is still under development.  At the moment it will find the Laplace Transform or rather, the integral from 0 to INF of some special functions or combinations of them.  The factor, EXP(-P*var) must be explicitly stated.  The syntax is as follows: SPECINT(EXP(-P*var)*expr,var); where var is the variable of integration and expr may be any expression containing special functions (at your own risk). Special function notation follows:

     %J[index](expr)         Bessel Funct 1st Kind
     %K[index](expr)           "     "    2nd Kind
     %I[     ](    )         Modified Bessel
     %HE[     ](  )          Hermite Poly
     %P[  ]( )               Legendre Funct
     %Q[  ]( )               Legendre of second kind
     HSTRUVE[ ]( )           Struve H Function
     LSTRUVE[ ]( )             "    L Function
     %F[ ]([],[],expr)       Hypergeometric Function
     GAMMA()
     GAMMAGREEK()
     GAMMAINCOMPLETE()
     SLOMMEL
     %M[]()                  Whittaker Funct 1st Kind
     %W[]()                     "       "    2nd  "

For a better feeling for what it can do, do DEMO(HYPGEO,DEMO,SHARE1); .

Definitions for Special Functions
=================================

 -- Function: AIRY (X)
     returns the Airy function Ai of real argument X. The file SHARE1;AIRY FASL contains routines to evaluate the Airy functions Ai(X), Bi(X), and their derivatives dAi(X), dBi(X).  Ai and Bi satisfy the AIRY eqn diff(y(x),x,2)-x*y(x)=0.  Read SHARE1;AIRY USAGE for details.

 -- Function: ASYMP
     - A preliminary version of a program to find the asymptotic behavior of Feynman diagrams has been installed on the SHARE1; directory. For further information, see the file SHARE1;ASYMP USAGE. (For Asymptotic Analysis functions, see ASYMPA.)

 -- Function: ASYMPA
     - Asymptotic Analysis - The file SHARE1;ASYMPA > contains simplification functions for asymptotic analysis, including the big-O and little-o functions that are widely used in complexity analysis and numerical analysis.  Do BATCH("asympa.mc"); . (For asymptotic behavior of Feynman diagrams, see ASYMP.)

 -- Function: BESSEL (Z,A)
     returns the Bessel function J for complex Z and real A > 0.0 .  Also an array BESSELARRAY is set up such that BESSELARRAY[I] = J[I+A- ENTIER(A)](Z).

 -- Function: BETA (X, Y)
     same as GAMMA(X)*GAMMA(Y)/GAMMA(X+Y).

 -- Function: GAMMA (X)
     the gamma function. GAMMA(I)=(I-1)!  for I a positive integer.  For the Euler-Mascheroni constant, see %GAMMA.  See also the MAKEGAMMA function.  The variable GAMMALIM[1000000] (which see) controls simplification of the gamma function.

 -- Variable: GAMMALIM
     default: [1000000] controls simplification of the gamma function for integral and rational number arguments.  If the absolute value of the argument is not greater than GAMMALIM, then simplification will occur.  Note that the FACTLIM switch controls simplification of the result of GAMMA of an integer argument as well.

 -- Function: INTOPOIS (A)
     converts A into a Poisson encoding.

 -- Function: MAKEFACT (exp)
     transforms occurrences of binomial,gamma, and beta functions in exp to factorials.

 -- Function: MAKEGAMMA (exp)
     transforms occurrences of binomial,factorial, and beta functions in exp to gamma functions.

 -- Function: NUMFACTOR (exp)
     gives the numerical factor multiplying the expression exp which should be a single term.  If the gcd of all the terms in a sum is desired the CONTENT function may be used.

          (C1) GAMMA(7/2);
          (D1)               15 SQRT(%PI)
                             ------------
                                  8
          (C2) NUMFACTOR(%)
                              15
          (D2)                --
                               8

 -- Function: OUTOFPOIS (A)
     converts A from Poisson encoding to general representation.  If A is not in Poisson form, it will make the conversion, i.e.  it will look like the result of OUTOFPOIS(INTOPOIS(A)).  This function is thus a canonical simplifier for sums of powers of SIN's and COS's of a particular type.

 -- Function: POISDIFF (A, B)
     differentiates A with respect to B.  B must occur only in the trig arguments or only in the coefficients.

 -- Function: POISEXPT (A, B)
     B a positive integer) is functionally identical to INTOPOIS(A**B).

 -- Function: POISINT (A, B)
     integrates in a similarly restricted sense (to POISDIFF).  Non-periodic terms in B are dropped if B is in the trig arguments.

 -- Variable: POISLIM
     default: [5] - determines the domain of the coefficients in the arguments of the trig functions.  The initial value of 5 corresponds to the interval [-2^(5-1)+1,2^(5-1)], or [-15,16], but it can be set to [-2^(n-1)+1, 2^(n-1)].

 -- Function: POISMAP (series, sinfn, cosfn)
     will map the functions sinfn on the sine terms and cosfn on the cosine terms of the poisson series given. sinfn and cosfn are functions of two arguments which are a coefficient and a trigonometric part of a term in series respectively.

 -- Function: POISPLUS (A, B)
     is functionally identical to INTOPOIS(A+B).

 -- Function: POISSIMP (A)
     converts A into a Poisson series for A in general representation.

 -- special symbol: POISSON
     - The Symbol /P/ follows the line label of Poisson series expressions.

 -- Function: POISSUBST (A, B, C)
     substitutes A for B in C.  C is a Poisson series. (1) Where B is a variable U, V, W, X, Y, or Z then A must be an expression linear in those variables (e.g. 6*U+4*V). (2) Where B is other than those variables, then A must also be free of those variables, and furthermore, free of sines or cosines. POISSUBST(A, B, C, D, N) is a special type of substitution which operates on A and B as in type (1) above, but where D is a Poisson series, expands COS(D) and SIN(D) to order N so as to provide the result of substituting A+D for B in C.  The idea is that D is an expansion in terms of a small parameter.  For example, POISSUBST(U,V,COS(V),E,3) results in COS(U)*(1-E^2/2) - SIN(U)*(E-E^3/6).

 -- Function: POISTIMES (A, B)
     is functionally identical to INTOPOIS(A*B).

 -- Function: POISTRIM ()
     is a reserved function name which (if the user has defined it) gets applied during Poisson multiplication.  It is a predicate function of 6 arguments which are the coefficients of the U, V,..., Z in a term.  Terms for which POISTRIM is TRUE (for the coefficients of that term) are eliminated during multiplication.

 -- Function: PRINTPOIS (A)
     prints a Poisson series in a readable format.  In common with OUTOFPOIS, it will convert A into a Poisson encoding first, if necessary.

 -- Function: PSI (X)
     derivative of LOG(GAMMA(X)).  At this time, MACSYMA does not have numerical evaluation capabilities for PSI.  For information on the PSI[N](X) notation, see POLYGAMMA.