4
$\begingroup$

The code FourierTransform[Abs[Sin[t]], t, w] gives me a timeout like "This computation has exceeded the time limit for your plan."

What indeed is the FT of $|\sin(x)|$ ? Why can't Mathematica compute it ?

$\endgroup$
  • $\begingroup$ The Fourier transform of $|\sin t|$ does not exist in traditional math because the integral $\int_{\mathbb{R}} |\sin t|\,dt$ diverges (see encyclopediaofmath.org/index.php/Fourier_transform for info). $\endgroup$ – user64494 Feb 13 at 17:03
  • 4
    $\begingroup$ @user64494 $|\sin t|$ is tempered so its Fourier transform is perfectly well-defined. This is explained in your own link ("In classical analysis such a generalization has been constructed for locally integrable functions..."). Please stop making wrong statements about distributions, or learn the basics first. $\endgroup$ – AccidentalFourierTransform Feb 14 at 0:04
  • 2
    $\begingroup$ Pulling an actual book from my shelves, I find that Bracewell has the transform of Abs[Cos[t]] in his "pictorial dictionary". Adjusting for his eccentric scaling, it's the same as the series in the answers below, but with signs of terms alternating to get the phasing right. $\endgroup$ – John Doty Feb 14 at 2:40
7
$\begingroup$

Abs isn't analytic, and using it here seems to lead FourierTransform to get lost in the complex plane. Use RealAbs:

FourierTransform[RealAbs[Sin[t]], t, w]

yielding:

enter image description here

Since the function is periodic, its transform is a train of delta functions. Something like FourierSeries might be more illuminating here. Maybe something like:

ComplexExpand[FourierSeries[RealAbs[Sin[t]], t, 10]]

yielding:

enter image description here

is what you want.

| improve this answer | |
$\endgroup$
  • $\begingroup$ thanks for the answer! could I get further insight by perhaps getting the magnitude of this complex result? Abs[%] does not seem to work because of the infinite sum. $\endgroup$ – mlg556 Feb 13 at 15:29
  • $\begingroup$ The result of FourierTransform[RealAbs[Sin[t]], t, w] is [CASE:4370384] reported by me on 08.01.20 This result is not a closed-form expression, but an analytic expression (see en.wikipedia.org/wiki/Closed-form_expression ). It is difficult to work with it. I was answered that the Mathematica devolopers were informed about that. $\endgroup$ – user64494 Feb 13 at 16:32
  • 1
    $\begingroup$ @user64494 : what closed-form do you expect for an infinite train of delta functions? $\endgroup$ – John Doty Feb 13 at 17:37
  • 1
    $\begingroup$ @user64494 : but it gives something that appears to be a correct answer. What's wrong with that? $\endgroup$ – John Doty Feb 13 at 20:42
  • 3
    $\begingroup$ @user64494: it exists in the pragmatic sense that we use in applied physics, and my FourierSeries result along with @mikado's DiracComb result are perhaps better representations. $\endgroup$ – John Doty Feb 13 at 21:50
8
$\begingroup$

You can obtain a simple expression using the convolution theorem. A single cycle of the waveform is given by

sig = Sin[t] UnitBox[t/π - 1/2]

This has a relatively simple Fourier Transform

spec = FullSimplify[FourierTransform[sig, t, ω]]
(* -((1 + E^(I π ω))/(Sqrt[2 π] (-1 + ω^2))) *)

We can convert our single cycle into a periodic signal by convolution with a Dirac Comb. This transforms to another Dirac comb

combspec = FourierTransform[DiracComb[t/π], t, ω]
(* Sqrt[π/2] DiracComb[ω/2] *)

By the convolution theorem (this probably needs multiply by a something like ), the Fourier transform of periodic signal is given by

Assuming[ω/2 ∈ Integers, FullSimplify[combspec*spec]]
(* DiracComb[ω/2]/(1 - ω^2) *)

Note that we can simplify the factor in front of the comb, as its value only needs to be correct for cases where the comb is non-zero.

| improve this answer | |
$\endgroup$
  • $\begingroup$ However, the actions of FourierTransform and InverseFourierTransform on DiracDelta related functions are not reliable and correct in many cases (see that recent discussion mathematica.stackexchange.com/questions/212352/… ) . $\endgroup$ – user64494 Feb 13 at 21:43
  • 2
    $\begingroup$ With this excellent answer, we now have three different approaches yielding equivalent results. $\endgroup$ – John Doty Feb 13 at 22:46

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.