Post Reply 
(71B) Bessel function for the HP-71B
08-19-2016, 02:42 PM (This post was last modified: 06-15-2017 01:39 PM by Gene.)
Post: #1
(71B) Bessel function for the HP-71B
Here is a BASIC program that calculates the Bessel functions of the first kind for any integer order n and value x:

Code:
10 RECURSIVE BESSEL
20 DIM T(100)
30 INTEGER K, M, P
40 INPUT "ENTER X? ";X
50 INPUT "ENTER N? ";N
60 A= 7.34
70 IF N>X THEN Y=N ELSE Y=X
80 M=INT(1 + 3 * x ^ (1 / 12) + 9 * x ^ (1 / 3) + Y)
90 T(M+1)=0
100 T(M)=A
110 FOR K=M TO 1 STEP -1
120 T(K-1) = 2*K/X*T(K) - T(K+1)
130 NEXT K
140 P = INT(M/2)
150 S=0
160 FOR K=1 TO P
170 S = S + T(2*K)
180 NEXT K
190 S = T(0) + 2 * S
200 DISP "BESSEL = ";T(N)/S
210 END

The above code is based on the algorithm used in HP-65 Math Pac II to calculate the Bessel function Jn(x).
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)