matlab求变上限积分对变量x的导数

求下列变上限积分对变量x的导数

syms x a t
f=sym('sqrt(a+t) '),
int(f,x,x^2)
错在哪里了?

Warning: Explicit integral could not be found. ans =piecewise([a in Dom::ImageSet(y*i, y, R_), (2*(x^2 + a)^(3/2))/3 - (2*(a + x)^(3/2))/3], [not a in Dom::ImageSet(y*i, y, R_), int((t + a)^(1/2), t == x..x^2)])

第1个回答  2019-04-12
7.1版本的
>> syms a x t y1 y2
>> y1=sqrt(a+t)
y1 =
(a+t)^(1/2)
>> y2=int(y1,t,x,x^2);
>> diff(y2,x)
ans =
2*(a+x^2)^(1/2)*x-(a+x)^(1/2)
第2个回答  2013-10-17

你的MATLAB应该是2008b或者之后的版本吧?

 

如果经常需要用到符号运算,建议换用2008a或更早的版本。

MATLAB符号数学工具箱从2008b开始换成MuPad内核,比起早期的Maple来说,有少量改进,但更多的是不足。你的代码在早期版本上没任何问题(以古老的6.5为例):

>> syms x a t
>> f=sym('sqrt(a+t) ');
>> J=int(f,x,x^2) 
J = 
2/3*(a+x^2)^(3/2)-2/3*(a+x)^(3/2)
 
>> diff(J,x) 
ans = 
2*(a+x^2)^(1/2)*x-(a+x)^(1/2)

 

我的网盘提供了2008a下载:pan.baidu.com/s/1pCxN0,供参考选用。

本回答被提问者采纳
相似回答