找不到明确的积分 [英] Explicit integral could not be found
问题描述
如果我尝试评估以下积分,我将收到一个众所周知的错误:找不到明确的积分"
I am getting a well-known error of "Explicit integral could not be found" if I try to evaluate following integral
syms z;
funz=1./(1+exp((z*z-0.5)/0.1));
Integ2=int(funz,z,0,inf)
我得到警告:
Warning: Explicit integral could not be found.
Integ2 =
int(1/(exp(10*z^2 - 5) + 1), z == 0..Inf)
Mathematica将该积分评估为0.693
.
Mathematica evaluates this integral to 0.693
.
我尝试将积分下限替换为较小的有限数字(0.001),但这无济于事. 请帮助确定解决此问题的方法. 任何帮助表示赞赏. 非常感谢!
I have tried replacing lower integration limit to some small finite number (0.001) but that doesn't help. Please help in identifying the fix for this problem. Any help is appreciated. Thanks a lot !
推荐答案
尝试可变精度算术,vpa
:
syms z;
funz=1./(1+exp((z*z-0.5)/0.1));
Integ2=int(funz,z,0,inf)
Warning: Explicit integral could not be found.
Integ2 =
int(1/(exp(10*z^2 - 5) + 1), z = 0..Inf)
vpa(Integ2,5) % 5 is the number of significant digits
ans =
0.69305
请参见文档近似定积分"中的最后一个示例. 引用:
See the last example in the documentation, "Approximate Definite Integrals". Quote:
如果int无法计算定积分的闭合形式,请尝试 使用vpa在数值上近似该积分.
If int cannot compute a closed form of a definite integral, try approximating that integral numerically using vpa.
这篇关于找不到明确的积分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!