How to calculate 5 times integral

9 vues (au cours des 30 derniers jours)
Shan  Chu
Shan Chu le 14 Août 2017
Commenté : Shan Chu le 16 Août 2017
Dear all, I have a problem with a big integral which contains other 4 integrals inside. I have no idea how to do it. Could you please help. Thanks
F0=@(S0) integral2(@(r,z) r.*besselj(1,S0.*r).*exp(-S0.*abs(-z)), a1, a2, b1, b2);
F_L=@(x0,r0,z0) r0.*besselj(1,x0.*r0).*exp(x0.*z0).*F0(x0);
L_lossy=integral3(F_L,0,Inf, c1, c2, d1, d2,'RelTol',1e-6,'AbsTol',1e-12)
where a1, a2, ..., d2 are numerical values.
P/S I have attached the equation in the a.png file
  2 commentaires
Torsten
Torsten le 15 Août 2017
Before going into MATLAB coding, yould you first provide the integral you are trying to solve in a mathematical notation ?
Best wishes
Torsten.
Shan  Chu
Shan Chu le 15 Août 2017
Dear Torsten, I have attached it in the a.png file

Connectez-vous pour commenter.

Réponse acceptée

Torsten
Torsten le 15 Août 2017
Try
function main
a1 = ...;
a2 = ...;
b1 = ...;
b2 = ...;
c1 = ...;
c2 = ...;
d1 = ...;
d2 = ...;
value = integral(@(x)fun(x,a1,a2,b1,b2,c1,c2,d1,d2),0,Inf);
function d = fun(x,a1,a2,b1,b2,c1,c2,d1,d2)
fun1=@(a,y) y.*besselj(1,a*y);
fun2=@(a,y) exp(a*y);
fun3=@(a,y) exp(-a*abs(-y));
for i=1:numel(x)
xactual = x(i);
factor1 = integral(@(y)fun1(xactual,y),a2,a1);
factor2 = integral(@(y)fun1(xactual,y),c2,c1);
factor3 = integral(@(y)fun2(xactual,y),b2,b1);
factor4 = integral(@(y)fun3(xactual,y),d2,d1);
d(i)=factor1*factor2*factor3*factor4;
end
Best wishes
Torsten.
  1 commentaire
Shan  Chu
Shan Chu le 16 Août 2017
Thank you so much. It works great

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Quantum Mechanics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by