Integrations of Bessel functions

Accepted Answer
More Answers (1)
0 votes
Hi @Javeria,
I read your comments and implemented the analytical formulas for the two Bessel function integrals directly in MATLAB. The script computes their exact values without using the symbolic toolbox, so it provides the analytical results you were looking for. This should fully answer your questions.
Implementation
%========================================================== % Bessel product integrals (analytic evaluation, no toolbox) %==========================================================
% Integral 1: % I = ∫_0^a r J0(nu r) I0(mu r) dr % General closed form: % I = (a/(nu^2+mu^2)) * [ nu*J1(nu a) I0(mu a) + mu*J0(nu a) I1(mu a) ] % % If J0(nu a) = 0 (typical boundary condition), it reduces to: % I = (a*nu/(nu^2+mu^2)) * J1(nu a) I0(mu a)
function val = besselJI0_int(nu, mu, a) term1 = nu * besselj(1, nu*a) * besseli(0, mu*a); term2 = mu * besselj(0, nu*a) * besseli(1, mu*a); val = a/(nu^2 + mu^2) * (term1 + term2); end
% ------------------------------------------------------------
% Integral 2:
% I = ∫_0^R r J_l(k0 r) I_l(chi r) dr
% General closed form:
% I = (R/(k0^2+chi^2)) * [ k0 J_{l+1}(k0 R) I_l(chi R)
% + chi J_l(k0 R) I_{l+1}(chi R) ]
function val = besselJI_int(l, k0, chi, R) term1 = k0 * besselj(l+1, k0*R) * besseli(l, chi*R); term2 = chi * besselj(l, k0*R) * besseli(l+1, chi*R); val = R/(k0^2 + chi^2) * (term1 + term2); end
% ============================================================ % Example usage % ============================================================
% Parameters nu = 2.5; % example value for nu mu = 1.2; % example value for mu a = 1.0; % upper limit
k0 = 3.0; % example k0 chi = 1.5; % example chi R = 1.0; % upper limit l = 0; % order
% Compute integrals I1 = besselJI0_int(nu, mu, a); I2 = besselJI_int(l, k0, chi, R);
% Display results
fprintf('Integral 1 result = %.6f\n', I1);
fprintf('Integral 2 result = %.6f\n', I2);
Results

Furthermore, My solution implements the exact analytical formulas for integrals of products of Bessel J and modified Bessel I functions, allowing direct computation without the symbolic toolbox. I also appreciate @Torsten’s comments—they correctly point out that formulas for J⋅J integrals don’t directly carry over to J⋅I integrals. His observations helped clarify why a naive application of the J⋅J formula wouldn’t match the numerical result. My script builds on this understanding to provide the correct analytical values for the J⋅I case.
17 Comments
Hi @ Javeria,
I’m not very familiar with Fortran, but this link might help you see how similar code works or how to translate it to MATLAB:
Let me know if I can help with anything else.
I might have pasted the wrong link, here is the correct one
Hi @Javeria,
Thanks for sharing your work. Looking at your derivation and the Brown reference Torsten mentioned, I can see where the R-squared over 2 discrepancy is coming from.
Regarding Torsten's question about the scaling - you should definitely use the scaled version where you divide the eigenvalue by the length, as stated in relation (2). In your handwritten work (Dissipative -integral.pdf), I notice you're using the bare eigenvalues in your Bessel functions, but you need to include the "r divided by R" scaling factor inside the Bessel function arguments.
For example, instead of writing:"Bessel function of the first kind of order zero, evaluated at chi-m times r", you should write: "Bessel function of the first kind of order zero, evaluated at chi-m times r divided by R"
Here's how to rework your derivation step by step:
Start fresh with proper scaling: Go through every single Bessel function in your equations and make sure they all have the "times r divided by R" form inside them.
Set up the series expansion correctly: Instead of jumping straight to orthogonality, first write your unknown function as an infinite sum of properly scaled Bessel functions with unknown coefficients.
Apply orthogonality systematically: Multiply both sides of your main equation by a properly scaled Bessel function, then integrate from zero to R. The orthogonality property will make most terms disappear, leaving you with just one coefficient to solve for.
Let the normalization appear naturally: Don't try to force the R-squared over 2 factor into your algebra. It will appear automatically when you evaluate the remaining integral on the left side.
Check dimensions throughout: Every term in your equation should have the same physical units. If you're getting extra R factors, it usually means the scaling isn't consistent somewhere.
Does this approach make sense for redoing the calculation?
@Javeria,
Yes, your scaling looks correct! Since both your Z-naught-prime and Z-n-prime have units of 1/m, and your eigenvalues chi are properly scaled (roots divided by R), the R-squared over 2 normalization factor is indeed appropriate.
Your numerical verification confirms the analytical formulas are working well (relative errors around 10 to the minus 6 to 10 to the minus 7). The dimensional analysis also checks out: with Z-naught-prime and Z-n-prime having units of inverse meters and your matrix elements being dimensionless as expected, everything appears consistent.
The key point Torsten and I were emphasizing is that you need the "r divided by R" scaling inside all your Bessel function arguments throughout your derivation, which you have correctly implemented in your code where chi equals roots divided by RI.
Thanks to @Torsten for:
*Confirming the integral formulas and catching the sign issue in the J-I integral
*Providing the numerical validation code that helped verify your analytical expressions
*Clarifying that gamma has units of 1/m by definition (roots divided by R)
For next steps:
*Your numerical checks show good agreement (errors around 10^-6), so your formulas are working correctly
*The dimensional analysis looks consistent
*Focus now on making sure your written mathematical derivation reflects the same proper scaling you've implemented in code
This will give you a solid foundation before moving forward with the rest of your analysis.
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

