matlab中对数的函数符号

来源:百度知道 编辑:UC知道 时间:2024/07/08 22:49:50
像这个函数求积分怎么求:ln(x+(x^2+1)^0.5),用matlab....
谢谢了先
clear; syms x;
int(g(x+(x^.2+1)^.0.5))
但是提示
??? int(g(x+(x^.2+1)^.0.5))
|
Error: ")" expected, "numeric value" found.

我去下 7.0的,不过我用6。5的时候出现>> clear; syms x;
>> diff(log(x+(x^2+1)^(1/2))*x-(x^2+1)^(1/2))

ans =

(1+1/(x^2+1)^(1/2)*x)/(x+(x^2+1)^(1/2))*x+log(x+(x^2+1)^(1/2))-1/(x^2+1)^(1/2)*x

>>
为什么会不一样啊

可以得到解的

>> clear;syms x;
>> int(log(x+(x^2+1)^.5))

ans =

log(x+(x^2+1)^(1/2))*x-(x^2+1)^(1/2)

运行版本:Matlab7.0

matalb中对数的符号是log(自己help一下)

求的时候中间不要用点乘了。

==================================
你是要求积分还是什么呀?怎么用diff了???

直接打:
log(x+(x^2+1)^0.5)
帮助中有关log的说明
help log

LOG Natural logarithm.
LOG(X) is the natural logarithm of the elements of X.
Complex results are produced if X is not positive.
如果只要数值解,那直接用trapz。
一般matlab做解析解不好用,要解析解用mathmatic。

>> int(log(x+x^2+1)^0.5)
Warning: Explicit integral could not be found.
> In sym.int at 58

ans =

int(log(x+x^2+1)^(1/2),x)

>>
命令应该是这样的,不过好像MATLAB得不到解...