I want to evaluate this simple expression $$ \sum_n f(n)\delta_{mn} = f(m) $$ using this:

Sum[KroneckerDelta[m, n] f[n], {n, Infinity}]

However Mathematica didn't reduce this expression. Could someone tell me how to do this correctly?

  • $\begingroup$ related mathematica.stackexchange.com/questions/51424/… $\endgroup$ – george2079 Jun 24 '14 at 21:25
  • $\begingroup$ In my opinion this should be tagged as a bug because it's a regression. In version 9, the sum works with any finite numerical upper limit, but not with Infinity. But in version 8, the simplification works even when the upper limit is Infinity. $\endgroup$ – Jens Jun 25 '14 at 17:24

Edit: The following solution works in Mathemtica 8.0.4, but not in 9.0.1:

This requires an assumption about the parameter m:

Assuming[m > 0 && m ∈ Integers, 
 Sum[KroneckerDelta[m, n] f[n], {n, Infinity}]]

(* ==> f[m] *)
  • $\begingroup$ I have tried your code, but mathematica didn't reduce the expression neither. I am using Mathematica 9. $\endgroup$ – entron Jun 25 '14 at 12:57
  • $\begingroup$ @entron You're right, it works in version 8 and not in version 9! I'll think about it. Seems like a bug to me. $\endgroup$ – Jens Jun 25 '14 at 17:14
  • $\begingroup$ Does this work in 8? Assuming[m > 0 && m ∈ Integers && nn > m, Sum[KroneckerDelta[m, n] f[n], {n, nn}]] $\endgroup$ – george2079 Jun 25 '14 at 17:57
  • $\begingroup$ @george2079 yes - that works fine. It's the infinite case that causes trouble. $\endgroup$ – Jens Jun 25 '14 at 18:07
  • $\begingroup$ that then suggests another approach to the linked question $\endgroup$ – george2079 Jun 25 '14 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.