필터 지우기
필터 지우기

Dealing with complex integrals of a highly oscillatory type

조회 수: 1 (최근 30일)
xadu
xadu 2020년 7월 29일
댓글: xadu 2020년 7월 29일
The following integral can be computed analytically using complex integration (required due to the pole at the origin):
However, if I try to evaluate this numerically, I run into trouble. Two approaches
1. Numerically: This is doomed to fail due to the function's behaviour at the origin.
fun = @(x) exp(1j*x)./x;
integral(fun,-inf,inf)
Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error
is 9.8e+00. The integral may not exist, or it may be difficult to approximate numerically to
the requested accuracy.
2. Symbolically: This gives the wrong answer and leaves a limit to be evaluated
syms x;
f(x) = exp(1j*x)/x;
int(f,[-inf,inf],'PrincipalValue',true)
ans =
- pi*1i + limit(- ei(-1i/eps27) + ei(1i/eps27), eps27, 0, 'Right')
What is the way to evaluating such integrals in matlab? I suspect the trouble is not at the origin, but at how the function is behaving (numerically) at the end points.
PS: I did try to use the chebfun library here, but it didn't seem to help.

답변 (1개)

Alan Stevens
Alan Stevens 2020년 7월 29일
I don't know in general, but for this particular integral, since cos(x)/x is odd, its contribution to the integral is zero and we can do the following:
>> syms x
>> I = i*int(sin(x)/x,-inf,inf)
I =
pi*1i
  댓글 수: 1
xadu
xadu 2020년 7월 29일
True, for this particular case it solves the problem.. but the problem remains if a general oscillatory type of integral is encountered. In fact, I came across this problem while working on a (complicated looking) kernel -- and then boiled it down to the above, simpler integral for the purpose of posting the question. Thanks, though :).

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by