improper integral: exp(ikx) undefined in Matlab?
3 ビュー (過去 30 日間)
古いコメントを表示
I wanna integrate: ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658415/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658415/image.png)
With solution: ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658420/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658420/image.png)
But Matlab gives NAN:
syms x k; assume(k,'integer'); int(exp(1i*k*x),x,-inf,inf)
0 件のコメント
採用された回答
Steven Lord
2021 年 6 月 19 日
What is the value of your integral when k is equal to 0?
syms x k;
assume(k,'integer');
k = 0;
int(exp(1i*k*x),x,-inf,inf)
This makes sense, as you're just integrating 1 over the whole real line.
What's the value of your integral when k is 1?
k = 1;
int(exp(1i*k*x),x,-inf,inf)
Does this make sense? Let's look at the real and imaginary parts of the function you're integrating.
f = 8*pi;
fplot(real(exp(1i*k*x)), [-f, f], 'k--')
hold on
fplot(imag(exp(1i*k*x)), [-f, f], 'c-')
Those oscillations could be problematic. Does this integral exist? Let's look at a series of values of those integrals for gradually increasing limits.
for L = 0:0.5:10
value = int(exp(1i*k*x), -L*pi, L*pi);
fprintf("The value of the integral from %g*pi to %g*pi is %g.\n", -L, L, value);
end
So should the value of this integral on the infinite interval be 0, -2, or something inbetween?
1 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!