hp41programs

Appell

Appell Hypergeometric Functions for the HP-41


Overview
 

 1°)  Appell Hypergeometric Function F1
 2°)  Appell Hypergeometric Function F2
 3°)  Appell Hypergeometric Function F3
 4°)  Appell Hypergeometric Function F4

-These are functions of 2 variables x , y  defined by double series.
 

1°)  Appell Hypergeometric Function F1
 

-The Appell hypergeometric function F1 is defined by:

   F1( a , b , b' , c ; x , y ) = Summ,n=0 to infinity   [ (a)m+n (b)m (b')n / (c)m+n ]  ( xm / m! ) ( yn /n! )

   where  (a)k = a(a+1)(a+2).....(a+k-1)   if  k > 0  and  (a)0 = 1       ( Pochhammer symbol )
 

Data Registers:      R00 & R05 to R09: temp                        ( Registers R01 thru R04 are to be initialized before executing "APLF1" )

                             •  R01 = a      •  R02 = b     •  R04 =  c
                                                   •  R03 = b'
Flags: /
Subroutines: /
 
 

01  LBL "APLF1"
02  STO 06
03  X<>Y
04  STO 07
05  CLX
06  STO 08
07  STO 09
08  SIGN
09  STO 00
10  SIGN
11  LBL 01
12  LASTX
13  RCL 08
14  RCL 09        
15  +
16  STO 05
17  RCL 01
18  +
19  *
20  RCL 04
21  RCL 05
22  +
23  /
24  RCL 02
25  RCL 08
26  ST+ Y
27  ISG X
28  CLX
29  STO 08        
30  /
31  *
32  RCL 06
33  *
34  +
35  X#Y?
36  GTO 01
37  CLX
38  STO 08
39  X<> 00
40  RCL 01
41  RCL 09        
42  +
43  *
44  RCL 03
45  RCL 09
46  +
47  *
48  RCL 04
49  RCL 09
50  ST+ Y
51  ISG X
52  CLX
53  STO 09        
54  *
55  /
56  RCL 07
57  *
58  STO 00
59  +
60  X#Y?
61  GTO 01
62  END
 

 
    ( 79 bytes / SIZE 010 )
 
 

        STACK          INPUTS      OUTPUTS
             Y               y         F1(x,y) 
             X               x         F1(x,y)

 
Example:      With   a = sqrt(2)   b = sqrt(3)   b' = sqrt(5)   c = sqrt(6)        ( to be stored into  R01 thru R04 )

  0.2  ENTER^
  0.1  XEQ "APLF1"  >>>>  F1( 21/2 , 31/2 , 51/2 , 61/2 , 0.1 , 0.2 )  = 1.489564421          ---Execution time = 73s---

Note:

-The series is convergent if   Max { | x | , | y | }  <  1
 

2°)  Appell Hypergeometric Function F2
 

-The Appell hypergeometric function F2 is defined by:

   F2( a , b , b' , c , c' ; x , y ) = Summ,n=0 to infinity   [ (a)m+n (b)m (b')n / (c)m (c')n ]  ( xm / m! ) ( yn /n! )
 
 

Data Registers:      R00 & R06 to R09: temp                       ( Registers R01 thru R05 are to be initialized before executing "APLF2" )

                             •  R01 = a      •  R02 = b     •  R04 =  c
                                                   •  R03 = b'    •  R05 =  c'
Flags: /
Subroutines: /
 
 

01  LBL "APLF2"
02  STO 06
03  X<>Y
04  STO 07
05  CLX
06  STO 08
07  STO 09
08  SIGN
09  STO 00
10  SIGN
11  LBL 01
12  LASTX
13  RCL 01
14  RCL 08         
15  +
16  RCL 09
17  +
18  *
19  RCL 02
20  RCL 08
21  +
22  *
23  RCL 04
24  RCL 08
25  ST+ Y
26  ISG X
27  CLX
28  STO 08         
29  *
30  /
31  RCL 06
32  *
33  +
34  X#Y?
35  GTO 01
36  CLX
37  STO 08
38  X<> 00
39  RCL 01
40  RCL 09         
41  +
42  *
43  RCL 03
44  RCL 09
45  +
46  *
47  RCL 05
48  RCL 09
49  ST+ Y
50  ISG X
51  CLX
52  STO 09
53  *
54  /
55  RCL 07         
56  *
57  STO 00
58  +
59  X#Y?
60  GTO 01
61  END
 

 
    ( 78 bytes / SIZE 010 )
 
 

        STACK          INPUTS      OUTPUTS
             Y               y         F2(x,y) 
             X               x         F2(x,y)

 
Example:      With   a = sqrt(2)   b = sqrt(3)   b' = sqrt(5)   c = sqrt(6)   c' = sqrt(7)        ( to be stored into  R01 thru R05 )

  0.2  ENTER^
  0.1  XEQ "APLF2"  >>>>  F2( 21/2 , 31/2 , 51/2 , 61/2 , 71/2  ; 0.1 , 0.2 )  = 1.481853808          ---Execution time = 92s---

Note:

