Trigonometric definite integral resulting in sinc-like function



Dear All,

If I do

integrate(cos(2*%pi*m*x),x,0,1) ;

I get back an answer

sin(2*%pi*%m)/(2*%pi*m)

which is correct for all real m.  However, if I do

declare(m,integer) ;
integrate(cos(2*%pi*m*x),x,0,1) ;

I get back an answer

0

which is not correct for all integer m (it's wrong for m = 0).

Any comments, please?

-- 

Regards,

Dan