Evaluating Symbolic, Definite Integral with Bessel's Function

Hello,
I need to evaluate the following definite, symbolic integral with 0th order bessel function inside.
Where J0 is the 0th order bessel function and also a function of r and A(i) which is an array of integers. I need to evaluate the integral for each value of A(i) from i=1:5. Here is what I have so far:
syms r
for i=1:5
An(i)= int(20*besselj(0,A(i)*r)*r,0,3.1);
end
Matlab is able to evaluate this, but I am suspicious of the results as they don't make sense in the context of my problem. Does this seem like the correct approach?

1 Comment

syms A U
assume(U>=0)
syms r
An = int(20*besselj(0,A*r)*r,0,U);
An
An = 
That looks appropriate to me.

Sign in to comment.

 Accepted Answer

You might want to compare with the numerical solution:
An = integral(@(r)20*besselj(0,A.*r).*r,0,3.1,'ArrayValued',true)

More Answers (0)

Products

Release

R2022a

Asked:

on 26 Mar 2022

Answered:

on 26 Mar 2022

Community Treasure Hunt

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

Start Hunting!