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?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityEdit: 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] *)
Assuming[m > 0 && m ∈ Integers && nn > m, Sum[KroneckerDelta[m, n] f[n], {n, nn}]]
$\endgroup$
Jun 25, 2014 at 17:57
Infinity
. But in version 8, the simplification works even when the upper limit isInfinity
. $\endgroup$