フィルターのクリア

Why can't I get this integration to work?

1 回表示 (過去 30 日間)
Kendra Hamilton
Kendra Hamilton 2023 年 10 月 6 日
コメント済み: Kendra Hamilton 2023 年 10 月 6 日
Hi, I'm trying to integrate the function I(z) from -infinity to infinity. This is my code:
syms P w0 r n lamda z
Pi = sym(pi);
zR = Pi*w0^2*n/lamda;
I(z) = 2*P*zR^2/(Pi*w0^2)*1/(zR^2+z^2)*exp(-2*r^2*zR^2/(w0^2*zR^2+w0^2*z^2));
I1 = int(I, z, -inf, inf)
I1 = 
but it just prints
I1 = int((2*P*n^2*w0^2*pi*exp(-(2*n^2*r^2*w0^4*pi^2)/(lamda^2*(w0^2*z^2 + (n^2*w0^6*pi^2)/lamda^2))))/(lamda^2*(z^2 + (n^2*w0^4*pi^2)/lamda^2)), z, -Inf, Inf)
Can someone tell me what I'm doing wrong?

採用された回答

Walter Roberson
Walter Roberson 2023 年 10 月 6 日
移動済み: Walter Roberson 2023 年 10 月 6 日
syms P w0 r n lamda z real
Pi = sym(pi);
zR = Pi*w0^2*n/lamda;
I(z) = 2*P*zR^2/(Pi*w0^2)*1/(zR^2+z^2)*exp(-2*r^2*zR^2/(w0^2*zR^2+w0^2*z^2));
IE = expand(I)
IE(z) = 
I1 = int(IE, z, -inf, inf)
I1 = 
Now look at the form of that integral. Can we find a simpler integral that has the same general form but still cannot be integrated? Yes.
syms B C x
F = exp(-B/(x^2+C))
F = 
int(F, x, -inf, inf)
ans = 
A key point for this is that if you hardcode B as 1 then MATLAB can proceed, and likewise if you hard-code C as 0. But the combination of the two is more than MATLAB can deal with.
Maple is not able to deal with this integral either
Your actual integral is worse than this.
Your basic problem, then, is that there is no closed form integral for that expression that can be found by MATLAB (or Maple either)
  1 件のコメント
Kendra Hamilton
Kendra Hamilton 2023 年 10 月 6 日
Thank you for your help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by