bess.cyl: Calculates Cylindrical Bessel functions from 0 to nmax.

Description Usage Arguments Details Value Examples

Description

Calculates Cylindrical Bessel functions from 0 to nmax.

Usage

1
bess.cyl(nmax, x, code = "C")

Arguments

nmax

The maximum order of J_n(x)

x

The argument of J_n(x)

code

If you prefer to use native R or C language. The algorithm is the same.

Details

bess.cyl calculates the Cylindrical Bessel function using downward recurrence, from J_nmax(x) to J_0(x). The system of equations is given by S_n(x)=n/x, g[n]=J_n/J_{n+1} and D_n=J_n'(x)/J_n(x). The system can be solved by means of the recurrence relations of the Cylindrical Bessel functions

g[n-1]+1/g[n]=2 S[n]

g[n-1]-1/g[n]=2 D[n]

that can be rewriten

g[n]=S[n+1]+D[n+1]

1/g[n]=S[n ]-D[n ].

The logarithmic derivatives obeys the relation,

(S[n]-D[n])(S[n+1]+D[n+1])=1.

The values can be calculated upward or downward.

Value

An array of Cylindrical Bessel functions and its derivatives. from 0 to nmax at point x

Examples

1
2
3
4
5
6
7
8
x<-30
nmax<-50
a<-bess.cyl(nmax,x,code="C")
b<-bess.cyl(nmax,x,code="R")
d<-besselJ(x=x,nu=0:nmax)
plot(a$Jn,type='b')
points(b$Jn,col='red',pch=4)
points(d,col='blue',pch=3)

wendellopes/rvswf documentation built on May 4, 2019, 4:19 a.m.