Integration of a function contains bessel functions from 0 to inf
Show older comments
Dear All,
I am trying to calculate the following formula using "vpaintegral".
(I used this post as my reference https://www.mathworks.com/matlabcentral/answers/709098-indefinite-integrals-of-bessel-function )
D=1e-11;
R=0.001
x=1:.1:6; %(a vector)
t=[1 5 7 24 30] %(one or several values)
x is argument of the below function.

I wrote the following code to evaluate the integral for just one single value of t. But it dose not give me the val as vector based on x values:
[ 0, vpaintegral(-(exp(-(4760145414732603*x^2)/18889465931478580854784)*(besselj(0, x/1000)*bessely(0, (3*x)/2000) - bessely(0, x/1000)*besselj(0, (3*x)/2000)))/(x*(besselj(0, x/1000)^2 + bessely(0, x/1000)^2)), x, 0, Inf), vpaintegral((exp(-(4760145414732603*x^2)/18889465931478580854784)*(besselj(0, x/500)*bessely(0, x/1000) - bessely(0, x/500)*besselj(0, x/1000)))/(x*(besselj(0, x/1000)^2 + bessely(0, x/1000)^2)), x, 0, Inf), vpaintegral((exp(-(4760145414732603*x^2)/18889465931478580854784)*(besselj(0, x/400)*bessely(0, x/1000) - bessely(0, x/400)*besselj(0, x/1000)))/(x*(besselj(0, x/1000)^2 + bessely(0, x/1000)^2)), x, 0, Inf), vpaintegral(-(exp(-(4760145414732603*x^2)/18889465931478580854784)*(besselj(0, x/1000)*bessely(0, (3*x)/1000) - besselj(0, (3*x)/1000)*bessely(0, x/1000)))/(x*(besselj(0, x/1000)^2 + bessely(0, x/1000)^2)), x, 0, Inf)]
any help is appreciated.
Thanks in advance for your suggestions,
---------------------------------------------
syms x
f1=exp((-D*t)*x.^2)
b_y=bessely(0,x.*R);
b_j=besselj(0,x.*R);
yj=(bessely(0,x.*R).^2)+(besselj(0,x.*R).^2);
myfunc=f1.*((besselj(0,x.*r).*b_y)-(bessely(0,x.*r).*b_j))./(x.*yj);
F = vpaintegral(myfunc, 0, inf);
val=1+(2/pi).*F ;
plot((x/R),val, 'g*-')
Accepted Answer
More Answers (0)
Categories
Find more on Bessel functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
