matlab语言实现数值积分sin(x)/x

求大神给解 急求

第1个回答  2013-07-01
这个问题很简单的,sinx/x is not one original expression,用泰勒级数展开可以解决
比如,sinx = x - x³/3 ..... therefore, sinx/x = 1 - x²/3 .....
你设置好精度,matlab积分1 - x²/3 .....就好了, a piece of cak
syms x
a=int('1 - x²/3 .....',x,0,1);
isstr(a)
as you can see, everything will be clear in such way追问

前面的解决了 关于3 4 不是很明白

追答

3,4 是说有效数字问题,in other way,小数点后面几位数字
format short 是四,format long 是16位
如果你想了解更多的表达,可以digits(n)和vpa(x, n)
Furthermore, help digits or help vap in matlab will be helpful.

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