Why am I unable to integrate the HEAVISIDE function symbolically in certain forms using the Symbolic Math Toolbox 3.1 (R14)?
13 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2013-10-18
回答: MathWorks Support Team
2013-10-29
The ability of the INT function to find an explicit solution sometimes depends on the order in which a multiplication is presented. I enter the following code:
clear all
syms t x
f = heaviside(x)*heaviside(t-x);
g= int(f,x,-Inf,Inf)
and receive the expected output:
g =
t-heaviside(-t)*t
However, when I enter the following code:
clear all
syms t x
f = heaviside(t-x)*heaviside(x);
g = int(f,x,-Inf,Inf)
I receive the following warning message:
Warning: Explicit integral could not be found.
In sym.int at 58
g = int(heaviside(t-x)*heaviside(x),x = -Inf .. Inf)
采纳的回答
MathWorks Support Team
2013-10-18
This issue is a bug in the Maple kernel that Symbolic Math Toolbox 3.1 (R14) uses to perform symbolic integration. Maple does not recognize the second integrand expression as satisfying the formula it uses to calculate the first integral.
Adding a call to the SIMPLIFY function to the end of the code will return the correct result, as shown in the following example:
clear all
syms t x
f = heaviside(t-x)*heaviside(x);
g = int(f,x,-Inf,Inf)
h=simplify(g)
Note:
This solution is is applicable to releases of MATLAB before MATLAB 7.5 (R2007b). The computation engine used for the Symbolic Math Toolbox has since changed.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!