Integrations of Bessel functions



0 comentarios
Respuesta aceptada
0 comentarios
Más respuestas (1)
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 comentarios
Ver también
Categorías
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!