9

$\int\limits_{-\infty}^\infty {{e^{i\omega t}}d\omega} = 2\pi \delta \left( t \right)$ is generally accepted.

But

Integrate[E^(I w t), {w, -\[Infinity], \[Infinity]}, 
 Assumptions -> t \[Element] Reals]

gives

Integrate::idiv: Integral of E^(I t w) does not converge on {-[Infinity],[Infinity]}.

and

Integrate[E^(I w t), {w, -\[Infinity], \[Infinity]}, 
 PrincipalValue -> True, Assumptions -> t \[Element] Reals]

gives 0

So is it possible to get the correct delta function result?

matheorem
  • 17,132
  • 8
  • 45
  • 115
  • 10
    Documentation pages of DiracDelta say: "Integrate never gives DiracDelta as an integral of smooth functions:... FourierTransform can give DiracDelta", there are appropriate examples, as well. – Artes Jan 10 '18 at 00:44
  • @Artes Thank you for this information : ) – matheorem Jan 10 '18 at 01:03
  • Duplicate: https://mathematica.stackexchange.com/questions/110263/teaching-mathematica-more-about-diracdelta-and-kroneckerdelta – Michael E2 Dec 27 '18 at 16:23

1 Answers1

12

(updated to use FourierTransform correctly)

You could use FourierTransform:

FourierTransform[1, ω, t, FourierParameters->{1,1}]
2 π DiracDelta[t]

To restrict the integration over the positive $t$ axis, include HeavisideTheta:

FourierTransform[HeavisideTheta[t], t, ω, FourierParameters->{1,1}]
I/ω + π DiracDelta[ω]
m0nhawk
  • 3,867
  • 1
  • 20
  • 35
Carl Woll
  • 130,679
  • 6
  • 243
  • 355
  • Thank you so much. +1 What about $\int_0^\infty {{e^{i\omega t}}dt} = i{\cal P}\frac{1}{\omega }{\rm{ + }}\pi \delta \left( \omega \right)$? Is it possible? – matheorem Jan 10 '18 at 01:03
  • @matheorem See update. I also fixed my usage of FourierTransform. – Carl Woll Jan 10 '18 at 01:21