Anionic Functions for the HP48S/SX/G/GX


Overview
 

-The zip file contains

 >>> A binary file ANION48 ( #17236d / 15926.5 bytes )  which works with the HP48S/SX/G/GX        Both are directories, not libraries.
 >>> A binary file ANION50 ( #59974d / 15849 bytes ) which works with the HP49/50G
>>>  An ASCII file ANION which should work with all these calculators.
 >>> This html page.

-----------------------------------------------------------------------------------------------------------------------------
 

-Like the quaternions may be constructed from the complexes, the octonions may be constructed from the quaternions,
 then the sedenions, 32-ons, 64-ons, 128-ons, ...... , and more generally the "anions".

-The Cayley-Dickinson formula          ( a , b ) ( c , d ) = ( a c - d* b , d a + b c* )       where   * = conjugate

  is used to define the multiplication: a complex number is regarded as a pair of real numbers,
  a quaternion as a pair of complexes and so on...

-This product is already not commutative for the quaternions, not even associative for the octonions,
  and zero-divisors appear with the sedenions.

-However, the formulae that are used to define elementary & special functions involve anions with proportional imaginary parts,
  and in this case, the products are commutative and much easier to compute.
 

Notes:

-When the functions are computed by ascending series, the results are accurate for "small" arguments only.

-The variables are anions ( hypercomplexes ), but the parameters are restricted to real values.
-The anions must be entered as N-dimensional vectors ( N > 1 )
-So, the complexes must be under the form  [ x y ]  but not  ( x , y )

-Set your HP-48 in RECT mode.
 
 
 Functions  Description
 SOLVA
   FXA
   peval
   tol
 Im
 AxA0
 SPEC
    HRMA
    GAMA
    PSIA
    PSINA
    ZETAA
    HGFA
    ALFA
      ALF12
      ALF13
      S
      ALF22
      ALF23
    BESSEL
      JNA
      YNA
      INA
      KNA
      S1
      S2
    ELLIPA
      JEFA
      WEFA
      WF2A
    ESINT
      EIA
      ENA
      SIA
      SHIA
      CIA
      CHIA
      S1
      S2
    SPHR
      SMNA
      L
      LMN
      M
      N
      C2
      ITER
    ORTHO
      LEGA
      LANA
      CHB1A
      CHB2A
      JCPA
      USPA
      PMN2A
      PMN3A
      S1
      S2
   MISC
      AIBIA
      ANWEB
      CATA
      CHB1A
      CHB2A
      DNA
      ERFA
      GERFA
      HMTA
      IBFA
      IGFA
      JCFA
      LANA
      LOM1A
      LOM2A
      RCWFA
      STRHA
      STRLA
      TORA
      USFA
      WHIMA
      WHIWA
      S1
      S2
   ASYM
      DNA
      ENA
 AxA
 INVA
 EXPA
 LNA
 conj
 A­A
 A­X
 X­A
 SHA
 CHA
 THA
 ASHA
 ACHA
 ATHA
 SINA
 COSA
 TANA
 ASINA
 ACOSA
 ATANA
 GDA
 AGDA
 REC
 POL
 QxQ
 R->P
 P->R
 SGNI
 Directory = Solving an Anionic Equation
   Solves f(a)=a
   Evaluates a polynomial with real coefficients
   tolerance = a small positive number
 Imaginary part of an anion
 Product of 2 anions whose imaginary parts are proportional
 Directory = Special Functions
   Harmonic Numbers
   Gamma Function
   Digamma Function
   Polygamma Functions
   Riemann Zeta Function
   Generalized Hypergeometric Functions
   Directory = Associated Legendre Functions
     Legendre Functions - 1st kind - Type2
     Legendre Functions - 1st kind - Type3
     Subroutine
     Legendre Functions - 2nd kind - Type2
     Legendre Functions - 2st kind - Type3
   Directory = Bessel Functions
     Bessel Functions of the 1st kind
     Bessel Functions of the 2nd kind
     Modified Bessel Functions of the 1st kind
     Modified Bessel Functions of the 2nd kind
     Subroutine1
     Subroutine2
   Directory = Elliptic Functions
     Jacobian Elliptic Functions
     Weierstrass Elliptic Functions
     Weierstrass Duplication Formula
   Directory = Exponential, Sine & Cosine Integral
      Exponential Integral Ei(a)
      Exponential Integral En(a)
      Sine Integral
      Hyperbolic Sine Integral
      Cosine Integral
      Hyperbolic Cosine Integral
      Subroutine1
      Subroutine2
   Directory = Spheroidal Wave Functions
       Angular Spheroidal Wave Function of the 1st kind
       Eigenvalue
       Calculating the eigenvalues
       Parameter m
       Parameter n
       Parameter c2
       Number of iterations ( default = 12 )
    Directory = Orthogonal Polynomials
       Legendre Polynomials
       Generalized Laguerre's Polynomials
       Chebyshev Polynomials - 1st kind
       Chebyshev Polynomials - 2nd kind
       Jacobi Polynomials
       UltraSpherical Polynomials
       Associated Legendre Functions - 1st kind - Type2
       Associated Legendre Functions - 1st kind - Type3
       Subroutine1
       Subroutine2
    Directory = Miscellaneous Functions
       Airy Functions Ai(a) & Bi(a)
       Anger & Weber Functions
       Catalan Numbers
       Chebyshev Functions - 1st kind
       Chebyshev Functions - 2nd kind
       Parabolic Cylinder Functions
       Error Function
       Generaized Error Functions
       Hermite Functions
       Incomplete Beta Functions
       Incomplete Gamma Functions
       Jacobi Functions
       Laguerre's Functions
       Lommel Functions - 1st kind
       Lommel Functions - 2nd kind
       Regular Coulomb Wave Functions
       Struve Function H
       Struve Function L
       Toronto Functions
       UltraSpherical Functions
       Whittaker's M-Function
       Whittaker's W-Function
       Subroutine1
       Subroutine2
    Directory = Asymptotic Expansions
       Parabolic Cylinder Functions
       Exponential Integral En(a)
 Product of 2 anions - general case - Cayley-Dickinson doubl.
 Inverse of an anion
 Exponential of an anion
 Logarithm of an anion
 Conjugate of an anion
 Raising an anion to an anionic exponent
 Raising an anion to a real exponent
 Raising a real to an anionic exponent
 Hyperbolic Sine
 Hyperbolic Cosine
 Hyperbolic Tangent
 Inverse Hyperbolic Sine
 Inverse Hyperbolic Cosine
 Inverse Hyperbolic Tangent
 Sine of an anion
 Cosine of an anion
 Tangent of an anion
 Arc Sine
 Arc Cosine
 Arc Tangent
 Gudermannian Function
 Inverse Gudermannian Function
 Polar-Rectangular conversion of an anion
 Rectangular-Polar conversion of an anion
 Product of 2 Quaternions
 Rectangular-Polar Conversion of 2 Real Numbers
 Polar-Rectangular Conversion of 2 Real Numbers
 "Sign" of Im(a)

 

Imaginary part of an anion
 

Im  returns the imaginary part of  [ a0 , a1 , ..... , an ] i-e  [ a1 , ..... , an ]

-It's only useful to visualize more easily a quaternion - at least with an HP-48...
 
 

Product of 2 anions whose imaginary parts are proportional
 

-The Cayley-Dickinson formula is not very easy to use and it is also very slow ( see the next paragraph ).
-But fortunately, there is a much easier case when the anions have the same imaginary direction,
  it's often the case to compute elementary or special functions of an anion:
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             A             /
       Level 1             A'           A A'

Example:    A = 8 + 3 i + 4 j + 7 k   ;   A' = 5 - 6 i - 8 j - 14 k

  [ 8  3   4   7 ]   ENTER
  [ 5 -6 -8 -14 ]  AxA0      >>>>   [ 188  -33  -44  -77 ]

-So,    A.A' = 188 - 33 i - 44 j - 77 k

Notes:

-Of course, the next program AxA gives the same result but AxA0 is much faster.
-Unlike AxA below, AxA0 also works with N-vectors where N > 1 is not an integer power of 2.
-AxA0 does not check that the imaginary parts are proportional...
 

Product of 2 anions - general case - Cayley-Dickinson doubling
 

-AxA uses the Cayley-Dickinson formula          ( a , b ) ( c , d ) = ( a c - d* b , d a + b c* )       where   * = conjugate

-AxA is a recursive program: it calls itself as a subroutine until we reach the multiplication of 2 quaternions which is computed by QxQ
-But for the product of 2 complexes, it simply calls AxA0
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             A             /
       Level 1             A'           A A'

Example:    Calculate the product of the sedenions:

    A = 2 + 4 e1 + 9 e2 + 3 e3 + 5 e4 + 7 e5 + 8 e6 + 2 e7 + 6 e8 + 4 e9 + 3 e10 + 2 e11 + 9 e12 + 7 e13 + 6 e14 + 8 e15
   A' =  9 + 2 e1 + 4 e2 + 7 e3 + 3 e4 + 2 e5 + 6 e6 + 5 e7 + 4 e8 + 2 e9 + 6 e10 + 9 e11 + 3 e12 + 6 e13 + 5 e14 + 7 e15

    [ 2  4  9  3  5  7  8  2  6  4  3  2  9  7  6  8 ]   ENTER
    [ 9  2  4  7  3  2  6  5  4  2  6  9  3  6  5  7 ]   AxA          >>>>    [  - 357  2  132  20  -53  25  138  101  13 -10  12 -43  41  216  -28  183 ]

  whence

    A.A' = - 357 + 2 e1 + 132 e2 + 20 e3 - 53 e4 + 25 e5 + 138 e6+ 101 e7 + 13 e8 - 10 e9 + 12 e10 - 43 e11 + 41 e12 + 216 e13 - 28 e14 + 183 e15

Notes:

-Since the multiplication is not commutative, place the 1st anion in level2 and the 2nd anion in level1.
-If you enter N-dimensional vectors where N is not an integer power of 2, there will be an error message "somewhere".
-The product of two 128-ons is returned in about 9 minutes (!) with an HP48GX.
 

Inverse of an anion
 

-The reciprocal of an anion A # 0  is given by

    A-1 = A* / | A |2    where A* is the conjugate of  A   and   | A |2 = x02 + x12 + ................. + xN-12
 
 
      STACK        INPUT      OUTPUT
       Level 1             A           1/A

Example:    Inverse of the octonion  A = 2 + 4 e1 + 5 e2 + 10 e3 + 3 e4 + 7 e5 + 6 e6 + 9 e7

     [ 2  4  5  10  3  7  6  9 ]   INVA   gives   [ 2  -4  -5  -10  -3  -7  -6  -9 ] / 320    ( approximately )

     whence    1 / A  = 1/160 - 1/80 e1 - 1/64 e2 - 1/32 e3 - 3/320 e4 - 7/320 e5 - 3/160 e6 - 9/320 e7
 

Exponential of an anion
 

Formula:       exp( x0 + x1 e1 + .... + xN-1 eN-1 ) = ex0 [ cos µ + ( sin µ ). I ]

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Exp(A)

Example:        A = 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7

   [ 1  0.9  0.8  0.7  0.6  0.5  0.4  0.3 ]    EXPA   >>>>   [ -0.27820041773    1.45435861016     1.29276320903     1.13116780790
                                                                                           0.969572406774   0.807977005645   0.646381604517  0.484786203388 ]

-So,  exp w = -0.27820041773 + 1.45435861016  e1 + 1.29276320903 e2 + 1.1311678079 e3
                      + 0.969572406774 e4 + 0.807977005645 e5 + 0.646381604517 e6 + 0.484786203388 e7
 

Logarithm of an anion
 

-"LNA" uses the formula:      Ln( x0 + x1 e1 + .................+ xN-1 eN-1 )

   = Ln ( x02 + x12 + .................. + xN-12 )1/2 + Atan2(µ,x0). I

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ

-If  µ = 0  ,    I  is replaced by  e1
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Ln (A)

Example:        A = 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7

   [ 1  0.9  0.8  0.7  0.6  0.5  0.4  0.3 ]    LNA   >>>>   [  0.667500533365   0.555135625689    0.493453889501    0.431772153314
                                                                                         0.370090417126   0.308408680938    0.246726944751    0.185045208563 ]

-So,  Ln A =   0.667500533365 + 0.555135625689  e1 + 0.493453889501 e2 + 0.431772153314 e3
                  + 0.370090417126 e4 + 0.308408680938 e5 + 0.246726944751 e6 + 0.185045208563 e7
 

Conjugate of an anion
 

-The real part is unchanged and the imaginary part is multiplied by (-1)
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       conj(A)

Example:        A = 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7

   [ 1  0.9  0.8  0.7  0.6  0.5  0.4  0.3 ]    conj   gives   [ 1  -0.9  -0.8  -0.7  -0.6  -0.5  -0.4  -0.3 ]
 

Raising an anion to an anionic exponent
 

-This may be defined in several ways.
-'A­A'  employs the formula:   A^A' = exp [ ( Ln A ) A' ]
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             A             /
       Level 1             A'           A^A'

Example:

    A = 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7
    A' = 0.3 + 0.4 e1 + 0.5 e2 + 0.6 e3 + 0.7 e4 + 0.8 e5 + 0.9 e6 + e7

    [ 1  0.9  0.8  0.7  0.6  0.5  0.4  0.3 ]   ENTER
    [ 0.3  0.4  0.5  0.6  0.7  0.8  0.9  1 ]   A­A     >>>>  [ -0.0798554801772   0.0598156552163   0.0747695690201   0.0897234828243
                                                                                         -0.0447059771355  0.0822854669910   0.134585224237     0.074847451159 ]
 

-So,  A^A' = -0.0798554801772 + 0.0598156552163 e1 + 0.0747695690201 e2 +  0.089723482843 e3
                     - 0.0447059771355 e4 + 0.082285466991 e5 + 0.134585224237 e6 + 0.074847451159 e7

Note:

-Another definition is possible:   ww' = exp [ w'  ( Ln w ) ]
 

