How to perform correct numerical integration of equations containing Bessel functions ?

3 次查看(过去 30 天)
I am trying to numerically integrate ths improper integral using "integrate" but the output is un-converged:
What would be the right way to solve this equation in MATLAB ?

采纳的回答

ishan
ishan 2024-4-30
I am very late to answer my own question but I have found a solution. The practical approach to this problem was that I used a finite upper limit of integration and made use of the "trapz" function. I noticed that the exponential term was decaying very rapidly to zero and there seemed no need to integrate it to infinity. My results matched with those from the reference.

更多回答(1 个)

Torsten
Torsten 2024-2-28
编辑:Torsten 2024-2-28
I suspect you want exp(-zeta^2/(4*0.0277)) instead of exp(zeta^2/(4*0.0277)) in your integrand.
And why do you add the same Bessel function two times : J0(103.562*zeta)+J0(103.562*zeta) ? This gives 2*J0(103.562*zeta) :-)
  2 个评论
ishan
ishan 2024-2-28
Hello Torsten,
Yes, it should exp(-zeta^2/(4*0.0277)). It was a mistake while typing this question.
Those two values are two of the many values which I have. It will simplify to 2 J0 but it will not be everytime. I wrote them so that I can post the equation here wih example values.
I broke down the calculations into different parts and this is an isolated indefinite integral containing the Bessel function
fun = @(xi) besselj(0,106.4202*xi);
test = integral( fun,0,Inf);
This is the warning it throws up:
Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on
error is 3.3e+07. The integral may not exist, or it may be difficult to approximate
numerically to the requested accuracy.
> In integralCalc/iterateScalarValued (line 372)
In integralCalc/vadapt (line 132)
In integralCalc (line 83)
In integral (line 87)
In test_program (line 55)
Torsten
Torsten 2024-2-28
Seems to be difficult to integrate up to Inf:
syms x
vpa(int(besselj(0,106.4202*x),x,0,Inf))
ans = 
0.0093967122783080660919954783140556
format long
fun = @(xi) besselj(0,106.4202*xi);
test = integral( fun,0,6)
test =
0.009399230000459
testInf = integral( fun,0,Inf)
Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 3.3e+07. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy.
testInf =
-3.106533748191589e+07

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by