FourierSeries
FourierSeries[expr, t, n] gives the nth-order Fourier series expansion of expr in t.
FourierSeries[expr, {t1, t2, …}, {n1, n2, …}] gives the multidimensional Fourier series.
Examples
Compute a Fourier series:
FourierSeries[t, t, 3]Fourier series of a square wave:
FourierSeries[Sign[Sin[t]], t, 5]Please visit the official Wolfram Language Reference for more details.