Raising an anion to a real exponent
 

  A­X   calculates  A^X = exp ( X Ln A )   where  X is a real number and A  is an anion
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             A             /
       Level 1             X          A^X

Example:         A = 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7    and    X = PI

  [ 1  0.9  0.8  0.7  0.6  0.5  0.4  0.3 ]   ENTER  PI  A­X  >>>>   [ -8.10037865985  -0.441313113853   -0.392278323424  -0.343243532998
                                                                                                        -0.29420874257  -0.245173952140   -0.196139161713  -0.147104371284 ]

-So,  A^PI =  -8.10037865985 - 0.441313113853  e1 - 0.392278323424 e2 - 0.343243532998 e3
                     - 0.29420874257 e4 - 0.24517395214 e5 - 0.196139161713 e6 - 0.147104371284 e7
 

Raising a real to an anionic exponent
 

  X­A   calculates  X^A = exp ( A Ln X )
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             X             /
       Level 1             A          X^A

Example:         X = PI  and  A = 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7

     PI   ENTER   [ 1  0.9  0.8  0.7  0.6  0.5  0.4  0.3 ]     X­A   >>>>   [ -1.06159850987  1.59031853661  1.41361647698  1.23691441735
                                                                                                                 1.06021235773  0.883510298111  0.706808238488  0.530106178866 ]

 and   PI^A = -1.06159850987 + 1.59031853661 e1 + 1.41361647698 e2 + 1.23691441735 e3
                     + 1.06021235773 e4 + 0.883510298111 e5 + 0.706808238488 e6 + 0.530106178866 e7
 

Hyperbolic Sine
 

-We have:  Sinh ( x0 + x1 e1 + .... + xN-1 eN-1 )  =  Sinh x0 Cos µ  + I ( Cosh x0 ) ( Sin µ )

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Sinh A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  SHA  >>>>  [ 2.55819839514   1.13145919486   1.50861225981   1.88576532476 ]
 

Hyperbolic Cosine
 

 Cosh ( x0 + x1 e1 + .... + xN-1 eN-1 )  =  Cosh x0 Cos µ  + I ( Sinh x0 ) ( Sin µ )

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Cosh A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  CHA  >>>>  [ 2.56365605381   1.09075786958   1.4543438261   1.81792978263 ]
 

Hyperbolic Tangent
 

 Tanh A  is defined by  Tanh A = ( Sinh A ) ( Cosh A ) -1
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Tanh A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  THA  >>>>  [ 0.999511158203   0.015538758623   0.020718344831   0.025897931037 ]
 

Inverse Hyperbolic Sine
 

 Formula:          ArcSinh A = Ln [ A + ( A2 + 1 )1/2 ]         with a slight modification if  Re(a) = 0
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Asinh A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  ASHA  >>>>  [ 2.68368096566   0.54844598531   0.731261313745   0.914076642184 ]
 

Inverse Hyperbolic Cosine
 

 Formula:          ArcCosh A = Ln [ A + ( A + 1 )1/2 ( A - 1 )1/2 ]
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Acosh A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  ACHA  >>>>  [ 2.69156842782   0.550503878188   0.734005170918   0.91750646365 ]
 

Inverse Hyperbolic Tangent
 

 Formula:         ArcTanh A = (1/2) [ Ln ( 1 + A ) - Ln ( 1 - A ) ]
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Atanh A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  ATHA  >>>>  [ 0.036427952795   0.61111743447   0.81482324596   1.01852905745 ]
 

Sine of an anion
 

Formula:     Sin ( x0 + x1 e1 + .... + xN-1 eN-1 )  =  Sin x0 Cosh µ  + I ( Cos x0 ) ( Sinh µ )

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A         Sin A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  SINA  >>>>  [ 535.305877182   -103.93893751   -138.585250013   -173.231562516 ]
 

Cosine of an anion
 

Formula:     Cos ( x0 + x1 e1 + .... + xN-1 eN-1 )  =  Cos x0 Cosh µ  + I ( Sin x0 ) ( Sinh µ )

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Cos A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  COSA  >>>>  [ -244.986778585   -227.110721804   -302.814295738   -378.517869673 ]
 

Tangent of an anion
 

  Formula:    Tan A = ( Sin A ) ( Cos A ) -1
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Tan A

Example:        A =  4 + 3 i + 2 j + k

    [ 4  3  2  1 ]  TANA  >>>>  [ 0.0011129924136   0.801914456275   0.534609637516   0.267304818758 ]
 

Arc Sine
 

Formula:     If   A  =  x0 + x1 e1 + .... + xN-1 eN-1       ,       Arc Sin A     = - I  Arc Sinh ( A  I )         with a slight modification if  Re(a) = 0

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Asin A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  ASINA  >>>>  [ 0.27324624209   1.14193577233   1.52258102977   1.90322628722 ]
 

Arc Cosine
 

      ArcCos q = PI/2 - ArcSin q
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Acos A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  ACOSA  >>>>  [ 1.29755008471   -1.14193577233   -1.52258102977   -1.90322628722 ]
 

Arc Tangent
 

Formula:     If   A  =  x0 + x1 e1 + .... + xN-1 eN-1        ,           Arc Tan A     = - I  Arc Tanh ( A  I )         with a slight modification if  Re(a) = 0

    where  µ = ( x12 + ............... + xN-12 )1/2    and    I = ( x1 e1 + ............. + xN-1 eN-1 ) / µ
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Atan A

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  ATANA  >>>>  [ 1.53313188138   0.0557976194604   0.0743968259471   0.0929960324339 ]
 

Gudermannian Function
 

