Integration of some function containing a singularity
조회 수: 11 (최근 30일)
이전 댓글 표시
Dear All,
These days I am working on some integration integrate(cos(x)*sin(x)/x^t),x(0,a),a is a value. the value fot t is 1, 2, 3. The function also have the form cosx*cosx and sinx*sinx. The value x = 0 is the singularity. How to overcome this singularity. The function quadgk can integrate some funtion with endpoint singularity. x = 0 is the end point singularity. But the integral is not correct when use quadgk. How to solve this problem.
Thank you for your concern.
댓글 수: 0
채택된 답변
Mike Hosea
2012년 3월 20일
QUADGK has no trouble when t=1, but for t=2,3,4,... the correct answer, if I am not mistaken, is Inf. You were expecting QUADGK to return Inf for you?
댓글 수: 3
Mike Hosea
2012년 3월 21일
I believe QUADGK handles that case properly, though you may well run into precision issues.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!