PDA

查看完整版本 : [求助]积分的计算


yue_liang423
2008-07-23, 21:42
如何计算1/sin(theta) 从0到pi的积分?遇到奇异性怎么解决?

zhanhuichong
2008-07-23, 22:08
该表达式不可积分因为
>> tt=int('1/sin(x)')

tt =

log(csc(x)-cot(x))

>>x=eps;eval(tt)

ans =

-Inf

而ezplot(tt)如想如下:

yfchenth2
2008-07-23, 23:03
这样就可以了
clc
clear
x=(0:pi/10000:pi)+eps;
y=1./x;
yy=trapz(x,y)