Definition:      Gd(A) = 2 ArcTan [ Tanh (A/2) ]
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Gd (A)

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  GDA  >>>>  [ 1.37871508722   0.0809051645136   0.107873552684   0.134841940856 ]
 

Inverse Gudermannian Function
 

Definition:      Agd(A) = 2 ArcTanh [ Tan (A/2) ]
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Agd (A)

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  AGDA  >>>>  [ 0.00154457947   0.666732348242   0.888976464322   1.11122058041 ]
 

Rectangular-Polar conversion of an Anion
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Pol (A)

Example:        A =  2 + 3 i + 4 j + 5 k

    [ 2  3  4  5 ]  POL  >>>>  [ 7.34846922834  74°2068309517  64°8959097498   51°3401917459 ]
 

-Here, we've assumed that your calculator is in DEG mode.
-POL works in all angular modes.
 

Polar-Rectangular conversion of an Anion
 
 
      STACK        INPUT      OUTPUT
       Level 1        Pol (A)            A

Example:       If we take the result above:

   [ 7.34846922834  74°2068309517  64°8959097498   51°3401917459 ]   REC  >>>>   [ 2  3  4  5 ]   ( with small roudoff-errors )

-Like POL , REC also works in all angular modes.
 

Product of 2 Quaternions
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             Q             /
       Level 1             Q'           Q Q'

Example:    Calculate the product of the quaternions:       q = 2 - 3i + 4j - 7k  and  q' = 1 - 4i + 2j + 5k

    [ 2  -3   4  -7 ]   ENTER
    [ 1  -4   2   5 ]     QxQ      gives   [ 17  23  51  13 ]
 

Rectangular-Polar Conversion of 2 Real Numbers
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             x             r
       Level 1             y             µ

Example:

    3   ENTER
    4     R->P     >>>>   r = 5  in level 2  and   µ =  53°1301023542

  R->P  works in all angular modes.
 

Polar-Rectangular Conversion of 2 Real Numbers
 

-Like R->P ,  P->R  uses  x = r cos µ  ,   y = r sin µ
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             r             x
       Level 1             µ             y

Example:

     5   ENTER
   53.1301023542   P->R  returns  3  in level 2  and  4 in level 1

 P->R  works in all angular modes.
 

Sign of Im(a)
 

-Simply returns the sign of the 1st component of Im(a)
-Returns 1 if Im(a) = 0
 

Solving an Anionic Equation
 

-The equation must be rewritten in the form:    f ( a ) = a
  and  f   must satisfy a Lipschitz condition   | f(a) - f(a') | < h | a - a' |   with  h < 1  ,   provided a and a' are close to a solution,
  then the sequence  an+1 = f ( an)  converges to a root.

-Place a small positive number in 'tol'
-In level 1, place a program that takes a in level 1 and returns f(a) in level 1
-Place an approximation in level 1 and press the key FXA

-The HP48 will display the successive approximations and eventually the ( or a ) solution in level 1
 
 
      STACK        INPUTS      OUTPUTS
       Level 2       <<  p  >>       <<  p  >>
       Level 1             a        Solution

   where  <<  p  >>  calculates f(a)

Example:        Find a solution of the octonionic equation    w2  - Ln w  + 1 + 0.9 e1 + 0.8 e2 + 0.7 e3 + 0.6 e4 + 0.5 e5 + 0.4 e6 + 0.3 e7 = 0

         near   1 + e1 + e2 + e3 + e4 + e5 + e6 + e7

1°) First, we re-write this equation:    w  =  ( Ln w  - 1 - 0.9 e1 - 0.8 e2 - 0.7 e3 - 0.6 e4 - 0.5 e5 - 0.4 e6 - 0.3 e7 ) 1/2  =  f ( w )

2°) Store a small number - say  2E-11 - in 'tol'

3°) Then,      <<  LNA  [ 1  .9  .8  .7  .6  .5  .4  .3 ]  -  2  INV  A­X  >>   ENTER
                                                                            [ 1  1  1  1  1  1  1  1 ]     FXA     returns eventually the solution

   [ 1.02254775914  -0.673000418404   -0.598222594136  -0.52344476987  -4486669456  -0.373889121331  -0.299111297064  -0.22433347297 ]
 

Anionic Polynomials
 

'peval'  evaluates  p(a) = cm am + cm-1 am-1 + ................ + c1 a + c0    for  a given anion a  and  (m+1) real numbers  cm , .............. , c1 , c0
 
 
      STACK        INPUT      OUTPUT
       Level 2    polynomial p            /
       Level 1             A          p (A)

Example:           a = 1 + 2 i + 3 j + 4 k        ,         p(a) = 6 a5 + 2 a4 + 3 a3 + 7 a2 + 4 a + 1

        [ 6  2  3  7  4  1 ]  ENTER
            [ 1  2  3  4 ]      peval         gives    [ 24383  6104  9156  12208 ]

-Whence,              p(a) = 24383 + 6104 i + 9156 j + 12208 k
 

Harmonic Numbers
 

"HRMA" calculates the generalized harmonic numbers defined as  Hm(a) = 1 + 2 -a + 3 -a + ............ + m -a
 
 
      STACK        INPUT      OUTPUT
       Level 2            m            /
       Level 1            A         Hm(a)

   where  m is a positive integer

Example:    Calculate  H12( 1 + 2 e1 + 3 e2 + 4 e3 + 5 e4 + 6 e5 + 7 e6 + 8 e7 )

 [ 1  2  3  4  5  6  7  8 ]  ENTER
                12                  HRMA  >>>>  [ 0.248285997  0.012575284  0.018862927  0.025150569
                                                                                        0.031438211  0.037725853  0.044013495  0.050301137 ]        ( rounded to 9D )

Whence:

   H12( 1 + 2 e1 + 3 e2 + 4 e3 + 5 e4 + 6 e5 + 7 e6 + 8 e7 )  =  0.248285998 + 0.012575285 e1 + 0.018862927 e2 + 0.025150570 e3
                                                                                           + 0.031438213 e4 + 0.037725855 e5 + 0.044013498 e6 + 0.050301140 e7
 

Gamma Function
 

-Here, the Gamma function is computed by a continued fraction:

    Gam(a) =  exp [ (a-1/2) Ln a + Ln (2.PI)1/2  - a + ( 1/12 )/( a + ( 1/30 )/( a + ( 53/210)/( a + (195/371)/( a + ...  )))) ]
 

-The relation   Gam(a+1) = a Gam(a)  is used recursively if Re(a) < 8  until   Re(a+1+.......+1)  > 8
 
 
      STACK        INPUT      OUTPUT
       Level 1             A     Gamma (A)

Example:        A = 4 + 3 i + 2 j + k

     [ 4  3  2  1 ]  GAMA  yields  [ 0.541968821216  -0.740334194929  -0.493556129954  -0.246778064977 ]
 

Digamma Function
 

Formula:             Psi(a) ~ Ln a - 1/(2a) -1/(12a2) + 1/(120a4) - 1/(252a6) + 1/(240a8)    is used if  Re(a) > 8

                        Psi(a+1) = Psi(a) + 1/a    is used recursively until  Re(a+1+....+1) > 8
 
 
      STACK        INPUT      OUTPUT
       Level 1             A        Psi (A)

Example:        A = 1 + 2 i + 3 j + 4 k

     [ 1  2  3  4 ]   PSIA  >>>>  [ 1.68653155606   0.548896351601   0.823344527405    1.09779270321 ]
 

Polygamma Functions
 

