Path: news.mathworks.com!not-for-mail From: "Bruno Luong" <b.luong@fogale.findmycountry> Newsgroups: comp.soft-sys.matlab Subject: Re: integral function f(x,y) has singularity ? Date: Tue, 8 Nov 2011 07:29:10 +0000 (UTC) Organization: FOGALE nanotech Lines: 19 Message-ID: <j9alo6$3vq$1@newscl01ah.mathworks.com> References: <j9abju$4uh$1@newscl01ah.mathworks.com> Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry> NNTP-Posting-Host: www-06-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1320737350 4090 172.30.248.38 (8 Nov 2011 07:29:10 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Tue, 8 Nov 2011 07:29:10 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 390839 Xref: news.mathworks.com comp.soft-sys.matlab:748623 "mathslife " <benobenim84@hotmail.com> wrote in message <j9abju$4uh$1@newscl01ah.mathworks.com>... > hi, > i am working on a program about collocation method and i need to find > \int_{0}^{2+pi} 1/cos(x+y)dy > i would like to use guad function. for the collocation point we have x_k=2*pi*i*k/(2*n+1) > i wrote a program for it like > > m=@(y) 1./ cos(x(k+n+1)+y); > > T=quad(m,0,2*pi); > It looks like you are building the matrix of integral equation. The matrix is a limits when the singularity converges towards the collocation points, and not taken the integral when the singularity is AT the collocation which - in some case such as double layer potential - gives a meaningless answer as Roger pointed out. This limit is called "jump relation" and you can find the close form expression in many books. No need to compute limit of the integral numerically. Bruno