フィルターのクリア

Different results in symbol integration

2 ビュー (過去 30 日間)
ConvexHull
ConvexHull 2020 年 7 月 19 日
編集済み: ConvexHull 2020 年 7 月 19 日
Dear all,
whats going wrong here? I only changed the order of the dependend variables from (x1,x2,x3,x4) to (x2,x1,x3,x4).
syms x1 x2 x3 x4
Variant 1:
f(x1,x2,x3,x4)=exp(-x1^2)*exp(-x2^2)*exp(-x3^2)*exp(-x4^2)*x1;
F(x1,x2,x3,x4)=int(int(int(int(int(f,x1),x2),x3),x4));
Result: F(1,1,1,1)
= -(pi^2*erf(x1)*erf(x2)*erf(x3)*erf(x4))/32
= -0.1555
Variant 2:
f(x2,x1,x3,x4)=exp(-x1^2)*exp(-x2^2)*exp(-x3^2)*exp(-x4^2)*x1
F(x2,x1,x3,x4)=int(int(int(int(int(f,x1),x2),x3),x4));
Result: F(1,1,1,1)
= -(pi^(3/2)*exp(-x1^2)*erf(x3)*erf(x4)*(exp(-x2^2)/pi^(1/2) + x2*erf(x2)))/16
= -0.0955
Regards
System:
Linux Ubuntu 18.04
MATLAB R2018a

採用された回答

ConvexHull
ConvexHull 2020 年 7 月 19 日
Have found my bug. I have integrated five times.
Thanks anyway!

その他の回答 (1 件)

madhan ravi
madhan ravi 2020 年 7 月 19 日
Called int() 5 times instead of 4.
  1 件のコメント
ConvexHull
ConvexHull 2020 年 7 月 19 日
編集済み: ConvexHull 2020 年 7 月 19 日
Thanks for your answer! I already found that stupid bug.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by