Formulae:     PSINA employs the asymptotic expansions:

  •   If m > 0  ,  y(m) (a)  ~  (-1)m-1 [ (m-1)! / am + m! / (2.am+1) + SUMk=1,2,.... B2k (2k+m-1)! / (2k)! / a2k+m       where  B2k are Bernoulli numbers

  •   If m = 0  ,  y (a)  ~  Ln a - 1/(2a) - SUMk=1,2,.... B2k / (2k) / a2k              ( digamma function )
 

 and the recurrence relation:   y(m) (a+p) = y(m) (a) + (-1)m m! [ 1/am+1 + ....... + 1/(a+p-1)m+1 ]           where  p  is a positive integer
 
 
      STACK        INPUT      OUTPUT
       Level 2            m            /
       Level 1            A       y(m) (a)

   where  m is a non-negative integer

Example:     m = 3   A =  1 + 0.9 i + 0.8 j + 0.7 k

                  3                ENTER
      [ 1  0.9  0.8  0.7 ]   PSINA    gives   [  -0.673649101  0.147195368   0.130840327   0.114485286 ]         ( rounded to 9D )
 

  whence    y(3) ( 1 + 0.9 i + 0.8 j + 0.7 k ) =  -0.673649101 + 0.147195368 i + 0.130840327 j + 0.114485286 k
 

Note:

 m = 0  will give the Digamma Function;
 

Riemann Zeta Function
 

 ZETAA  employs the method given by P. Borwein in  "An Efficient Algorithm for the Riemann Zeta Function"  if  Re(a) >= 1/2
-If  Re(a) < 1/2, it uses:     Zeta(a) = Zeta(1-a)  Pi  a-1/2  Gamma((1-a)/2) / Gamma(a/2)
 
 
      STACK        INPUT      OUTPUT
       Level 1             A       Zeta (A)

Example:        A = -7.6 + 7.7 i + 7.8 j + 7.9 k

     [ -7.6   7.7   7.8   7.9 ]   ZETAA  >>>>  [ 762.985293227  -14.26823184   -14.453533553   -14.638835265 ]
 

-Likewise,  Zeta( 1.1 + 7 i + 8 j + 9 k ) = 0.389296030446 - 0.027737070994 i - 0.0316995097084 j - 0.0356619484218 k

Note:

-The results are faster and more accurate if  Re(a) > 1/2
-Large execution times are to be expected for large imaginary parts.
 

Generalized Hypergeometric Functions
 

 HGFA computes   pFq( a1,a2,....,ap ; b1,b2,....,bq ; A ) =  SUMk=0,1,2,.....    [(a1)k(a2)k.....(ap)k] / [(b1)k(b2)k.....(bq)k] . Ak/k!             if  Level1 > 0

           where (ai)k = ai(ai+1)(ai+2) ...... (ai+k-1)   &  (ai)0 = 1    ,    likewise for  (bj)k    ( Pochhammer's symbol )

 or the regularized function F tilde:

           pF~q( a1,a2,....,ap ; b1,b2,....,bq ; A ) =  SUMk=0,1,2,.....    [(a1)k(a2)k.....(ap)k] / [Gam(k+b1) Gam(k+b2).....Gam(k+bq)] . ak/k!      if  Level2 < 0

    where Gam = Euler's Gamma function.
 
 
      STACK        INPUTS      OUTPUTS
  Level(3+p+q)            a1             /
      ............           ......             /
    Level (4+q)             ap             /
    Level (3+q)             b1             /
       ..........          .......             /
       Level 4             bq             /
       Level 3             A             /
       Level 2             p             /
       Level 1          +/- q           f(a)

  Level 1 =  +q  for the non-regularized HGF ,  Level 1 = -q  for the regularized  HGF

Example1:             a1 = PI  ,   a2 = e  ;  b1 = 1 ,  b2 = 2 ,   b3 = 4  ;   A = 1 + 2 i + 3 j + 4 k     the non-regularized function:

         PI
          1   E^X
          1   ENTER
          2   ENTER
          4   ENTER
  [ 1  2  3  4]   ENTER
          2   ENTER
          3   ENTER       HGFA    >>>>    [ -6.69112690456  1.30253058324    1.95379587484    2.60506116646 ]
 

  Whence      2F3( PI , e ; 1 , 2 , 4 ;  1 + 2 i + 3 j + 4 k ) = -6.69112690456 + 1.30253058324 i + 1.95379587484 j + 2.60506116646 k
 

Example2:             a1 = PI  ,   a2 = e  ;  b1 = 1 ,  b2 = 2 ,   b3 = 4  ;   A = 1 + 2 i + 3 j + 4 k     the regularized function:

         PI
          1   E^X
          1   ENTER
          2   ENTER
          4   ENTER
  [ 1  2  3  4]   ENTER
          2   ENTER
         -3   ENTER       HGFA    >>>>    [ -1.11518781743    0.217088430537    0.325632645804    0.434176861072 ]

    Whence     2F~3( PI , e ; 1 , 2 , 4 ;  1 + 2 i + 3 j + 4 k ) = -1.11518781743 + 0.217088430537 i + 0.325632645804 j + 0.434176861072 k

-The first result has been simply divided by  Gam(1) Gam(2) Gam(4) = 6
 

Example3:             a1 = PI  ,   a2 = e  ;  b1 = 1 ,  b2 = -2 ,   b3 = -4  ;   A = 1 + 2 i + 3 j + 4 k     the regularized function:

         PI
          1   E^X
          1   ENTER
         -2   ENTER
         -4   ENTER
  [ 1  2  3  4]   ENTER
          2   ENTER
         -3   ENTER       HGFA    >>>>    [ -2910223.71103  192140.227467   288210.341193   384280.454929 ]

    Whence     2F~3( PI , e ; 1 , -2 , -4 ;  1 + 2 i + 3 j + 4 k ) = -2910223.71103 + 192140.227467 i + 288210.341193 j + 384280.454929 k

Note:

  HGFA  is called as a subroutine by several other programs hereunder.
 

Legendre Functions - 1st kind - Type2
 

Formula:       Pnm(A) = (A+1)m/2/(1-A)m/2  2F~1(-n , n+1 ; 1-m ; (1-A)/2 )            (  A # 1 )                | A - 1 | < 2
 
 
      STACK        INPUTS      OUTPUTS
       Level 3            m             /
       Level 2             n             /
       Level 1             A        Pnm(A)

Example:            m = sqrt(2)    n = sqrt(3)       A = 0.4 + 0.5 i + 0.6 j + 0.7 k

     2   SQRT
     3   SQRT
 [ .4  .5  .6  .7 ]   ALF12   >>>>   [ -0.866899242816  -1.80896047218   -2.17075256661   -2.53254466106 ]

     So,     Psqrt(2)sqrt(3) ( 0.4 + 0.5 i + 0.6 j + 0.7 k ) = -0.866899242816 - 1.80896047218 i - 2.17075256661 j - 2.53254466106 k

Note:

-See also  PMN2A
 

Legendre Functions - 1st kind - Type3
 

Formula:       Pnm(A) = (A+1)m/2/(A-1)m/2  2F~1(-n , n+1 ; 1-m ; (1-A)/2 )            (  A # 1 )                | A - 1 | < 2
 
 
      STACK        INPUTS      OUTPUTS
       Level 3            m             /
       Level 2             n             /
       Level 1             A        Pnm(A)

Example:            m = sqrt(2)    n = sqrt(3)       A = 0.4 + 0.5 i + 0.6 j + 0.7 k

     2   SQRT
     3   SQRT
 [ .4  .5  .6  .7 ]   ALF13   >>>>   [ -2.49418306364    1.42452961118    1.70943553342   1.99434145566 ]

 Whence       Psqrt(2)sqrt(3) ( 0.4 + 0.5 i + 0.6 j + 0.7 k ) = -2.49418306364 + 1.42452961118 i + 1.70943553342 j + 1.99434145566 k

Note:

-See also  PMN3A
 

Legendre Functions - 2nd kind - Type2
 

Formula:

  Qnm(A) = 2m pi1/2   (A+1)-m/2/(1-A)-m/2 [ -Gam((1+m+n)/2)/(2.Gam((2-m+n)/2)) . sin pi(m+n)/2 .  2F1(-n/2-m/2 ; 1/2+n/2-m/2 ; 1/2 ; A2 )       | A | < 1
                                                                + A  Gam((2+n+m)/2) / Gam((1+n-m)/2) . cos pi(m+n)/2 . 2F1((1-m-n)/2 ; (2+n-m)/2 ; 3/2 ; A2 )  ]
 
 
      STACK        INPUTS      OUTPUTS
       Level 3            m             /
       Level 2             n             /
       Level 1             A        Qnm(A)

Example:             m = 0.4    n = 1.3       A = 0.1 + 0.2 i + 0.3 j + 0.4 k

      0.4   ENTER
      1.3   ENTER
     [ .1  .2  .3  .4 ]   ALF22   >>>>   [ -0.944581517232    -0.368022564874   -0.552033847312   -0.736045129748 ]

  Whence,       Q1.30.4( 0.1 + 0.2 i + 0.3 j + 0.4 k ) = -0.944581517232 - 0.368022564874 i - 0.552033847312 j - 0.736045129748 k
 

Legendre Functions - 2nd kind - Type3
 

    Qnm(A) =  exp( I (m.PI) ) 2 -n-1 sqrt(PI) Gam(m+n+1) A -m-n-1  (A+1)m/2/(A-1)m/22F~1( (2+m+n)/2 , (1+m+n)/2 ; n+3/2 ; 1/A2 )                 | A | > 1

                     where  I = Im(a) / | Im(a) |  multiplied by the sign of the 1st imaginary component of the anion  (  or  I = i  if  Im(a) = 0 )

-I've modified the 1st term  exp( i (m.PI) ) to generalize the definition to quaternions, octonions, .... but the results remain the same for the complexes.
 
 
      STACK        INPUTS      OUTPUTS
       Level 3            m             /
       Level 2             n             /
       Level 1             A        Qnm(A)

Example:               m = sqrt(2)    n = - sqrt(3)       A = 1 + 2 i + 3 j + 4 k

      2   SQRT
      3   SQRT   NEG
 [ 1  2  3  4 ]    ALF23   >>>>   [ -1.92629420143   0.74206199724    1.11309299586    1.48412399448 ]
 

    Whence       Qsqrt(2)-sqrt(3) ( 1 + 2 i + 3 j + 4 k ) = -1.92629420143 + 0.74206199724 i + 1.11309299586 j + 1.48412399448 k
 

Bessel Functions of the 1st kind
 

Formula:

       Jn(a) = (a/2)n [ 1/Gam(n+1)  +  (-a2/4)1/ (1! Gam(n+2) )  + .... + (-a2/4)k/ (k! Gam(n+k+1) ) + ....  ]      n # -1 ; -2 ; -3 ; ....
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n             /
       Level 1             A        Jn(A)

Example:        n = PI     A =  1 + 2 i + 3 j + 4 k

        PI
 [ 1  2  3  4 ]   JNA  >>>>   [ -11.2298751376   -3.57080149748    -5.35620224622    -7.14160299493 ]

Note:

 JNA  does not work if n is a negative integer, but we can employ the relation:      Jn  =  (-1)n  J-n   in this case.
 

Bessel Functions of the 2nd kind
 

Formulae:

     Yn(a) = ( Jn(a) cos(n(pi)) - J-n(a) ) / sin(n(pi))      ;       if    n # .... -3 ; -2 ; -1 ; 0 ; 1 ; 2 ; 3 ....           and if n is a non-negative integer:

     Yn(a) = -(1/pi) (a/2)-n SUMk=0,1,....,n-1  (n-k-1)!/(k!) (a2/4)k + (2/pi) ln(a/2) Jn(a)
                   - (1/pi) (a/2)n SUMk=0,1,.....  ( psi(k+1) + psi(n+k+1) ) (-a2/4)k / (k!(n+k)!)                         where   psi = the digamma function
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n             /
       Level 1             A        Yn(A)

Example1:         n = PI     a = 1 + 2 i + 3 j + 4 k

         PI
 [ 1  2  3  4 ]   YNA  >>>>   [ 9.61756409422   -4.17135883145    -6.25703824719    -8.34271766288 ]

Example2:         n = 3     a = 1 + 2 i + 3 j + 4 k

         3          ENTER
 [ 1  2  3  4 ]   YNA  >>>>   [ 7.69002723259   -5.22481266244    -7.83721899364    -10.4496253248 ]

Note:

 YNA  does not work if n is a negative integer, but we can employ the relation:      Jn  =  (-1)n  J-n   in this case.
 

Modified Bessel Functions of the 1st kind
 

Formula:

     In(a) = (a/2)n [ 1/Gam(n+1)  +  (a2/4)1/ (1! Gam(n+2) )  + .... + (a2/4)k/ (k! Gam(n+k+1) ) + ....  ]          n # -1 ; -2 ; -3 ; ....
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n             /
       Level 1             A        In(A)

Example:         n = PI     A =  1 + 2 i + 3 j + 4 k

        PI
 [ 1  2  3  4 ]   INA  >>>>   [  0.315197911272   -0.12998865977    -0.194982989655    -0.259977319538 ]

Note:

 INA  does not work if n is a negative integer, but we can employ the relation:      In  =  I-n   in this case.
 

Modified Bessel Functions of the 2nd kind
 

Formulae:            Kn(a) = (pi/2) ( I-n(a) - In(a) ) / sin(n(pi))           n # .... -3 ; -2 ; -1 ; 0 ; 1 ; 2 ; 3 ....             and if n is a non-negative integer:

          Kn(a) = (1/2) (a/2)-n SUMk=0,1,..,n-1  (n-k-1)!/(k!) (-a2/4)k - (-1)n ln(a/2) In(a)                                      where   psi = the digamma function
                    + (1/2) (-1)n (a/2)n SUMk=0,1,...( psi(k+1) + psi(n+k+1) ) (a2/4)k / (k!(n+k)!)
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n             /
       Level 1             A        Kn(A)

Example1:         n = PI     A =  1 + 2 i + 3 j + 4 k

        PI
 [ 1  2  3  4 ]   KNA  >>>>   [  0.203067063671   -0.0550308926914    -0.0825463390315    -0.110061785386 ]

Example2:         n = 3     a = 1 + 2 i + 3 j + 4 k

         3          ENTER
 [ 1  2  3  4 ]   KNA  >>>>   [ 0.20876779823   -0.0479831967675    -0.0719747951555    -0.09596639354 ]

Note:

 KNA  does not work if n is a negative integer, but we can employ the relation:      Kn  =  K-n   in this case.
 

Jacobian Elliptic Functions
 

"JEFA" employs Gauss' transformation to calculate  sn ( a | m )  ,  cn ( a | m )  &  dn ( a | m )

-If   m < 1 , we have:

-With  m' = 1-m ,  let be  µ = [ ( 1-sqrt(m') / ( 1+sqrt(m') ]2   and   v = a / ( 1+sqrt(µ) ]  , then:

   sn ( a | m ) = [ ( 1 + sqrt(µ) ) sn ( v | µ ) ] / [ 1 + sqrt(µ) sn2 ( v | µ ) ]
   cn ( a | m ) = [ cn ( v | µ ) dn ( v | µ ) ] / [ 1 + sqrt(µ) sn2 ( v | µ ) ]
   dn ( a | m ) = [ 1 - sqrt(µ) sn2 ( v | µ ) ] / [ 1 + sqrt(µ) sn2 ( v | µ ) ]

-These formulas are applied recursively until µ is small enough to use

   sn ( v | 0 ) = Sin v
   cn ( v | 0 ) = Cos v
   dn ( v | 0 ) = 1

-If m > 1, the program uses the relations:

      sn ( a | m ) = sn ( a m1/2 | 1/m ) / m1/2
      cn ( a | m ) = dn ( a m1/2 | 1/m )
      dn ( a | m ) = cn ( a m1/2 | 1/m )

-If m = 1:      sn ( a | m ) = tanh a ; cn ( a | m ) = dn ( a | m ) = sech a
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             /       sn ( a | m ) 
       Level 2             m       cn ( a | m )
       Level 1             a       dn ( a | m )

Example:        m = 1/PI   a = 1 + 2 i + 3 j + 4 k

        PI   INV
     [ 1  2  3  4 ]   JEFA  >>>>  [  1.49826225309     0.205407204568    0.308110806852     0.410814419143 ] = sn ( a | m )        in level 3

                                                [ -0.694940079527   0.442849491896    0.664274237842     0.885698983794 ] = cn ( a | m )        in level 2

                                                [ -0.719248898421   0.136199160986    0.204298741478     0.272398321974 ] = dn ( a | m )        in level 1
 

Weierstrass Elliptic Functions
 

-WEFA calculates the Weierstrass Elliptic Function  P(a;g2,g3)  by a Laurent series:

      P(a;g2;g3) = a -2 + c2.a2 + c3.a4 + ...... + ck.a2k-2 + ....

  where   c2 = g2/20  ;   c3 = g3/28  and   ck =  3 ( c2. ck-2 + c3. ck-3 + ....... + ck-2. c2 ) / (( 2k+1 )( k-3 ))      ( k > 3 )
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             g2             /
       Level 2             g3             /
       Level 1             a      P(a;g2;g3)

Example:        a = 0.2 + 0.3 i + 0.4 j + 0.5 k  ;   g2 = 0.9  ,   g3 = 1.4

          0.9   ENTER
          1.4   ENTER
    [ 0.2  0.3  0.4  0.5 ]   WEFA   >>>>  [ -1.59163727533   -0.411614082849    -0.548818776066    -0.686023470081 ]
 

   Whence,     P( 0.2 + 0.3 i + 0.4 j + 0.5 k  ;  0.9 ,  1.4 ) = -1.59163727533 - 0.411614082849 i - 0.548818776066 j - 0.686023470081 k
 

Weierstrass Duplication Formula
 

-If the argument a is too "large", the Laurent series don't converge.
-The duplication formula may be used one or several times in this case:

    P(2a) = -2 P(a) + ( 6 P2(a) - g2/2 )2 / ( 4 ( 4 P3(a) - g2 P(a) - g3 ) )
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             g2            g2
       Level 2             g3            g3
       Level 1      P(a;g2;g3)    P(2a ; g2;g3)

Example:     if you keep the previous result in level 1 and place 0.9  in level 3  and  1.4 in level 2,   WF2A  returns:
 

      P( 0.4 + 0.6 i + 0.8 j + k  ;  0.9 ,  1.4 ) = -0.37089210249 - 0.169841920212 i - 0.22645589363 j - 0.28306986701 k
 

Note:

-In fact, the Laurent series still converge for 2a   and a direct evaluation of P(2a) with "WEFA"  yields:

     P( 0.4 + 0.6 i + 0.8 j + k  ;  0.9 ,  1.4 ) = -0.370892102485 - 0.169841920211 i - 0.226455893616 j - 0.283069867019 k
 

Exponential Integral Ei(a)
 

Formula:        Ei(a)  = C + Ln(a) + Sumn=1,2,.....  an/(n.n!)                where  C = 0.577215664901... = Euler's constant.
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a          Ei(a)

Example:             a = 1 + 2 i + 3 j + 4 k

           [ 1  2  3  4 ]   EIA  >>>>   [ -0.381065061199   1.05205547601    1.57808321402    2.10411095203 ]
 

Exponential Integral En(a)
 

Formulae:

     En(a) = an-1 Gam(1-n) - [1/(1-n)]  1F1 ( 1-n , 2-n ; -a )                    if   n # 1 , 2 , 3 , ................     and otherwise:

     En(a) = (-a)n-1 ( -Ln a - gamma + Sumk=1,...,n-1 1/k ) / (n-1)!  - Sumk#n-1 (-a)k / (k-n+1) / k!      where  gamma = Euler's Constant = 0.577215664901...

     and   E0(a) = (1/a).exp(-a)
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n           /
       Level 1             a         En(a)

Example1:          Compute:  EPI( 1 + i/2 + j/3 + k/4 )

           PI
           1   ENTER
           2   INV
           3   INV
           4   INV    4   ->ARRY    ENA  >>>>  [ 0.06644432973   -0.05991613114    -0.03994408743    -0.02995806555 ]
 

Example2:          Compute:  E2( 1 + i/2 + j/3 + k/4 )

           2   ENTER
           1   ENTER
           2   INV
           3   INV
           4   INV    4   ->ARRY    ENA  >>>>  [ 0.082262051336   -0.087391297264    -0.058260864845    -0.043695648635 ]

Note:

-For large arguments, see the asymptotic expansion.
 

Sine Integral
 

Formula:           Si(a)  = Summ=0,1,2,..... (-1)m a2m+1/((2m+1).(2m+1)!)
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a          Si(a)

Example:             a = 1 + 2 i + 3 j + 4 k

           [ 1  2  3  4 ]   SIA  >>>>   [ 17.9895462386    7.07509628771    10.6126444315    14.1501925754 ]
 

Hyperbolic Sine Integral
 

Formula:           Shi(a) = Summ=0,1,2,.....  a2m+1/((2m+1).(2m+1)!)
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a          Shi(a)

Example:             a = 1 + 2 i + 3 j + 4 k

           [ 1  2  3  4 ]   SHIA  >>>>   [ -0.16077930696    0.52215386342    0.783230795127    1.04430772684 ]
 

Cosine Integral
 

Formula:           Ci(a)  = C + ln(a) + Summ=1,2,..... (-1)m a2m/(2m.(2m)!)                where  C = 0.577215664901... = Euler's constant.
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a          Ci(a)

Example:             a = 1 + 2 i + 3 j + 4 k

           [ 1  2  3  4 ]   CIA  >>>>   [ 19.049991783   -6.09801677188    -9.1470251578    -12.1960335438 ]
 

Hyperbolic Cosine Integral
 

Formula:           Chi(a)= C + ln(a) + Summ=1,2,.....  a2m/(2m.(2m)!)                        where  C = 0.577215664901... = Euler's constant.
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a          Chi(a)

Example:             a = 1 + 2 i + 3 j + 4 k

           [ 1  2  3  4 ]   CHIA  >>>>   [ -0.220285754239    0.529901612604    0.794852418908    1.05980322521 ]
 

Angular Spheroidal Wave Function of the 1st kind
 

-"SMNA" computes the angular spheroidal wave function of the first kind.
-Given  m , n  and c2 , the corresponding eigenvalue  l  may be calculated by LMN ( see the next program below )

-We assume that  | a | <= 1  and  Smn(a) is computed by      Smn(a) = ( 1 - a2 ) m/2   Sumk=0,1,.... dk ak

     with     (k+1)(k+2) dk+2 - [ k ( k + 2m + 1 ) - l + m ( m + 1 ) ] dk  - c2  dk-2 = 0
 

 Flammer's Scheme:           the coefficients are normalized as follows:

      d0 = Pnm(0)  =  2m sqrt(PI) / [ Gam((1-m-n)/2) Gam((2-m+n)/2 ]
      d1 = P'nm(0) = ( m + n ) 2m sqrt(PI) / [ Gam((2-m-n)/2) Gam((1-m+n)/2 ]
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a         Smn(a)

Example:        m = 0.2  ,  n = 0.6 ,  c2 = 1.7 ,  l = 2.24686665135     a = 0.1 + 0.2 i + 0.3 j + 0.4 k

     m , n , c2  and  l are to be stored in the variables 'L'  'M'  'N'  'C2'   ( they are already stored if you've used LMN below )

    [ 0.1  0.2  0.3  0.4 ]   SMNA  >>>>  [ 0.391049683319    0.161100167928    0.241650251888    0.322200335854 ]
 

-Whence     S( 0.1 + 0.2 i + 0.3 j + 0.4 k ) = 0.391049683319 + 0.161100167928 i + 0.241650251888 j + 0.322200335854 k

Note:

-l may be choosen arbitrarily, but the solution will not be regular for  a = 1
 

Calculating the eigenvalues
 

-Given m , n and c2  ,  store these real numbers into  'M'  'N'  'C2'  then press  LMN
-Your HP-48 will display the successive approximations and will finally store the eigenvalue l in the variable 'L'

-LMN solves the transcendental equation   U1(Lmn) + U2(Lmn) = 0   where    U1 & U2  are 2 continued fractions:

                                                 -brm                      -br-2m
   U1(Lmn) = grm - Lmn +    ---------------       ---------------   ..............
                                           gr-2m - Lmn +         gr-4m - Lmn +

                                                                                                                       r = n - m
                                     -br+2m                    -br+4m
   U2(Lmn) =           ---------------       ----------------   ..............
                               gr+2m - Lmn +         gr+4m - Lmn +

   with      brm  =  [ r.(r-1).(2m+r).(2m+r-1).c4 ] / [ (2m+2r-1)2.(2m+2r+1).(2m+2r-3) ]
   and      grm  =  (m+r).(m+r+1) + (c2/2).[ 1 - (4m2-1)/((2m+2r-1).(2m+2r+3)) ]
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a           Lmn

Example:        m = 0.2  ,  n = 0.6 ,  c2 = 1.7

-Store  these 3 numbers in the variables  'M'  'N'  'C2'  and press the  LMN  key.
-The successive approximations are displayed and finally, we get in level 1 and in 'L'  the eigenvalue  l = 2.24686665135

Notes:

 LMN  uses an iteration method to find the eigenvalue.
 It's only a first order method - therefore very slow.
 It involves 2 continued fractions that are computed "from right to left" with 12 terms
 ( 12 is stored in 'ITER' , modify this value to check if there is no significant change in the result )
 Of course, this is not the best way to calculate continued fractions...
 

Legendre Polynomials
 

Formulae:      n.Pn(a) = (2n-1).a.Pn-1(a) - (n-1).Pn-2(a)  ,  P0(a) = 1  ,  P1(a) = a
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n            /
       Level 1             a         Pn(a)

   Where  n is a non-negative integer

Example:    n = 7     a = 1 + i/2 + j/3 + k/4

      7   ENTER
      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   LEGA  >>>>  [ 36.2081958787   -51.5833728619    -34.3889152414   -25.7916864311 ]

 Whence        P7( 1 + i/2 + j/3 + k/4 ) =  36.2081958787 - 51.5833728619 i - 34.3889152414 j - 25.7916864311 k
 

Generalized Laguerre's Polynomials
 

Formulae:      L0(a) (A) = 1  ,   L1(a) (A) = a+1-A   ,    n Ln(a) (A) = (2.n+a-1-A) Ln-1(a) (A) - (n+a-1) Ln-2(a) (A)
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             a            /
       Level 2             n            /
       Level 1             A       Ln(a) (A)

   Where  n is a non-negative integer

Example:         a = sqrt(2)     a = 7     A = 1 + 2 i + 3 j + 4 k

         2             SQRT
         7             ENTER
 [ 1  2  3  4 ]    LANA   >>>>  [ 872.266128619    47.1252744791    70.6879117151     94.2505489557 ]
 

Chebyshev Polynomials - 1st kind
 

Formula:            Tn(a) = 2a.Tn-1(a) - Tn-2(a)   ;  T0(a) = 1  ;   T1(a) = a
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n            /
       Level 1             a         Tn(a)

   Where  n is a non-negative integer

Example:    n = 7     a = 1 + 2 i + 3 j + 4 k

          7           ENTER
 [ 1  2  3  4 ]   CHB1A   >>>>  [ -9524759   -1117678   -1676517   -2235356 ]
 

Chebyshev Polynomials - 2nd kind
 

Formula:     Un(a) = 2a.Un-1(a) - Un-2(a)  ;  U0(a) = 1  ;  U1(a) = 2a
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n            /
       Level 1             a         Un(a)

   Where  n is a non-negative integer

Example:    n = 7     a = 1 + 2 i + 3 j + 4 k

         7            ENTER
 [ 1  2  3  4 ]   CHB2A   >>>>  [ -18921448   -2198096    -3297144    -4396192 ]
 

Jacobi Polynomials
 

Formula:      P0(a;b) (A) = 1  ;   P1(a;b) (A) = (a-b)/2 + A (a+b+2)/2

        2n(n+a+b)(2n+a+b-2) Pn(a;b) (A) = [ (2n+a+b-1).(a2-b2) + A (2n+a+b-2)(2n+a+b-1)(2n+a+b) ] Pb-1(a;b) (A)
                                                              - 2(n+a-1)(n+b-1)(2n+a+b) Pn-2(a;b) (A)
 
 
      STACK        INPUTS      OUTPUTS
       Level 4             a            /
       Level 3             b            /
       Level 2             n            /
       Level 1             A      Pn(a;b) (A)

   Where  n is a non-negative integer

Example:         a = sqrt(2)     b = sqrt(3)    n = 7      A = 1 + i/2 + j/3 + k/4

      2   SQRT
      3   SQRT
      7   ENTER
      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   JCPA  >>>>  [ 143.530451353   -310.868160336   -207.245440222   -155.434080168 ]
 

UltraSpherical Polynomials
 

Formulae:      C0(a) (A) = 1  ;   C1(a) (A) = 2.a.A   ;    (n+1).Cn+1(a) (A) = 2.(n+a).A.Cn(a) (A) - (n+2a-1).Cn-1(a) (A)      if  a # 0

                      Cn(0) (A) = (2/n).Tn(A)
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             a            /
       Level 2             n            /
       Level 1             A       Cn(a) (A)

   Where  n is a non-negative integer

Example:         a = sqrt(2)       n = 7      A = 1 + i/2 + j/3 + k/4

      2   SQRT
      7   ENTER
      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   USPA  >>>>  [ 324.544396559   -689.588362439    -459.725574956    -344.794181217 ]

-Likewise,   C7(0) ( 1 + i/2 + j/3 + k/4 ) =  29.2455479617 - 33.2791035909 i - 22.1860690606 j - 16.6395517954 k
 

Associated Legendre Functions - 1st kind - Type2
 

-Though this is not always a polynomial, PMN2A is included here to remind that the indexes must be non-negative integers !
 

Formula:      (n-m) Pnm(a) = a (2n-1) Pn-1m(a) - (n+m-1) Pn-2m(a)

     Type 2                Pmm(a) = (-1)m (2m-1)!!   (1+a)m/2/(1-a)m/2                    where (2m-1)!! = (2m-1)(2m-3)(2m-5).......5.3.1
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             m            /
       Level 2             n            /
       Level 1             A       Pnm (A)

   Where m & n  are non-negative integers  with  m <= n

Example:      m = 3     n = 7      A = 1 + i/2 + j/3 + k/4

      3   ENTER
      7   ENTER
      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   PMN2A  >>>>  [ -12188.5394   -8670.12758288    -5780.08505523    -4335.06379145 ]

Note:

-See also  ALF12
 

Associated Legendre Functions - 1st kind - Type3
 

-Though this is not always a polynomial, PMN3A is included here to remind that the indexes must be non-negative integers !
 

Formula:      (n-m) Pnm(a) = a (2n-1) Pn-1m(a) - (n+m-1) Pn-2m(a)

    Type 3                Pmm(a) =   (2m-1)!!  (a+1)m/2/(a-1)m/2                    where (2m-1)!! = (2m-1)(2m-3)(2m-5).......5.3.1
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             m            /
       Level 2             n            /
       Level 1             A       Pnm (A)

   Where m & n  are non-negative integers  with  m <= n

Example:      m = 3     n = 7      A = 1 + i/2 + j/3 + k/4

      3   ENTER
      7   ENTER
      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   PMN3A  >>>>  [ 11285.9768571   -9363.4953345    -6242.33022303    -4681.74766728 ]

Note:

-See also  ALF13
 

Airy Functions
 

Formulae:

    Ai(a) =   f(a) - g(a)                             with            f(a) = [ 3 -2/3 / Gamma(2/3) ]  0F1( 2/3 ; a3/9 )
    Bi(a) = [ f(a) + g(a) ] sqrt(3)               and            g(a) = [ 3 -1/3 / Gamma(1/3) ]  0F1( 4/3 ; a3/9 )   a
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             /         Ai (a)
       Level 1             a         Bi (a)

Example:            a = 1 + i/2 + j/3 + k/4

      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   AIBIA  >>>>  [ 0.105299445258   -0.0784420741534    -0.0522947161026    -0.0392210370767 ]  = Ai(a)  in Level 2
                                                    [ 0.97346397687      0.394832414612        0.263221609742       0.197416207307   ]  = Bi(a) in Level 1
 

Thus,    Ai ( 1 + i/2 + j/3 + k/4 ) = 0.105299445258 - 0.0784420741534 i - 0.0522947161026 j - 0.0392210370767 k

 and     Bi ( 1 + i/2 + j/3 + k/4 ) = 0.97346397687 + 0.394832414612 i + 0.263221609742 j + 0.197416207307 k
 

Anger & Weber Functions
 

Formulae:
 

   Jn(a) = + (a/2) sin ( 90°n ) 1F~2( 1 ; (3-n)/2 , (3+n)/2 ; -a2/4 )           Anger's functions

                  + cos ( 90°n ) 1F~2( 1 ; (2-n)/2 , (2+n)/2 ; -a2/4 )

   En(a) = - (a/2) cos ( 90°n )  1F~2( 1 ; (3-n)/2 , (3+n)/2 ; -a2/4 )         Weber's functions

                    + sin ( 90°n ) 1F~2( 1 ; (2-n)/2 , (2+n)/2 ; -a2/4 )
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n         Jn(a)
       Level 1             a         En(a)

Example:            n = PI     a = 1 + 2 i + 3 j + 4 k        ( quaternion ->  4  STO 00 )

       PI
 [ 1  2  3  4 ]  ANWEB  >>>>   [ -11.2423489533   -3.56496842306    -5.34745263462    -7.12993684617 ]    =   Jn(a)  in level 2
                                                  [ -9.56681734549    4.17720489889     6.26580734852     8.35440979805 ]  =  En(a)  in level 1
 

-So,       JPi( 1 + 2 i + 3 j + 4 k ) = -11.2423489533 - 3.56496842306 i - 5.34745263462 j - 7.12993684617 k

 and      EPi( 1 + 2 i + 3 j + 4 k ) = -9.56681734549 + 4.17720489889 i + 6.26580734852 j + 8.35440979805 k
 

Catalan Numbers
 

-The Catalan numbers may be defined by  C(n) = 4n Gam(n+1/2) / [ sqrt(PI) Gam(n+2) ]
-This formula is used hereunder after replacing n by the anion a
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a         C (a)

Example:                  a = 1 + i/2 + j/3 + k/4

      1   ENTER
      2   INV
      3   INV
      4   INV
      4   ->ARRY   CATA  >>>>  [ 0.844036226146    0.2392994035    0.159532935665    0.119649701749 ]

-Thus,     C ( 1 + i/2 + j/3 + k/4 ) =  0.844036226146 + 0.2392994035 i + 0.159532935665 j + 0.119649701749 k
 

Chebyshev Functions - 1st kind
 

Formula:           Tm(cos A) = cos m.A                           with       cos A = a
 
 
      STACK        INPUTS      OUTPUTS
       Level 2            m            /
       Level 1             a         Tm (a)

Example:            m = PI                a = 0.1 + 0.2 i + 0.3 j + 0.4 k

               PI
  [ 0.1  0.2  0.3  0.4 ]   CHB1A   >>>>  [ -0.143159422166   -0.90509061839    -1.35763592759    -1.81018123679 ]

Note:

-See also Chebyshev polynomials 1st kind
 

Chebyshev Functions - 2nd kind
 

Formula:            Um(cos A) = [ sin (m+1).A ] / sin A                            with       cos A = a
m.A                           with       cos A = a
 
 
      STACK        INPUTS      OUTPUTS
       Level 2            m            /
       Level 1             a         Um (a)

Example:            m = PI                a = 0.1 + 0.2 i + 0.3 j + 0.4 k

               PI
  [ 0.1  0.2  0.3  0.4 ]   CHB2A   >>>>  [  -0.38619952444   -1.36969594746    -2.05454392121    -2.73939189494 ]

Note:

-See also Chebyshev polynomials 2nd kind
 

Parabolic Cylinder Functions
 

Formula:         Dn(a) = 2n/2 Pi1/2 exp(-a2/4) [ 1/Gam((1-n)/2)  1F1( -n/2 , 1/2 , a2/2 ) - 21/2 ( a / Gam(-n/2) ) M [ (1-n)/2 , 3/2 , a2/2 ]
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n            /
       Level 1             a         Dn(a)

Example:    n = 0.4      a = 1 + 1.1 i + 1.2 j + 1.3 k

          0.4                ENTER
[ 1  1.1  1.2  1.3 ]     DNA    >>>>  [ 2.60610510664   -0.969116886103    -1.0572184212    -1.1453199563 ]
 

Note:

-For large arguments, an asymptotic expansion is preferable.
 

Error Function
 

Formula:     erf a  = (2/pi1/2)  SUMn=0,1,2,.....  (-1)n a2n+1 / (n! (2n+1))
 
 
      STACK        INPUTS      OUTPUTS
       Level 1             a        erf (a)

Example:         a = 1 + 1.1 i + 1.2 j + 1.3 k

    [ 1  1.1  1.2  1.3 ]   ERFA   >>>>  [ -2.35599141278   -3.35826113621   -3.66355760278    -3.96885407044 ]
 

Whence,   Erf ( 1 + 1.1 i + 1.2 j + 1.3 k ) =  -2.35599141278 - 3.35826113621i - 3.66355760278 j - 3.96885407044 k
 

Generalized Error Function
 

GERFA calculates  erfm (a) = a  exp ( -am )  M ( 1 ; 1+1/m ; am )          where   M = Kummer's function
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             m            /
       Level 1             a        erfm (a)

Example:      m = sqrt(2)    a = 1.1 + 1.2 i + 1.3 j + 1.4 k

                2                 SQRT
  [ 1.1  1.2  1.3  1.4 ]  GERFA  returns  [ 1.205349651  -0.208378333   -0.225743194   -0.243108055 ]         ( rounded to 9D )

 Whence    erfm(a) = 1.205349651 - 0.208378333 i - 0.225743194 j - 0.243108055 k
 

Hermite Functions
 

Formula:       Hm(a) = 2m sqrt(PI) [ (1/Gam((1-m)/2))  M(-m/2,1/2,a2) - ( 2.a / Gam(-m/2) ) M((1-m)/2,3/2,a2) ]

     where  Gam = Gamma function
       and      M  = Kummer's function = 1F1
 
 
      STACK        INPUTS      OUTPUTS
       Level 2            m            /
       Level 1             a         Hm(a)

Example:        m = PI                   a = 1 + i/2 + j/3 + k/4

       PI
        1    ENTER
        2    INV
        3    INV
        4    INV
        4    ->ARRY   HMTA   >>>>    [ -17.8176048984    2.84549614163    1.89699742776    1.4227480708 ]
 

Incomplete Beta Functions
 

Formula:    Ba(p,q) = ( ap / p )  F(p,1-q;p+1;a)   where  F = the hypergeometric function
 
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             p            /
       Level 2             q            /
       Level 1             a       Ba(p,q)

Example:         Compute  B0.1+0.2i+0.3j+0.4k ( 0.7 , 1.8 )

                0.7                  ENTER
                1.8                  ENTER
   [ 0.1  0.2  0.3  0.4 ]      IBFA        [ 0.653131938  0.244542459   0.366813688   0.489084918 ]

-Whence,    B0.1+0.2i+0.3j+0.4k ( 0.7 , 1.8 ) = 0.653131938 + 0.244542459 i + 0.366813688 j + 0.489084918 k         ( rounded to 9D )

Note:

-In general, the hypergeometric series converge if  | a | < 1
 

Incomplete Gamma Functions
 

Formula:      g(m,a) = ( am / m ) exp(-a)  M(1,m+1;a)   where  M = Kummer's function
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             m            /
       Level 1             a        g(m,a)

Example:        Compute  g( 1.6 , 1 + 2 i + 3 j + 4 k )
 

                1.6            ENTER
         [ 1  2  3  4 ]      IGFA        [ 0.955358738  -0.390239935  -0.585359903  -0.780479870 ]           ( rounded to 9D )

-So,     g( 1.6 , 1 + 2 i + 3 j + 4 k ) = 0.955358738 - 0.390239935 i - 0.585359903 j - 0.780479870 k
 
 

Jacobi Functions
 

Formula:           Pm(a;b) (a) = [ Gam(a+m+1) / Gam(m+1) ]  2F~1 ( -m , a+b+m+1 , a+1 , (1-a)/2 )

                            where  2F~1  is the regularized hypergeometric function
 
 
      STACK        INPUTS      OUTPUTS
       Level 4            a            /
       Level 3            b            /
       Level 2            m            /
       Level 1             A      Pm(a;b) (A)

Example:        a = sqrt(2)    b = sqrt(3)    m = PI                 a = 1 + i / 2 + j / 3 + k / 4

        2   SQRT
        3   SQRT
        PI
        1    ENTER
        2    INV
        3    INV
        4    INV
        4    ->ARRY   JCFA   >>>>   [ -10.1439752498   11.7413999755    7.82759998364    5.87069998775 ]
 

-Likewise,   PPI(-4;+4) ( 1 + i/2 + j/3 + k/4 ) =  0.360213557888 - 0.125970280632 i - 0.0839801870903 j - 0.0629851403167 k
 

Laguerre's Functions
 

Formula:      Ln(a)(A) = [ Gam(a+n+1) / Gam(n+1) ]  1F~1 ( -n , a+1 , A )
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             a            /
       Level 2             n            /
       Level 1             A        Ln(a)(A)

Example:           a = sqrt(3)     n = PI     A = 1 + 2 i + 3 j + 4 k

       3   SQRT
      PI
 [ 1  2  3  4 ]   LANA  >>>>   [ -59.3766393554   3.13535567816    4.70303351732    6.27071135632 ]

Note:

-See also LANA
 

Lommel Functions - 1st kind
 

Formula:                  s(1)m,p(a)  = am+1 / [ (m+1)2 - p21F2 ( 1 ; (m-p+3)/2 , (m+p+3)/2 ; -a2/4 )
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             m            /
       Level 2             p            /
       Level 1             a       s(1)m,p(a)

Example:         m = sqrt(2)    ,    p = sqrt(3)    ,         a = 1 + 1.1 i + 1.2 j + 1.3 k

            2   SQRT
            3   SQRT
   [ 1  1.1  1.2  1.3 ]  LOM1A  >>>>  [ -2.55566311832    1.08164201813    1.17997311069    1.27830420324 ]
 

Lommel Functions - 2nd kind
 

Formula:

    s(2)m,p(a)  = am+1 / [ (m+1)2 - p21F2 ( 1 ; (m-p+3)/2 , (m+p+3)/2 ; a2/4 )
                    + 2m+p-1 Gam(p) Gam((m+p+1)/2) a -p / Gam((-m+p+1)/2) 0F1 ( ; 1-p ; -a2/4 )
                    + 2m-p-1 Gam(-p) Gam((m-p+1)/2) ap / Gam((-m-p+1)/2) 0F1 ( ; 1+p ; -a2/4 )

   where  pFq is the generalized hypergeometric function and Gam is the Euler Gamma function.
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             m            /
       Level 2             p            /
       Level 1             a       s(2)m,p(a)

Example:         m = sqrt(2)    ,    p = sqrt(3)    ,         a = 1 + 1.1 i + 1.2 j + 1.3 k

            2   SQRT
            3   SQRT
   [ 1  1.1  1.2  1.3 ]  LOM2A  >>>>  [ 1.46174379927   -0.935738233153    -1.02080534526    -1.10587245735 ]
 

Regular Coulomb Wave Functions
 

Formulae:         FL(h,a) = CL(h) a L+1 Sum k>L AkL (h) a k-L-1

    with   CL(h) = (1/Gam(2L+2)) 2L e -pi.h/2 | Gam(L+1+i.h) |
    and    AL+1L = 1 ;  AL+2L = h/(L+1)  ;  (k+L)(k-L-1) AkL = 2.h Ak-1L - Ak-2L   ( k > L+2 )
 

-"RCWFA" also uses   | Gam( 1+i y ) |2 = (Pi.y) / Sinh (Pi y)
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             L            /
       Level 2            h            /
       Level 1             a       FL(h,a)

  Where  L  is a non-negative integer.

Example:            L = 2  ,   h = 0.75  ;   a = 1 + 1.2 i + 1.4 j + 1.6 k

        2    ENTER
     0.75  ENTER
 [ 1  1.2  1.4  1.6 ]   RCWFA   >>>>  [ -0.478767860363    -0.179694771644    -0.209643900251    -0.239593028859 ]
 

-So,   F2( 0.75 ;  1 + 1.2 i + 1.4 j + 1.6 k ) = -0.478767860363 - 0.179694771644 i - 0.209643900251 j - 0.239593028859 k
 

Struve Function H
 

Formula:           Hm(a) = (a/2)m+1 1F~2( 1 ; 3/2 , m + 3/2 ; - a2/4 )
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             m            /
       Level 1             a         Hm(a)

Example:              m = PI     a = 1 + 2 i + 3 j + 4 k

        PI
[ 1  2  3  4 ]    STRHA   >>>>  [ 8.54663322308   -4.08507993257    -6.12761989891    -8.17015986517 ]
 

Struve Function L
 

Formula:               Lm(a) = (a/2)m+1 1F~2( 1 ; 3/2 , m + 3/2 ;  a2/4 )
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             m            /
       Level 1             a         Lm(a)

Example:              m = PI     a = 1 + 2 i + 3 j + 4 k

        PI
[ 1  2  3  4 ]    STRLA   >>>>  [ 1.86458278424   -0.116220198782    -0.174330298178   -0.232440397571 ]
 

Toronto Functions
 

Formula:              T(m,n;a) = exp(-a2) [ Gam((m+1)/2) ] a2n-m+11F~1( (m+1)/2 , n+1 , a2 )
 
 
      STACK        INPUTS      OUTPUTS
       Level 3            m            /
       Level 2            n            /
       Level 1             a      T(m,n;a)

Example:        m = sqrt(2)    n = sqrt(3)                  a = 1 + i / 2 + j / 3 + k / 4

       2   SQRT
       3   SQRT
       1    ENTER
       2    INV
       3    INV
       4    INV
       4    ->ARRY   TORA   >>>>  [ 0.321293450074    0.465223021825    0.310148681216    0.232611510913 ]
 

UltraSpherical Functions
 

Formula:    Assuming  l # 0

          Cm(l)(a) = [ Gam(m+2l) / Gam(m+1) / Gam(2.l) ]  2F1( -m , m+2l , m+1/2 , (1-a)/2 )

                     where  2F1 is the hypergeometric function and Gam = Gamma function
 
 
      STACK        INPUTS      OUTPUTS
       Level 3            l            /
       Level 2            m            /
       Level 1             a       Cm(l)(a)

Example:         l = sqrt(2)    m = sqrt(3)    a = 1 + i / 2 + j / 3 + k / 4

       2   SQRT
       3   SQRT
       1    ENTER
       2    INV
       3    INV
       4    INV
       4    ->ARRY    USFA   >>>>  [ 3.24111551742    4.84827789839    3.23218526561    2.4241389492 ]

Note:

-See also  USPA
 

Whittaker's M-Function
 

Formula:

    Mq,p(a) = exp(-a/2)  ap+1/2  M( p-q+1/2 , 1+2p , a )               where  M = Kummer's functions
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             q            /
       Level 2             p            /
       Level 1             a       Mq,p(a)

Example:            q = sqrt(2)   p = sqrt(3)    a = 0.4 + 0.5 i + 0.6 j + 0.7 k
 

                 2                         SQRT
                 3                         SQRT
  [ 0.4  0.5  0.6  0.7 ]           WHIMA     gives   [ -0.807065422   0.373202939   0.447843527   0.522484114 ]          ( rounded to 9D )
 

Whittaker's W-Function
 

Formula:

  Wq,p(a) = [ Gam(2p) / Gam(p-q+1/2) ]  Mq,-p(a) + [ Gam(-2p) / Gam(-p-q+1/2) ]  Mq,p(a)   assuming  2p is not an integer.
 
 
      STACK        INPUTS      OUTPUTS
       Level 3             q            /
       Level 2             p            /
       Level 1             a       Wq,p(a)

Example:            q = sqrt(2)   p = sqrt(3)    a = 0.4 + 0.5 i + 0.6 j + 0.7 k
 

                 2                         SQRT
                 3                         SQRT
  [ 0.4  0.5  0.6  0.7 ]           WHIWA     [ 2.275449625  -1.129250837  -1.355101005  -1.580951172 ]              ( rounded to 9D )

Whence,        Wq,p(a)  = 2.275449625 - 1.129250837 i - 1.355101005 j - 1.580951172 k

Note:

-"WHIWA" does not work if 2.p is an integer.
 

Parabolic Cylinder Functions - Asymptotic Expansion
 

-For large arguments, ascending series give poor accuracy or even meaningless results !
-Asymptotic expansions are preferable:
 

Formula:    Dn(a)  ~  an exp(-a2/4) [ 1 - n(n-1) / ( 2 a2 ) + n(n-1)(n-2)(n-3) / ( 2 ( 4 a4 ) ) - ....... ]
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n            /
       Level 1             a         Dn(a)

Example:          n  = PI       a = 1 + 2 i + 3 j + 4 k

       PI
[ 1  2  3  4 ]   DNA  >>>>     [ -33138.8727246    93318.1512975   139977.226946    186636.302594 ]
 

Notes:

-An infinte loop will occur if a is too small.
-However, this program may also be used if a is relatively small when n is a positive integer.
 

Exponential Integral En(a) - Asymptotic Expansion
 

Formula:     En(a) ~  (1/a) exp(-a)  2F0(1,n;;-1/a)
 
 
      STACK        INPUTS      OUTPUTS
       Level 2             n            /
       Level 1             a         En(a)

Example:          n = PI   ,    a = 41 + 42 i + 43 j + 44 k

             PI
 [ 41  42  43  44 ]    ENA   >>>>   [ 1.78948114456 10 -20   -1.31507219874 10 -21    -1.34638344156 10 -21    -1.37769468439 10 -21 ]

Notes:

-If the argument a is too "small" , the series will diverge too soon.
-However, it may also work with small arguments if  n is a negative integer.
-For instance, it returns correctly:

         E -2( 1 + 2 i + 3 j + 4 k ) = 0.047465815362  - 0.0202055335051 i - 0.0303083002577 j - 0.0404110670101 k

Remarks:

-These programs only deal with a few special functions.
-They might be completed by many others.
-Since most of the special functions may be expressed in terms of hypergeometric functions,
  the routine  HGFA  is quite useful !
 
 

References:

[1]   Abramowitz and Stegun - "Handbook of Mathematical Functions" -  Dover Publications -  ISBN  0-486-61272-4
[2]   http://functions.wolfram.com/
[3]   Warren D. Smith - Quaternions, Octonions, 16-ons & 2^n-ons, new kinds of numbers