1
$\begingroup$

For example, let's say I want to compute the (continuous-time) Fourier transform of the signal/function $\cos{(3t)}$, which is given by the following improper integral:

$\displaystyle\int_{-\infty}^{\infty} \cos{(3t)} e^{-j\omega t} \, \mathrm{dt} \tag 1$

whose value is:

$\pi \, \delta{(\omega - 3)} + \pi \, \delta{(\omega + 3)} \tag 2$

The corresponding Mathematica code to compute the integral of (1) would be Integrate[Cos[3*t]*Exp[-I*w*t], {t, -Infinity, Infinity}, Assumptions -> {w \[Element] Reals}]. However, after executing such code Mathematica returns the message "Integrate: Integral of $e^{-i t w} \text{Cos}{[3 t]}$ does not converge on {$-\infty$,$\infty$}." How can I tell Mathematica to use the impulse/Dirac delta function during the computation of the integral, in order to return (2) or something similar?

$\endgroup$
3
  • 5
    $\begingroup$ Use FourierTransform instead, e.g., FourierTransform[Cos[3 t], t, w, FourierParameters -> {1, 1}]. $\endgroup$
    – Carl Woll
    Jan 27 at 17:48
  • 2
    $\begingroup$ It should be noticed that FourierTransform[Cos[3 t], t, w, FourierParameters -> {1, 1}] is not an proper divergent integral, but uses another definition (e.g. see Fourier transform or/and Encyclopedia of Mathematics). I think this is impemented in Mathematica as a table value. $\endgroup$
    – user64494
    Jan 27 at 18:05
  • $\begingroup$ Workaround: InverseFourierTransform[ Integrate[ FourierTransform[Cos[3*t] Exp[-I \[Omega] t], \[Omega], s], {t, -Infinity, Infinity}, Assumptions -> s \[Element] Reals], s, \[Omega]] $\endgroup$ Jan 28 at 17:17

1 Answer 1

7
$\begingroup$

If you use Dirac or Heaviside functions explicitly in your expression, Mathematica figures out that you're working with generalized functions. Unfortunately, it doesn't always work the other way: Mathematica won't volunteer to use generalized functions unless you're explicitly using Fourier/Laplace transforms. So, if you're working with Fourier integrals, and want results in terms of generalized functions, you need to use FourierTransform rather than Integrate.

$\endgroup$
2
  • 1
    $\begingroup$ Hi John (remember me?) This is a nice example of an integral the type you were describing in our recent conversation. One can integrate over a large symmetric range and get a pair of sincs. Taking the limit as the range ->infinity gives deltas. That said, Limit will not recognize this (Limit has its limits). But this manner of integration does involve a regularization insofar as we in effect take a principle value integral. PS I upvoted this. $\endgroup$ Jan 27 at 19:26
  • $\begingroup$ @DanielLichtblau ツ $\endgroup$
    – John Doty
    Jan 27 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.