Question: No kronecker delta

I have two issues.

if I say

int(exp(I*k*x),x=-Pi..Pi) assuming k::integer

Maple answers me with 

0

which is wrong, as one would expect the result to be a kronecker delta (k=0 is a type-integer for mapel). Is there a way to make Maple understand it is doing a mistake?

Related to this there is another point.

If I write

int(exp(I*(k-q)*x),x=-infinity..infinity)

Maple does not write (or convert) the result into Dirac delta funtion. If I try 'value(%)' I get an undefined result. Is there a way to tell Maple that that function is Dirac? Maybe with command convert?

Please Wait...