```Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Date: Sun, 22 May 2011 13:57:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 47
Message-ID: <irb4ng\$af4\$1@newscl01ah.mathworks.com>
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)
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 =

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 =

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 =

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);