Since the main goal of the question appears to be dealing with general functions h
that are assumed to be a complete orthonormal set, I'll deal specifically only with that case.
The idea is to use TagSetDelayed
as a way of stating the assumptions for the function h
. To do this, we have to distinguish between the two types of products as they arise in the orthogonality relation (Integrate
) and the completeness relation (Sum
). Because the function h
itself is too deep inside the integral or sum, I define an intermediate function for each of the two types of product first. For them, I then specify what the result of the operation should be.
h /: h[n_, x_] h[m_, x_] := hOrthoProduct[n, m, x]
hOrthoProduct /:
Integrate[
hOrthoProduct[n_, m_, x_], {x_, -Infinity, Infinity}] := KroneckerDelta[m, n]
h /: h[n_, x_] h[n_, y_] := hCompleteProduct[n, x, y]
hCompleteProduct /:
Sum[hCompleteProduct[n_, x_, y_], {n_, 0, Infinity | DirectedInfinity[1]}] :=
DiracDelta[x - y]
Here I test the results:
Integrate[h[n, x] h[m, x], {x, -Infinity, Infinity}]
(* ==> KroneckerDelta[m, n] *)
Sum[h[n, x] h[n, y], {n, 0, Infinity}]
(* ==> DiracDelta[x - y] *)
Edit working with built-in functions, in Limit
, Sum
or Integrate
As I mentioned in the comments, many known expressions for the delta function can be obtained by wrapping the required limit in Fourier transforms. The point is that the limit (or infinite integration boundary) can then be interpreted in terms of a generalized function because the intended integration variables are made explicit in FourierTransform
.
But in Limit
, Sum
and Integrate
, this information is not provided explicitly. So here is a possible way of fixing this lack of information: Whenever we want to perform a limit in the special way that leads to a Dirac delta function, let's just require that in all those cases the variable in the limit should have a special name. This name should also include the symbol that's intended to be used as the free integration variable in the conversion to a delta function later.
I decided to call this special variable ℒ
but give it an argument x
that stands for the free variable. So you will be using variables like ℒ[x]
or ℒ[z]
in the calculation. Here are the definitions for this "variable":
ℒ /:
HoldPattern[
Rule[ℒ[x_],
lim : (0 | Infinity |
DirectedInfinity[1])]] := ℒlimit[lim, x]
ℒ /: {ℒ[x_], -Infinity, Infinity} := ℒinterval[x]
ℒlimit /:
Limit[expr_, ℒlimit[lim_, x_]] :=
Module[{y, ϵ},
InverseFourierTransform[
Limit[FourierTransform[expr /. ℒ[x] -> ϵ,
x, y], ϵ -> lim, Direction -> Sign[lim - 1]], y, x]]
ℒinterval /:
op_[expr_, ℒinterval[x_]] := Module[{y, z},
InverseFourierTransform[
op[FourierTransform[expr /. ℒ[x] -> z, x,
y], {z, -Infinity, Infinity}], y, x]]
Now some tests:
Limit[ℒ[x]/(x^2 + ℒ[x]^2), ℒ[x] -> 0]
(* ==> Pi DiracDelta[x] *)
Sum[
Exp[I k ℒ[k]], {ℒ[k], -Infinity, Infinity}]
(* ==> DiracComb[k/(2 Pi)] *)
Integrate[
Exp[I k ℒ[k]], {ℒ[k], -Infinity, Infinity}]
(* ==> 2 Pi DiracDelta[k] *)
Limit[
Sin[ω ℒ[ω]]^2/(Pi ℒ[ω] ω^2), ℒ[ω] -> Infinity]
(* ==> DiracDelta[ω] *)
So the variable starting with ℒ
will cause any Limit
, Sum
or Integrate
in which it appears in the second argument to be sandwiched between InverseFourierTransform
and FourierTransform
with the additional information about what the desired final variable is.
InverseFourierTransform[ Limit[ FourierTransform[a/(x^2+a^2),x,y], a->0], y,x]
yields $\pi \delta(x)$. See Laplacian and DiracDelta. This also works with additional relations, not in your list, e.g.,InverseFourierTransform[ Limit[ FourierTransform[Sin[ω t]^2/(π t ω^2),ω,τ], t->∞], τ,ω]
$\endgroup$ – Jens Mar 17 '16 at 16:06KroneckerDelta
can't be valid in general because Mathematica doesn't know that the arguments in those results are supposed to be integers. It generically assumes complex variables, but adds some reality assumptions inFourierTransform
. So for point 3, you would in general expect something involvingDiracComb
instead ofKroneckerDelta
. $\endgroup$ – Jens Mar 17 '16 at 16:34