Bessel function Errors reproducing Wronskian

12 ビュー (過去 30 日間)
Matthew King
Matthew King 2021 年 2 月 26 日
コメント済み: Matthew King 2021 年 3 月 2 日
I am trying to reproduce the Wronskians of the Bessel functions.
this should hold true for any complex argument Z to my knowledge.
I am making use of
m=5; % I have the same issue for other values of m.
Z=linspace(-200,200,400)+1i*(linspace(-200,200,400).');
JmZ=besselj(m,Z);
H1mZ=besselh(m,1,Z);
H2mZ=besselh(m,2,Z);
dJmZ=(1/2).*(besselj(m-1,Z)-besselj(m+1,Z));
dH1mZ=(1/2).*(besselh(m-1,1,Z)-besselh(m+1,1,Z));
dH2mZ=(1/2).*(besselh(m-1,2,Z)-besselh(m+1,2,Z));
figure
contour(linspace(-200,200,400),linspace(-200,200,400),log10(abs(1-(JmZ.*dH1mZ-H1mZ.*dJmZ)./(2i./(pi.*Z)))),[-16,-8,0,1,10])
figure
contour(linspace(-200,200,400),linspace(-200,200,400),log10(abs(1-(JmZ.*dH2mZ-H2mZ.*dJmZ)./(-2i./(pi.*Z)))),[-16,-8,0,1,10])
in order to evaluate the error.
For the first expression I am retrieiving a large error in the Lower Half Plane for the first expression and in the Upper Half Plane for the second expression.
Are there any ways to reduce this error in order to get reasonable accuracy in these regions?
I have tried using different expressions for the derivatives such as
% dJmZ=(m./Z).*JmZ - besselj(m+1,Z);
% dJmZ= (JmZ - besselj(m,Z+sqrt(eps)))./(-sqrt(eps));
and the equivalent for the derivatives of the Hankel functions.
I have also attempted intoducing the scalings into the problem
JmZS=besselj(m,Z,1);
H1mZS=besselh(m,1,Z,1);
H2mZS=besselh(m,2,Z,1);
dJmZS=(1/2).*(besselj(m-1,Z,1)-besselj(m+1,Z,1));
dH1mZS=(1/2).*(besselh(m-1,1,Z,1)-besselh(m+1,1,Z,1));
dH2mZS=(1/2).*(besselh(m-1,2,Z,1)-besselh(m+1,2,Z,1));
figure
contour(linspace(-200,200,400),linspace(-200,200,400),log10(abs(1-(JmZS.*dH1mZS-H1mZS.*dJmZS)./(2i./(pi.*Z).*(exp(abs(imag(alpha))+1i.*Z))))),[-16,-8,0,1,10])
figure
contour(linspace(-200,200,400),linspace(-200,200,400),log10(abs(1-(JmZS.*dH2mZS-H2mZS.*dJmZS)./(-2i./(pi.*Z).*(exp(abs(imag(alpha))+1i.*Z)))),[-16,-8,0,1,10])
However this makes little to no difference.
  2 件のコメント
Walter Roberson
Walter Roberson 2021 年 2 月 26 日
Use the symbolic toolbox?
Matthew King
Matthew King 2021 年 3 月 2 日
I was not, although trying this did not improve the accuracy.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeBessel functions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by