- #1
DocZaius
- 365
- 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?
\*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
Last edited: