How to calculate 5 times integral

3 ビュー (過去 30 日間)
Shan  Chu
Shan Chu 2017 年 8 月 14 日
コメント済み: Shan Chu 2017 年 8 月 16 日
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 件のコメント
Torsten
Torsten 2017 年 8 月 15 日
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 2017 年 8 月 15 日
Dear Torsten, I have attached it in the a.png file

サインインしてコメントする。

採用された回答

Torsten
Torsten 2017 年 8 月 15 日
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 件のコメント
Shan  Chu
Shan Chu 2017 年 8 月 16 日
Thank you so much. It works great

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by