フィルターのクリア

Problem in infinite symbolic integrals

11 ビュー (過去 30 日間)
Ege Gurtan
Ege Gurtan 2019 年 6 月 9 日
コメント済み: Ege Gurtan 2019 年 6 月 10 日
I am trying to realize this operation in MATLAB.
My code is:
clear,clc
syms a m x h f A
f=2*A^2*(x^2)*exp(-2*a*m*x^2/h)
I=int(f,x,0,inf)
But MATLAB gives me :
2*A^2*limit((2^(1/2)*a*pi^(1/2) - 2^(1/2)*a*pi^(1/2)*erfc(2^(1/2)*x*((a*m)/h)^(1/2)))/(16*a*((a*m)/h)^(3/2)) - (x*h*exp(-(2*x^2*a*m)/h))/(4*a*m), x, Inf)
Does anyone know what's wrong?
Thanks in advance!

採用された回答

Walter Roberson
Walter Roberson 2019 年 6 月 9 日
When you do the syms call, you should break it down into symbols that are certain to be real valued and those that are not certain, and you should add the "real" qualifier when possible. For example,
syms a f h m x real
syms A %potentially complex valued
We know that A is potentially complex valued because they used instead of just . In turn that implies that your use of A^2 in the code is not correct: it might need to be abs(A)^2
You should also add any assume() calls that are reasonable. For example,
assume(x >= 0)
With all of your symbols being potentially complex valued (because you did not say otherwise), and since any of your values might be 0, then MATLAB is unable to determine the complex sign of the expression, so it has to just talk in general about limits, with it not able to prove anything about the properties of that limit.
  2 件のコメント
Ege Gurtan
Ege Gurtan 2019 年 6 月 10 日
編集済み: Ege Gurtan 2019 年 6 月 10 日
Hello, thanks for the answer, but it is not working.
clear,clc
syms A f a
syms m x h real
assume(x>=0)
assume(m>0)
assume(h>0)
f=2*A^2*(x^2)*exp((-2*a*m*x^2)/h)
I=int(f,x,0,inf)
but I still get
2*A^2*limit((2^(1/2)*a*pi^(1/2) - 2^(1/2)*a*pi^(1/2)*erfc(2^(1/2)*x*((a*m)/h)^(1/2)))/(16*a*((a*m)/h)^(3/2)) - (x*h*exp(-(2*x^2*a*m)/h))/(4*a*m), x, Inf)
Ege Gurtan
Ege Gurtan 2019 年 6 月 10 日
Nevermind. Now it works with the following code.
Thanks a lot!
clear,clc
syms A f a real
syms m x h real
assume(x>=0)
assume(m>0)
assume(h>0)
assume(a>0)
assume(A>0)
assume(f>0)
f=2*A^2*(x^2)*exp((-2*a*m*x^2)/h)
I=int(f,x,0,inf)

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

その他の回答 (0 件)

カテゴリ

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