Question: Integrating cos(k*theta) in maple; how ?

I am thinking that the integral of int(cos(k*theta), theta=-pi..pi);

is zero for k =1,2,3,4,5..., since the sin(Pi); is zero

 

When I evaluate this integral in maple

 

int(cos(k*theta), theta=-pi..pi);

 

it returns

 

2*sin(k*pi)/k

 

 

 

 

ie k multiples of pi. For the purposes of the program I am writing I want it to return zero so that subsequent calculations will eliminate certain terms but it just returns the result 2*sin(k*pi)/k and the subsequent terms are proliferating throughout the program.

 

How can I get maple to return a value of zero for int(cos(k*theta), theta=-pi..pi); ?

Where there are k multtiples of pi.

Please Wait...