查看单个帖子
旧 2019-11-27, 16:22   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
默认 How to avoid Singularity in numirical integration

I want to numerically integrate the following with Matlab:



 fun=@(t) (((1 - (-1)^n*cos(n*pi*t/R)))./t);

hn = integral(fun,0,(sqrt(R^2-x^2)));


For now, I just avoided to evaluate the integral in 0, are they any way to encounter the singularity at this point.



Thank you.





More answer...
poster 当前离线   回复时引用此帖