1
$\begingroup$

I'm having trouble getting Mathematica (11.0.1.0, OSX High Sierra) to evaluate the following sum:

$\sum_{i=0}^{\infty} f(i) \, g(i) \, \delta_{i,j}$

My code is

Sum[f[i] g[i] KroneckerDelta[i, j], {i, 0, Infinity}]

The output I was expecting was

f[j] g[j] UnitStep[j]

but instead I get the original sum. When I remove f[i] or g[i] from the expression, however, I get the expected result.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Try using assumptions:

Assuming[
    j ∈ Integers && j >= 0,
    Sum[f[i] g[i] KroneckerDelta[i, j], {i, 0, Infinity}]
]

f[j] g[j]

$\endgroup$
4
  • 1
    $\begingroup$ Hmm, that doesn't seem to work -- I just get the sum back. $\endgroup$ Commented Feb 24, 2018 at 3:00
  • $\begingroup$ @RichardTownsend Seems like this was improved in M11.2. $\endgroup$
    – Carl Woll
    Commented Feb 24, 2018 at 3:03
  • $\begingroup$ Unfortunately, my University site licence appears to be stuck at 11.0.1.0. I'll have to find out what the plans are for updating it. But in the meantime, many thanks for the quick response. $\endgroup$ Commented Feb 24, 2018 at 3:08
  • $\begingroup$ Ok, managed to upgrade to 11.2, and your solution works perfectly. Many thanks again, Carl! $\endgroup$ Commented Feb 24, 2018 at 3:58

Your Answer

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

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