Let's take a switch function as an example:
$
u(t)=
\begin{cases}
1, & \text{$0<t<dT_s$} \\
0, & \text{$dT_s<t<T_s$}
\end{cases}
$
How can I get Fourier series of it in Mathematica?
Is there a way to get Fourier series of arbitrary periodic piecewise function?
Asked
Active
Viewed 2,233 times
0
J. M.'s missing motivation
- 124,525
- 11
- 401
- 574
Sheng Wang
- 1
- 2
2 Answers
2
for example:
u[t_] = Piecewise[{{1, 0 < t < dT}, {0, dT < t < T}}];
FourierTrigSeries[u[t], t, 3, FourierParameters -> {1, 2 \[Pi]/T},
Assumptions -> 0 < dT < T && 2 dT == T]
rmw
- 1,950
- 6
- 9
1
Try u[t_] := UnitStep[Sin[t]];
FourierSeries[u[x], x, 3] 3 is series
XinBae
- 617
- 3
- 9
-
1One might want to be mindful of the
FourierParameterssetting when usingFourierSeries[]and other sundry functions, lest Mathematica's chosen normalization might not be the same as your preferred one. – J. M.'s missing motivation Feb 26 '19 at 09:15

PiecewiseandFourier. – b.gates.you.know.what Feb 26 '19 at 09:09FourierSeries, right?Fourieris the discrete fourier transform (FFT). I am also puzzeld by the many different Fourier-related commands in Mathematica. – Henrik Schumacher Feb 26 '19 at 10:11