Sum formula for the modified Bessel function

Click For Summary
SUMMARY

The forum discussion centers on the evaluation of the sum formula for the modified Bessel function of the second kind, specifically comparing results from MATLAB's 'besselk' function with a user-defined implementation. The user found that while results for real numbers matched, discrepancies arose with complex numbers. Another participant suggested examining the requirements for the function I_n(z) to identify potential issues with imaginary inputs. A MATLAB code snippet was provided to illustrate the implementation of the sum formula.

PREREQUISITES
  • Understanding of modified Bessel functions, specifically I_n(z) and K_n(z)
  • Familiarity with MATLAB programming and its mathematical functions
  • Knowledge of series expansions and their applications in mathematical computations
  • Basic understanding of complex numbers and their implications in mathematical functions
NEXT STEPS
  • Investigate the properties and applications of modified Bessel functions, particularly K_n(z)
  • Learn about MATLAB's 'besselk' function and its implementation details
  • Explore series expansions relevant to complex analysis and their convergence
  • Review the mathematical requirements for the function I_n(z) when dealing with complex inputs
USEFUL FOR

Mathematicians, engineers, and researchers working with special functions, particularly those involved in numerical analysis and complex variable theory.

Hanyu Ye
Messages
4
Reaction score
0
Hi, everybody. Mathematic handbooks have given a sum formula for the modified Bessel function of the second kind as follows
NumberedEquation1.gif

I have tried to evaluate this formula. When z is a real number, it gives a result identical to that computed by the 'besselk ' function in MATLAB. However, when z is a complex number, the two results don't agree. What's wrong? Thanks a lot.
 
Mathematics news on Phys.org
Hi Hanyu,
I looked into some other series expansions, and found this one...from wolfram.com. It looks almost exactly like the one you were using above except for the ##I_n(z)## in your post was replaced by another sum formula.
upload_2015-6-2_16-47-19.png
Using this in matlab, I was able to get the same results as besselk for a sample of real and imaginary points.
So...I would look into the requirements for the function ##I_n(z)## that you were using to see if there are complications from the imaginary input.

Below is how I input it into matlab:
[\code]
function A=Kest(n,z);
expand = 10;
sum1 = 0;
for k = 0 :expand
sum1 = sum1 + (z/2)^(2*k)/factorial(k)/factorial(k+n);
end
term1 = (-1)^(n-1)*log(z/2)*(z/2)^n*sum1;

sum2 = 0;
%if n==0
%else
for k = 0:n-1
sum2 = sum2+(-1)^k*factorial(n-k-1)/factorial(k)*(z/2)^(2*k);
end
%end
term2 = sum2*1/2*(z/2)^(-n);

sum3 = 0;
for k = 0 :expand
sum3 = sum3 + (psi(k+1)+psi(k+n+1))/factorial(k)/factorial(k+n)*(z/2)^(2*k);
end
term3 = sum3*(-1)^n/2*(z/2)^n;
A = term1+term2+term3;
[/code]
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
1
Views
11K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • Poll Poll
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K