I feel confident this problem has been posed before but alas I cannot find it.
Clear[k, m];
Assuming[Element[{k, m}, NonNegativeIntegers],
Integrate[E^(2 Pi I (k - m) t), {t, 0, 1}]]
yields 0
, which is only valid when $k \neq m$. The answer should instead be a KroneckerDelta
with indices $k$ and $m$.
How do I ensure the case $k=m$ is also included in the result?
k!=m
and gives 1 whenk=m
but I do not know if there is way to make Integrate do that on its own. $\endgroup$FullSimplify
on that result with the same assumptions reduces it to0
though. $\endgroup$