1
$\begingroup$

How to obtain Kronecker delta summation rule using Wolfram Mathematica: $$ \delta_{ij}\delta_{jk}=\delta_{ik} $$

The following code does not produce the result.

Sum[KroneckerDelta[i, j] KroneckerDelta[j, k], {j, 1, 3}]

It gives the following output instead. $$ \delta_{i1}\delta_{1k}+\delta_{i2}\delta_{2k}+\delta_{i3}\delta_{3k} $$

May be this can be done by using xAct package?

$\endgroup$
  • $\begingroup$ Why should it simplify to your from? Put $i=k=4$. $\endgroup$ – Andrew Jan 12 at 12:24
  • $\begingroup$ You're right. I didn't mean that 3D space in general. But I need to simplify such summations without additional assumptions of the dimension of the space. $\endgroup$ – Ilya Bryukhanov Jan 12 at 12:40
  • $\begingroup$ Sum[KroneckerDelta[i, j] KroneckerDelta[j, k], j] // Simplify; does not provide the desired result. $\endgroup$ – Ilya Bryukhanov Jan 12 at 12:41
  • $\begingroup$ xAct can do this. It would be something like declaring DefManifold[M, 3, {i, j, k, l}] and then using (note the need to match up/down indices): In[]:= delta[-i, j] delta[-j, k] Out[]= delta[-i, k] $\endgroup$ – jose Jan 16 at 1:52
4
$\begingroup$

You might consider using DiscreteDelta[i-j] instead of KroneckerDelta[i,j]. With this substitution, the desired simplification occurs automatically:

Sum[DiscreteDelta[i - j] DiscreteDelta[j - k], {j, -\[Infinity], \[Infinity]}]
DiscreteDelta[i - k]
$\endgroup$
  • $\begingroup$ Thanks a lot!. Do you know packages for Wolfram that do the simplifications of kronecker delta expression faster than DiscreteDelta? $\endgroup$ – Ilya Bryukhanov Jan 13 at 19:55
2
$\begingroup$

This work, but doesn't give the answer in the terms of KronekerDelta function:

Simplify[Sum[KroneckerDelta[i, j] KroneckerDelta[j, k], {j, -\[Infinity], \[Infinity]}], 
 i \[Element] Integers && k \[Element] Integers]

$$ \begin{cases} 1 & i=k \\ 0 & \text{True} \end{cases} $$ If parameters $i$, $k$ etc which should be integer are known, this command changes this piecewise function into KronekerDelta:

       kroneckerReduce[expr_, freeindexes_] :=FullSimplify[expr, freeindexes \[Element] Integers] /. 
  Piecewise[{{1, freeindex1_ == freeindex2_}}, 0] -> KroneckerDelta[freeindex1, freeindex2]

as in

kroneckerReduce[Sum[KroneckerDelta[i, j] KroneckerDelta[j, k], {j, -\[Infinity], \[Infinity]}], {i, k}]

$\delta _{i,k}$

$\endgroup$
  • $\begingroup$ Thanks a lot!. Do you know packages for Wolfram that do the simplifications of kronecker delta expressions? $\endgroup$ – Ilya Bryukhanov Jan 14 at 10:23
  • $\begingroup$ @IlyaBryukhanov no. $\endgroup$ – Andrew Jan 14 at 11:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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