Please help me. I want to integrate the following function from 0 to plus infinity.

조회 수: 8 (최근 30일)
syms r r0 sg g(r)=r*exp(-(log(r)-log(r0))^2/(2*sg^2));
  댓글 수: 6
El Houssain Sabour
El Houssain Sabour 2023년 2월 2일
It's also about the integral, which is in the equation. And that's my problem. I can't implement this with Matlab.
Torsten
Torsten 2023년 2월 2일
편집: Torsten 2023년 2월 2일
As you can see under
integral_{r=0}^{r=Inf} r^n * 1/(r*sqrt(2*pi*sigma^2)) * exp(-1/2 * (log(r)-mu)^2 / sigma^2) dr
=
exp( n*mu + 1/2 * n^2*sigma^2)
Both of your two integrals in question follow from this relation for n=2 and n=3.
So your integral becomes
integral_{r=0}^{r=Inf} r^(n-1) * exp(-1/2 * (log(r)-log(r0))^2 / sg^2) dr =
sqrt(2*pi*sg^2) * exp( n*log(r0) + 1/2 * n^2*sg^2)
for n = 2: sqrt(2*pi*sg^2) * r0^2* exp( 2*sg^2)
for n = 3: sqrt(2*pi*sg^2) * r0^3* exp( 4.5*sg^2)

댓글을 달려면 로그인하십시오.

답변 (1개)

Dr. JANAK TRIVEDI
Dr. JANAK TRIVEDI 2023년 2월 2일
편집: Torsten 2023년 2월 2일
syms r r0 sg
g(r) = r * exp(-(log(r) - log(r0))^2 / (2 * sg^2));
int_g = int(g,r,0,inf)
int_g = 
Note that the inf keyword represents infinity. The integral of g(r) is calculated over the interval [0,inf). You can also specify other intervals of integration as needed.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by