MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]积分的计算 (https://www.labfans.com/bbs/showthread.php?t=3983)

yue_liang423 2008-07-23 21:42

[求助]积分的计算
 
如何计算1/sin(theta) 从0到pi的积分?遇到奇异性怎么解决?

zhanhuichong 2008-07-23 22:08

2 个附件
该表达式不可积分因为
>> 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)


所有时间均为北京时间。现在的时间是 06:31

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.