# How to obtain that result of the integral in Mathematica?

I would like to integate this equation:

Integrate[Exp[I*(t1-t2)*ω, {ω, -∞, ∞}]


According to a textbook, I know the answer is $$2\pi\delta(t_1 - t_2)$$, where $$\delta$$ is the DiracDelta function. But how can prove this directly in Mathematica?

Thank you very much!

• Why do you think your target is true? Can you kindly base it? BTW, the so-called $\delta$-function is not a usual function, but a distribution. – user64494 Apr 17 at 15:24
• FourierTransform[Exp[I (x) w], w, t]. – march Apr 17 at 15:32
• @user64494 can you give a situation where it isn't true? I.e., can you give a function $f(x)$ that does not satisfy $\int_{-\infty}^{\infty}dx\int_{-\infty}^{\infty}dy e^{i x y}f(x)= 2\pi f(0)$? Or maybe a restriction on the set to which $f$ must belong for this to be true? – Roman Apr 17 at 16:44
• Closely related: Teaching Mathematica more about DiracDelta and KroneckerDelta – Jens Apr 17 at 17:28
• @Roman: Putting $f(x):=1$ , you deal with a divergent double integral. In general, the notation $\int_{-\infty}^\infty f(x)\delta(x)\,dx$ makes no sense in traditional math. – user64494 Apr 17 at 18:01

Try this simple code which will do exactly what you wanted:

rule = Integrate[Exp[I*t_*x_], {x_, -∞, ∞}] :> 2 Pi DirectDelta[t];
Integrate[Exp[I*(t1-t2)*ω, {ω, -∞, ∞}] /. rule // Quiet


The purpose of Quiet is to ignore the error message from the Integrate which will return an unevaluted Integrate expression and then the replacement rule is to tell Mathematica we want to give the integral the value we want.

• Thanks a lot for this simple and direct answer. This is just what I need. – user14634 Apr 18 at 5:57

It's a Fourier integral. With those, Mathematica can confidently venture into generalized function territory and yield things like DiracDelta (hazardous in general). However, it doesn't recognize this unless you formulate the integral as a Fourier transform.

InverseFourierTransform[1, \[Omega], t, FourierParameters -> {-1, 1}] /. t -> t1 - t2
(* 2 \[Pi] DiracDelta[t1 - t2] *)

• Thanks a lot for the answer. But this is not what I need. I hope to yield the DiracDelta from Intagration directly, without considering Fourier transformation. Is it possiple to realize this purpose by defining some rules in Intagration? – user14634 Apr 18 at 0:36

it Diverge look at examples here http://courses.washington.edu/ph227814/228/nb/Green.nb.pdf

Thus you must do it by FourierTransform

k = t1 - t2;

FourierTransform[Exp[I k w], w, 0, FourierParameters -> {1, 1}]


• Thanks a lot for you kind help. But this is not what I need. I hope to yield the DiracDelta from Intagration directly, without considering Fourier transformation. Is it possiple to realize this purpose by defining some rules in Intagration? – user14634 Apr 18 at 0:38