I have this integration problem and want to solve it numerically using Matlab
where κ is the wavelength.
I wrote the following Matlab code:
% the varaibles a, b and k must be defined before the follwong code
integ_j=int(fun2, r, [a b]);
when I run this code, i do not get the expected results.
Secondly, when the values of a or b goes to zero, the result is NaN, due to the existence of r in the denomenator of the bessel function.
I would be grateful if someone could help me solve this problem or give me some hints how to differentiate or integrate spherical bessel functions