Re: New Version of the 41Z Message #2 Posted by Angel Martin on 25 July 2010, 6:22 a.m., in response to message #1 by Angel Martin
In case you're curious, here are the formulae used in the Bessel functions implementation:
Orders can be either real or complex. I use an iterative algorithm for J (and I) which is valid for Re(z)>0 and all orders but negative integers due to the Gamma singularities.
J(w,z) = SUM {U(k)k=1,2,….} * (z/2)^w / G(w+1)
U(k) = U(k1) * (z/2)^2 / k(k+w)
U(0) = 1
Then I use the following two continuation rules:
1. for negative integers, J(n,z) = (1)^n * J(n,z)
2. for Re(z)<0, J(w,z) = (z)^w * (z)^(w) * J(w,z)
For noninteger orders, Y and K are derived from J and I using the wellknown formulas involving sin(pi z) and cos(pi z).
Y(w,z) = [ J(w,z) cos(w(pi))  J(w,z) ] / sin(w(pi))
K(w,z) = (pi/2) [ I(w,z)  I(w,z) ] / sin(w(pi))
For integer orders however those don't work, and I have to resort to the more elaborate summations, as follows:
pi* Y(n,z) = 2[geu + Ln z/2] J(n,z) – SUM{(1)^k fk(n,z)} – SUM{gk(n,z)}
(1)^n+1 * 2 K(n,z) = 2 [geu + Ln z/2] I(n,z) – SUM{fk(n,z)} – (1)^n * SUM{(1)^k * gk(n,z)}
where:
gk(n,x) = (z/2)^2kn (nk1)! / k! ; k=0,2,…(n1)
fk(n,z) = (z/2)^2k+n [H(k) + H(n+k)] / [k! (n+k)!] ; k=0,1,2,…..
H(n) = SUM {1/k}, k=1,2...n
Hope this helps.
Edited: 25 July 2010, 6:24 a.m.
