matlab为什么编程的结果不对啊?是不是版本原因啊??

Matlab R2013b运行,得到 syms x t int((-2*x^2+1)/(2*x^2-3*x+1)^2,cos(t),exp(2*t))ans = piecewise([cos(t) in Dom::Interval(1/2, [1]) and 1
matlab为什么编程的结果不对啊?是不是版本原因啊??
是的,跟Matlab的版本有关系。
Matlab7.0运行,得到

syms x t
int((-2*x^2+1)/(2*x^2-3*x+1)^2,cos(t),exp(2*t))
ans =
-(-2*exp(2*t)*cos(t)^2-exp(2*t)+cos(t)+2*exp(2*t)^2*cos(t))/(exp(2*t)-1)/(2*exp(2*t)-1)/(cos(t)-1)/(2*cos(t)-1)
>> simplify(ans)
ans =
(2*exp(2*t)*cos(t)^2+exp(2*t)-cos(t)-2*exp(4*t)*cos(t))/(2*exp(2*t)-1)/(exp(2*t)-1)/(2*cos(t)^2-3*cos(t)+1)
Matlab R2013b运行,得到

syms x t
int((-2*x^2+1)/(2*x^2-3*x+1)^2,cos(t),exp(2*t))
ans =
piecewise([cos(t) in Dom::Interval(1/2, [1]) and 1 <= exp(2*t), 1/(exp(2*t) - 1) - 1/(2*exp(2*t) - 1) - Inf], [(1 < cos(t) or not 1 <= exp(2*t)) and (1/2 < cos(t) or not 1/2 <= exp(2*t)), -((exp(2*t) - cos(t))*(2*exp(2*t)*cos(t) - 1))/((cos(t) - 1)*(2*cos(t) - 1)*(exp(2*t) - 1)*(2*exp(2*t) - 1))], [(not 1 < cos(t) and 1 <= exp(2*t) or not 1/2 < cos(t) and 1/2 <= exp(2*t)) and (not cos(t) in Dom::Interval(1/2, [1]) or not 1 <= exp(2*t)), -int((2*x^2 - 1)/(2*x^2 - 3*x + 1)^2, x == cos(t)..exp(2*t))])
结果与Matlab R2014b一样2014-08-04
是对的,matlab中就这样表示2014-08-04
mengvlog 阅读 28 次 更新于 2025-08-09 16:19:01 我来答关注问题0
檬味博客在线解答立即免费咨询

编程相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部