Bessel Function by integrals
11-19-2023, 03:47 PM (This post was last modified: 11-19-2023 03:48 PM by Namir.)
Post: #1
 Namir Senior Member Posts: 1,053 Joined: Dec 2013
Bessel Function by integrals
Bessel Jn(x) for integer n order. The Advantage ROM is needed to use the INTEG routine.

The program uses:

Jn(x) = 1/pi * integral_of(cos(n*t - x*sin(t)) dt for t from 0 to pi.

Memory Map
==========
Code:
R00 = n
R01 = x

Program Listing
===============

Code:
01 LBL "BSLINT"
02 LBL A
04 "N?"
05 PROMPT
06 STO 00
07 "X?"
08 PROMPT
09 STO 01
10 "JN"
11 0
12 PI
13 INTEG
14 PI
15 /
16 RTN
17 LBL "JN"
18 RCL 00
19 X<>Y
20 *
21 LASTX
22 SIN
23 RCL 01
24 *
25 -
26 COS
27 RTN

Example
=======

To calculate J3(4):

1. Set display using FIX 7.
2. Press [A]. The program displays the prompt "N?".
3. Enter 3 and then press [R/S].
4. The program displays the prompt "X?".
5. Enter 4 and then press [R/S].
6. The program calculates the Bessel function and displays 0.4301715.
 « Next Oldest | Next Newest »

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