How do I solve a triple integral with one integral limit in function of another variable

13 ビュー (過去 30 日間)
Bastián Araya
Bastián Araya 2022 年 9 月 27 日
編集済み: Torsten 2022 年 9 月 28 日
Hi, I want to integrate the following function:
fun=@(s,r,m) r*exp(-(s^2/2 + beta1*(m-mo1)))/sqrt(r^2-rmin1)
Where beta1,mo1 and rmin1 are constants previously defined (beta1= 1.72, mo1=5,rmin1=10)
These are the integration limits:
PPGA1=integral3(@(s,r,m) fun(s,r,m),-Inf,-z,rmin1,rmax1,mo1,mmax1)
Where z is in function of m and r aswell:
z=(log(0.3)-(-0.242 -0.527*(m-6) -0.778*log(r) ))/0.52
I have tried a bunch of things, but nothing works. What am I doing wrong?

回答 (2 件)

Torsten
Torsten 2022 年 9 月 27 日
編集済み: Torsten 2022 年 9 月 28 日
beta1= 1.72;
mo1=5;
rmin1=10;
rmax1 = 20;
mmax1 = 10;
fun=@(r,m,s) r.*exp(-(s.^2/2 + beta1*(m-mo1)))./sqrt(r.^2-rmin1);
z = @(r,m) ((log(0.3)-(-0.242 -0.527*(m-6) -0.778*log(r) ))/0.52);
PPGA1=integral3(fun,rmin1,rmax1,mo1,mmax1,-Inf,@(r,m)-z(r,m))
PPGA1 = 0.9853

Steven Lord
Steven Lord 2022 年 9 月 27 日
See the "Integral over the Unit Sphere in Cartesian Coordinates" example on the integral3 documentation page for an example of how to specify the limits of integration for the one or more of the integrals as function handles.

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by