How to calculate 5 times integral

4 visualizaciones (últimos 30 días)
Shan  Chu
Shan Chu el 14 de Ag. de 2017
Comentada: Shan Chu el 16 de Ag. de 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 comentarios
Torsten
Torsten el 15 de Ag. de 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 el 15 de Ag. de 2017
Dear Torsten, I have attached it in the a.png file

Iniciar sesión para comentar.

Respuesta aceptada

Torsten
Torsten el 15 de Ag. de 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 comentario
Shan  Chu
Shan Chu el 16 de Ag. de 2017
Thank you so much. It works great

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by