How to integrate an unbounded function?

조회 수: 10 (최근 30일)
XIONG Qingxiang
XIONG Qingxiang 2019년 7월 12일
댓글: XIONG Qingxiang 2019년 7월 16일
Hello every one,
since the normal numerical integration cannnot work to an unbounded function, is there any other methods for the integration of unbounded function?.
Thank you.

채택된 답변

Jon
Jon 2019년 7월 12일
According to the MATLAB documentation https://www.mathworks.com/help/matlab/ref/integral.html MATLAB's integral function can handle singlularities on the boundary (upper or lower limit) of the domain to be integrated. If the singularity is not on the boundary, you could always break up the integral into the sum of two integrals, one with the singularity at the upper bound, the other with the singularity at the lower bound. If you have a finite number of singularities in your domain, you can extend this idea, and break up the overall integration into pieces each with singularities at their endpoints.
I am assuming the function you are integrating is one dimensional. MATLAB also has routines, integral2 and integral3 for two and three dimensional cases. I think these can also handle singularities at the boundaries, but you can check the documentation for details.
  댓글 수: 7
Bruno Luong
Bruno Luong 2019년 7월 15일
Not sure with those complicated formula (and a lot of them is not important for the discussion) but if I understand
P(r) = (1/(sigma*sqrt(2*pi)))*(1/r)*exp(-((log(r) - mu)^2)/(2*sigma^2))
which is equivalent to O(1/r) * O(1/r^(1/(2*sigma^2))) for r ~0.
The first term already induce non-defined integral. So there is no point trying to compute such thing.
Back to the blackboard.
PS: it looks like you are trying to integrate some EM potential layers.
XIONG Qingxiang
XIONG Qingxiang 2019년 7월 16일
In fact, it's a log-normal distribution and this code is for the propose of solving the parameter epsilon. What I'm working on is porous media. Anyway, thank you for your warming help and I will vote your response as the answer.

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

추가 답변 (1개)

Matt J
Matt J 2019년 7월 12일
You cantry use the symbolic toolbox, or you could just take the numerical integral over a sufficiently large finite interval. A numerical integration is an approximation anyway, so who cares about the extra epsilon of error that you get when you truncate the interval to something finite.
  댓글 수: 1
XIONG Qingxiang
XIONG Qingxiang 2019년 7월 15일
Thank you for your idea. But could you please give me more details that how to use symbolic toolbox to solve this problem?

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

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by