derivative of bessel function of the first kind !!
141 次查看(过去 30 天)
显示 更早的评论
Hello! I would like to check if my implementation of the derivative of bessel function of the first kind is working properly or not , how can I check?! this is the code that I have implemented, please correct me if it is wrong!
c = sqrt(pi./(2.x));
D_bessel = c.*besselj(n-0.5,x)-c.*besselj(n+0.5,x).*(n+1)./(x);
0 个评论
回答(2 个)
Morgan
2022-11-6
I've found a slightly easier implementation of the derivative for you based on this link. It essentially says that
In MATLAB, this would look like
function dJndx = dbesselj(n,x)
% DBESSELJ A function that will generically calculate the
% the derivative of a Bessel function of the first
% kind of order n for all values of x.
%
% Example usage: dJndx = dbesselj(n,x);
%
% INPUT ARGUMENTS
% ================
% n Order of the Bessel function of the first kind
% x Input variable to Bessel function
%
% OUTPUT ARGUMENTS
% ================
% dJndx Derivative of nth order Bessel function of the first
% kind at all values of x
dJndx = n*besselj(n,x)./x - besselj(n+1,x);
end
Hopefully this answers your question, let me know if this helps!
0 个评论
Feruza
2023-6-14
Is there way to compute third order derivatives of Bessel functions? I could find second order derivative from bessel equation but how to proceed with the third order derivative
2 个评论
Morgan
2023-6-14
Should be able to do
d3Jndx = dbesselj(n,dbesselj(n,dbesselj(n,x)));
For third order derivatives with the function I wrote above.
Feruza
2023-6-15
Thanks, I also used MATLAB Symbolics to get analytical formulars for derivatives:
syms nu z
b = besselj(nu,z);
db = diff(b)
bj = besselj(nu,z);
ddbj = diff(bj,z,2)
dddbj = diff(bj,z,3)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bessel functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!