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 ?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityAbs
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:
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:
is what you want.
Abs[%]
does not seem to work because of the infinite sum.
$\endgroup$
FourierSeries
result along with @mikado's DiracComb
result are perhaps better representations.
$\endgroup$
Feb 13, 2020 at 21:50
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 2π
), 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.
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$