Here is some Mathematica code:
kroneckerIntegral = Integrate[Sin[m*Pi*x]*Sin[n*Pi*x], {x, 0, 1}, Assumptions -> {n \[Element] Integers, m \[Element] Integers}]
FullSimplify[kroneckerIntegral, {n \[Element] Integers, m \[Element] Integers}]
FullSimplify[Integrate[Sin[m*Pi*x]*Sin[m*Pi*x], {x, 0, 1}], {m \[Element] Integers}]
The resulting Mathematica output of these three lines is:
$$\frac{n \sin (\pi m) \cos (\pi n)-m \cos (\pi m) \sin (\pi n)}{\pi m^2-\pi n^2}$$ $$0$$ $$\frac{1}{2}$$
So essentially kroneckerIntegral
can be written in terms of a Kronecker delta as $\frac{\delta_{mn} - \delta_{-nm}}{2}$, which is also a direct result of the well known Fourier orthogonality relations.
Now how do I get Mathematica to simplify the integral to that expression? The reason I want to do this is because I have some long calculation that involves a few of these integrals and it would be convenient to tell Mathematica e.g. in form of a rule that I need this expression in terms of the Kronecker delta.