1
$\begingroup$

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?

$\endgroup$
9
  • $\begingroup$ Mathematica gives result which is generic. You could always add extra assumption. Here is screen shot !Mathematica graphics which gives zero only when k!=m and gives 1 when k=m but I do not know if there is way to make Integrate do that on its own. $\endgroup$
    – Nasser
    Commented Nov 22, 2023 at 19:48
  • $\begingroup$ @Nasser: Thanks. The result $0$ isn't exactly "generic," but instead the typical case. I realize I could split the cases into $k=m$ and $k \neq m$, but I would have thought that Mathematica could do this explicitly. $\endgroup$ Commented Nov 22, 2023 at 19:50
  • 1
    $\begingroup$ Should be a Kronecker delta, not a Dirac delta. $\endgroup$
    – Roman
    Commented Nov 22, 2023 at 19:58
  • 1
    $\begingroup$ Using FullSimplify on that result with the same assumptions reduces it to 0 though. $\endgroup$
    – eyorble
    Commented Nov 22, 2023 at 23:23
  • 1
    $\begingroup$ Here is one older version among several others. $\endgroup$ Commented Nov 24, 2023 at 2:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.