The Museum of HP Calculators


Bessel Function Jn(x) for the HP-65

This program is Copyright © 1974 by Hewlett-Packard and is used here by permission. This program was originally published in the HP-65 Math Pac 2.

This program is supplied without representation or warranty of any kind. Hewlett-Packard Company and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Card Labels

Bessel Function Jn(x)

Label

Jn(x)

       

       

   

   

Key

A

B

C

D

E

Overview

This program computes the value of the Bessel function Jn(x) by using a numerical method which makes use of the recurrence relation

          Jn-1(x) = 2n/x * Jn(x) - Jn+1(x)

the summation relation

          J0(x) + 2 * SUM(1=1..infinity) J2i(x) = 1

and the fact that

          limn->infinityJn(x) = 0

First let

          m = INT { 1 + 3x1/12 + 9x1/3 + max(n,x)}

where INT means "integer part of''.

Then set

          Tm = a            Tm+1 = 0

where a is an arbitrary non-zero constant.

Then the series of terms, Tk, 0 <= k <= m, is computed by successively applying the relation

          Tk-1(x) = 2k/x * Tk(x) - Tk+1(x)

starting with k = m.

Jn(x) is then found by dividing the term Tn(x) by the normalizing constant

          K = T0(x) + 2 SUM(i=1..p) T2i(x)

where

          p = m/2    if m is even or
          p - (m-1)/2    if m is odd

Note that all the Tk are proportional to a, hence K and the result are independent of a.

Note: J0(x) = 1 for x <= 10-6 but it is out of range for this program.

Instructions

Step

Instructions

Input Data/Units

Keys

Output Data/Units

1

Enter Program

     

2

 

 n

ENTER

 

3

 

x

A

Jn(x)

Examples

1. J0(4.7) = -0.27
2. J5(9.2) = -0.10

The Program

 CODE  KEYS
33 01  STO 1
   43  EEX
   42  CHS
   09  9 
   09  9
33 06  STO 6
   00  0
33 03  STO 3
33 04  STO 4
35 09  g roll up
33 05  STO 5
35 22  g x<=y
   22  GTO
   01  1
   35  g
   04  1/x
   61  +
   35  g
   05  yx
   02  2
   71  x
35 07  g x<>y 
35 22  g x<=y 
   44  CLX
   84  R/S

   23  LBL
   01  1
34 01  RCL 1
   06  6
   35  g
   04  1/x
   35  g
   05  yx
   41  ENTER
   41  ENTER
   09  9
   71  x
   71  x
35 00  g LST X
   31  f
   09  sqrt
   61  +
   01  1
   61  +
34 01  RCL 1
34 05  RCL 5
35 24  g x>y
35 01  g NOP
35 07  g x<>y
35 08  g roll dn
   61  +
   31  f
   83  INT

   23  LBL
   03  3
33 08  STO 8
34 05  RCL 5
35 23  g x=y
34 06  RCL 6
33 07  STO 7
   00  0
34 08  RCL 8
35 23  g x=y
34 07  RCL 7
   22  GTO
   02  2 
   81  ÷
   32  f-1
   83  INT
35 23  g x=y
34 06  RCL 6
   33  STO
   61  +
   04  4
34 03  RCL 3
34 08  RCL 8
   02  2
34 01  RCL 1
   81  ÷  
   71  x
34 06  RCL 6
33 03  STO 3
   71  x
35 07  g x<>y
   51  -
33 06  STO 6
34 08  RCL 8
   01  1 
   51  -
   22  GTO 
   03  3

   23  LBL
   02  2
34 04  RCL 4
   02  2
   71  x
34 06  RCL 6
   61  + 
   81  ÷
   84  R/S

Register Use

R1  x
R2
R3  Tk+1
R4  SUMT2i
R5  n
R6  10-99, Tk
R7  Tn
R8  counter k
R9  used

Go back to the software library
Go back to the main exhibit hall