Hi All, i want to get the integral result for bessely function as
int{a}{b}int{a}{b}bessely(1, x1-x2)dx1dx2
but when numerically calculate that using Gaussian quadrature points, the values in bessely(1, 0) is a infinite number, and the limit as limit{x->0}bessely(1, x) are not existed. But when i used the quad2d to calculate this integral, a correct answer can be obtained. So i like to know how the results can be numerically obtained? Thanks.
My code is as
clear
clc
close all
a=-8;
b = 6;
n=50;
[Q, W]=LegGaus(n,a,b);
covfun_A=@(x1,x2) abs(x1-x2).*bessely(1,abs(x1-x2));
Matrix_A = bsxfun(covfun_A,Q.',Q);
Matrix_A(1:length(Matrix_A)+1:length(Matrix_A)*length(Matrix_A))=0;
A_1 =(W)'*Matrix_A*(W);
A_2= (quad2d(@(x1,x2) (abs(x1-x2).*bessely(1,abs(x1-x2))),a,b,@(x1)x1,b) +...
quad2d(@(x1,x2) (abs(x1-x2).*bessely(1,abs(x1-x2))),a,b,a,@(x1)x1));
A_2/A_1
LegGaus is a sub function in getting the weight and quadrature points. If you need that, i can mail it to you.
thanks.