0
$\begingroup$

Sorry if this has been asked before, but I couldn't find a specific answer to it.

These work, i.e. they simplify:

Sum[KroneckerDelta[a, 5] f[a], {a, Infinity}] f[5]

Sum[DiscreteDelta[a - 5] f[a], {a, Infinity}] f[5]

And:

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

Sum[DiscreteDelta[a - n] f[a], {a, Infinity}]

also simplify when explicitly indicated, i.e. when invoking Simplify / FullSimplify.

But simplifications over multiple summations don't work, even for the simplest of cases: Sum[KroneckerDelta[a, 5] f[a], {a, Infinity}, {b, Infinity}]

Sum[DiscreteDelta[a - 5] f[a], {a, Infinity}, {b, Infinity}]

Edit: As mentioned, this specific example is not good. Here is the original case that motivates my question:

$\sum_{a=0}^\infty \sum_{b=0}^\infty f(a) f(b)\ \delta_{a, b}$

that is,

Sum[f[a] f[b] KroneckerDelta[a, b], {a, 0, Infinity}, {b, 0, Infinity}]

which can be simplified to a single sum:

$\sum_{a=0}^\infty f(a)^2$

Can Mathematica be instructed to simplify expressions like these?

Thanks.

$\endgroup$
  • 2
    $\begingroup$ Your double sums are infinite, there's no way Mathematica can give you a result for them. $\endgroup$ – Roman Jun 7 at 10:15
  • $\begingroup$ You can sometimes simplify multiple infinite sums involving Kronecker deltas into a single infinite sum. I hope it's clearer now with the new example. $\endgroup$ – Mauro Lacy Jun 7 at 19:01
3
$\begingroup$

use assumptions with PositiveIntegers instead of NonNegativeIntegers:

Assuming[Element[n, PositiveIntegers], 
  Sum[KroneckerDelta[a, n] f[a], {a, Infinity}]]
(*    f[n]    *)

Assuming[Element[n, PositiveIntegers], 
  Sum[DiscreteDelta[a - n] f[a], {a, Infinity}]]
(*    f[n]    *)
$\endgroup$
  • $\begingroup$ Thanks, those work, yes. It seems I had some already defined values that were messing with the simplification rules. I'll edit the question. $\endgroup$ – Mauro Lacy Jun 7 at 10:12
  • $\begingroup$ In fact these work without assumptions, that is, just by invoking Simplify on them. $\endgroup$ – Mauro Lacy Jun 7 at 10:38
  • $\begingroup$ On my system, without assumptions the command Sum[KroneckerDelta[a, n] f[a], {a, Infinity}] // Simplify returns f[n] UnitStep[-1 + n], as it should. Please always try your code in a fresh kernel. $\endgroup$ – Roman Jun 7 at 10:45
  • $\begingroup$ My result matches yours... it's already a simplification, so, that's OK. Please take a look at the multiple sum at the end of my (edited) question. I'm in fact asking about that case. $\endgroup$ – Mauro Lacy Jun 7 at 19:03

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.