Form of Kronecker Delta Not Recognized in Mathematica

  • Context: Mathematica 
  • Thread starter Thread starter DocZaius
  • Start date Start date
  • Tags Tags
    Delta Form Mathematica
Click For Summary

Discussion Overview

The discussion revolves around the behavior of a custom-defined Kronecker Delta function in Mathematica, particularly focusing on how the software simplifies expressions involving this function when the inputs are integers. The scope includes technical reasoning related to programming and mathematical definitions within computational software.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant defines a Kronecker Delta function using an integral involving sine functions and describes its expected behavior based on the values of integers m and n.
  • Another participant notes that Mathematica's simplification process assumes m and n are not equal, leading to a result of zero unless explicitly stated otherwise.
  • A third participant expresses concern over Mathematica's assumption that m and n are unique, questioning why this assumption is made when both are integers.
  • A fourth participant clarifies that Mathematica's simplification assumes unique values for all symbols in the expression, which may not align with the user's expectations.

Areas of Agreement / Disagreement

Participants generally agree that Mathematica's assumptions about the uniqueness of variables can lead to unexpected results, but there is no consensus on whether this behavior is appropriate or how it should be addressed in practice.

Contextual Notes

The discussion highlights limitations in Mathematica's handling of symbolic variables, particularly regarding assumptions about equality and uniqueness, which may affect the simplification of expressions involving the Kronecker Delta function.

DocZaius
Messages
365
Reaction score
11
kron[m_,n_]:=\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(2\)]\(\(Sin[
\*FractionBox[\(n\ \[Pi]\ x\), \(2\)]]\ Sin[
\*FractionBox[\(m\ \[Pi]\ x\), \(2\)]]\) \[DifferentialD]x\)\)

This is the integral over x of sin(n pi x / 2) times sin(m pi x / 2) from 0 to 2. This is one way to define the Kronecker Delta function. Given m and n as integers and not both zero, if m = n then the output is 1, if m ≠ n the output is 0.

Why then is it that when I type:

Simplify[kron[m, n],
Element[m, Integers] && Element[n, Integers]]

that I get zero?

If I do kron[1, 1] I get 1! How can Mathematica say a function is 0 over the integers when I just put in two integers and got a non-zero ouput?

It is certainly not identical to zero right?
 

Attachments

  • other form.png
    other form.png
    1 KB · Views: 641
  • output.png
    output.png
    3.6 KB · Views: 653
Last edited:
Physics news on Phys.org
When you force Mathematica to simplify expression it is assumed that m and n are not equal. This:

Code:
Assuming[{Element[m, Integers], Element[n, Integers], m == n}, kron[m, n]]
Assuming[{Element[m, Integers], Element[n, Integers], m != n}, kron[m, n]]

gives 1 and 0 respectively!
 
Thank you for looking into it! I didn't know Mathematica assumed m and n are not equal. Why is Mathematica making that assumption? Given two integers m and n, the possibility that they are equal is always there.

Rather worrisome Mathematica assumption that I will keep in mind from now on! I will have to handhold Mathematica by separately asking it the = and ≠ cases.
 
When you call Simplify[expression] Mathematica assumes that all symbols in expression have unique values, otherwise not!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K