-The series is convergent if    | x | + | y |  <  1
 

3°)  Appell Hypergeometric Function F3
 

-The Appell hypergeometric function F3 is defined by:

   F3( a , a' , b , b' , c ; x , y ) = Summ,n=0 to infinity   [ (a)m (a')n (b)m (b')n / (c)m+n ]  ( xm / m! ) ( yn /n! )
 
 

Data Registers:      R00 & R06 to R09: temp                     ( Registers R01 thru R05 are to be initialized before executing "APLF3" )

                              •  R01 = a      •  R03 = b     •  R05 =  c
                              •  R02 = a'     •  R04 = b'
Flags: /
Subroutines: /
 
 

01  LBL "APLF3"
02  STO 06
03  X<>Y
04  STO 07
05  CLX
06  STO 08
07  STO 09
08  SIGN
09  STO 00
10  SIGN
11  LBL 01
12  LASTX
13  RCL 01
14  RCL 08         
15  +
16  *
17  RCL 05
18  RCL 08
19  +
20  RCL 09
21  +
22  /
23  RCL 03
24  RCL 08
25  ST+ Y
26  ISG X
27  CLX
28  STO 08         
29  /
30  *
31  RCL 06
32  *
33  +
34  X#Y?
35  GTO 01
36  CLX
37  STO 08
38  X<> 00
39  RCL 02
40  RCL 09         
41  +
42  *
43  RCL 04
44  RCL 09
45  +
46  *
47  RCL 05
48  RCL 09
49  ST+ Y
50  ISG X
51  CLX
52  STO 09
53  *
54  /
55  RCL 07         
56  *
57  STO 00
58  +
59  X#Y?
60  GTO 01
61  END
 

 
    ( 78 bytes / SIZE 010 )
 
 

        STACK          INPUTS      OUTPUTS
             Y               y         F3(x,y) 
             X               x         F3(x,y)

 
Example:      With   a = sqrt(2)   a' = sqrt(3)   b = sqrt(5)   b' = sqrt(6)   c = sqrt(7)        ( to be stored into  R01 thru R05 )

  0.2  ENTER^
  0.1  XEQ "APLF3"  >>>>  F3( 21/2 , 31/2 , 51/2 , 61/2 , 71/2  ; 0.1 , 0.2 )  = 1.600873822          ---Execution time = 62s---

Note:

-The series is convergent if    Max { | x | , | y | }  <  1
 

4°)  Appell Hypergeometric Function F4
 

-The Appell hypergeometric function F4 is defined by:

   F4( a , b , c , c' ; x , y ) = Summ,n=0 to infinity   [ (a)m+n (b)m+n / ( (c)m (c')n) ]  ( xm / m! ) ( yn /n! )
 
 

Data Registers:      R00 & R05 to R09: temp                        ( Registers R01 thru R04 are to be initialized before executing "APLF4" )

                             •  R01 = a      •  R02 = b     •  R03 =  c
                                                                        •  R04 = c'
Flags: /
Subroutines: /
 
 

01  LBL "APLF4"
02  STO 06
03  X<>Y
04  STO 07
05  CLX
06  STO 08
07  STO 09
08  SIGN
09  STO 00
10  SIGN
11  LBL 01
12  LASTX
13  RCL 08
14  RCL 09         
15  +
16  STO 05
17  RCL 01
18  +
19  *
20  RCL 02
21  RCL 05
22  +
23  *
24  RCL 03
25  RCL 08
26  ST+ Y
27  ISG X
28  CLX
29  STO 08         
30  *
31  /
32  RCL 06
33  *
34  +
35  X#Y?
36  GTO 01
37  CLX
38  STO 08
39  X<> 00
40  RCL 01
41  RCL 09         
42  +
43  *
44  RCL 02
45  RCL 09
46  +
47  *
48  RCL 04
49  RCL 09
50  ST+ Y
51  ISG X
52  CLX
53  STO 09         
54  *
55  /
56  RCL 07
57  *
58  STO 00
59  +
60  X#Y?
61  GTO 01
62  END
 

 
    ( 79 bytes / SIZE 010 )
 
 

        STACK          INPUTS      OUTPUTS
             Y               y         F4(x,y) 
             X               x         F4(x,y)

 
Example:      With   a = sqrt(2)   b = sqrt(3)   c = sqrt(5)   c' = sqrt(6)        ( to be stored into  R01 thru R04 )

  0.2  ENTER^
  0.1  XEQ "APLF4"  >>>>  F4( 21/2 , 31/2 , 51/2 , 61/2 , 0.1 , 0.2 )  = 1.490926825          ---Execution time = 149s---

Notes:

-The series is convergent if    | x |1/2 + | y |1/2  <  1

-All these double series are special cases of "Kampé de Fériet" functions and may be computed by "KdF"
 ( cf "Kampé de Fériet Functions for the HP-41" )
 
 

References:

[1]   http://mathworld.wolfram.com/AppellHypergeometricFunction.html
[2]   http://functions.wolfram.com/

-A treasure-trove! Thousands of formulae that may be downloaded freely!