Whittaker

# Whittaker's Functions for the HP-41

Overview

1°)  First Kind:    Mk,m(x)
2°)  Second Kind:     Wk,m(x)

1°)  First Kind

-Whittaker's function  Mk,m(x) is defined by

Mk,m(x) = xm+1/2  e -x/2  M(m-k+1/2,2m+1,x)

where  M(a,b,x) = Kummer's function.

Data Registers:  R00 = x    R01-R02: temp
Flags: /
Subroutine:   "KUM"  ( cf "Kummer's Function for the HP-41" )

 01  LBL "WHIM"  02  STO 01  03  RDN  04  ST+ X  05  1  06  +  07  STO 02  08  2  09  /  10  X<>Y  11  -  12  X<> 01  13  XEQ "KUM"  14  RCL 00  15  2  16  /  17  CHS  18  E^X  19  *  20  RCL 00  21  RCL 02  22  2  23  /  24  Y^X  25  *  26  END

( 41 bytes / SIZE 003 )

 STACK INPUTS OUTPUTS Z k / Y m / X x Mk,m(x)

Example:

2   SQRT
3   SQRT
PI   XEQ "WHIM"  >>>>  Msqrt(2),sqrt(3)(PI) = 5.612426206              ---Execution time = 12s---

2°)  Second Kind

-Whittaker's function of the second kind  Wk,m(x) is defined by

Wk,m(x) =  [ Gam(-2m) / Gam(-m-k+1/2) ]  Mk,m(x) + [ Gam(2m) / Gam(m-k+1/2) ]  Mk,-m(x)        provided  2m is not an integer.

Data Registers:  R00 = x    R01-R07: temp
Flags: /
Subroutines:   "WHIM"  listed above  &  "GAM" or "GAM+" ....  ( cf "Gamma Function for the HP-41" )

 01  LBL "WHIW" 02  RDN 03  STO 03 04  X<>Y 05  STO 04 06  X<>Y 07  R^ 08  XEQ "WHIM" 09  STO 07 10  RCL 01 11  STO 05 12  RCL 03 13  ST+ X 14  STO 06 15  - 16  XEQ "GAM" 17  ST/ 07 18  RCL 06 19  CHS 20  XEQ "GAM"  21  ST* 07 22  RCL 04 23  RCL 03 24  CHS 25  RCL 00 26  XEQ "WHIM" 27  STO 04 28  RCL 05 29  XEQ "GAM" 30  ST/ 04 31  RCL 06 32  XEQ "GAM" 33  RCL 04          34  * 35  RCL 07 36  + 37  END

( 76 bytes / SIZE 008 )

 STACK INPUTS OUTPUTS Z k / Y m / X x Wk,m(x)

where  2m is not an integer.

Example:

2   SQRT
3   SQRT
PI   XEQ "WHIW"  >>>>  Wsqrt(2),sqrt(3)(PI) = 2.177593415                 ---Execution time = 34s--

-The last decimal depends on the version of "GAM" that you are using.

References:

[1]   Abramowitz and Stegun - "Handbook of Mathematical Functions" -  Dover Publications -  ISBN  0-486-61272-4
[2]   http://functions.wolfram.com/