Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: dblquad tolerance error?
Date: Sun, 22 May 2011 13:57:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 47
Message-ID: <irb4ng$af4$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1306072624 10724 172.30.248.35 (22 May 2011 13:57:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 22 May 2011 13:57:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2622024
Xref: news.mathworks.com comp.soft-sys.matlab:728053

can anyone explain me why this happens?:
the exact result of he following integral should be 0.25.

tol=1e-4;
m=1;n=8;
SS_SS=@(r,s) sin(m*pi*r).*sin(n*pi*s).*sin(m*pi*r).*sin(n*pi*s);
int=dblquad(SS_SS,0,1,0,1,tol)

int =

   0.148124475845163

%%____________________________________________________

tol=1e-5;
m=1;n=8;
SS_SS=@(r,s) sin(m*pi*r).*sin(n*pi*s).*sin(m*pi*r).*sin(n*pi*s);
int=dblquad(SS_SS,0,1,0,1,tol)

int =

   0.249994642535650


in the first case the error is much more than the tolerance i decided
the same happens in this case:

tol=1e-6;
m=1;n=9;
SS_SS=@(r,s) sin(m*pi*r).*sin(n*pi*s).*sin(m*pi*r).*sin(n*pi*s);
int=dblquad(SS_SS,0,1,0,1,tol)

int =

   0.358850282303449
%%____________________________________________________

tol=1e-7;
m=1;n=9;
SS_SS=@(r,s) sin(m*pi*r).*sin(n*pi*s).*sin(m*pi*r).*sin(n*pi*s);
int=dblquad(SS_SS,0,1,0,1,tol)

int =

   0.250000001116561

i'm using matlab R2011a