Debye Functions for the HP-41
Overview
-The following program computes db(x;n) = §x+infinity tn/(et-1).dt where n is a positive integer and x > 0
Formula: db(x;n) = Sum k>0
e-k.x [ xn/k + n.xn-1/k2 +
..... + n!/kn+1 ]
Program Listing
Data Registers: /
Flags: /
Subroutines: /
01 LBL "DEBYE"
02 CLA 03 STO M 04 X<>Y 05 STO N 06 CLST 07 LBL 01 08 R^ 09 1 |
10 +
11 RCL M 12 RCL N 13 STO P 14 Y^X 15 RCL Y 16 / 17 ENTER^ 18 LBL 02 |
19 RCL P
20 * 21 R^ 22 / 23 RCL M 24 / 25 ST+ Y 26 DSE P 27 GTO 02 |
28 X<> T
29 RCL M 30 * 31 E^X 32 / 33 RCL O 34 + 35 STO O 36 LASTX |
37 X#Y?
38 GTO 01 39 RCL M 40 SIGN 41 X<> N 42 X<>Y 43 CLA 44 END |
( 72 bytes / SIZE 000 )
STACK | INPUTS | OUTPUTS |
Y | n | n |
X | x | db(x,n) |
L | / | x |
n = a positive integer ; x > 0
Example:
3 ENTER^
0.7 XEQ "DEBYE" >>>> db( 0.7
; 3 ) = 6.406833597 ( 55 seconds )
Note:
-We also have db(0;n) = §0+infinity
tn/(et-1).dt = n! Zeta(n+1)
where "Zeta" is the Riemann Zeta Function.
Reference:
[1] Abramowitz and Stegun , "Handbook of Mathematical Functions"
- Dover Publications - ISBN 0-486-61272-4