
2.6.2.5 Trigonometric Fourier series
Problem:
Expand function \( f(x) \) in a Fourier series in the form of a superposition of simple harmonics, given on the segment line \( [-T / 2, T / 2] \).
Plot the amplitude and phase spectra.
The values of parameters \( T, h, p \) and \( q \) are given in the table:
\begin{tabular}{|c|c|c|c|}
\hline\( T \) & \( h \) & \( p \) & \( q \) \\
\hline 2 & 2 & -2 & 1 \\
\hline
\end{tabular}
\( f(x)=\left\{\begin{array}{cc}h-\frac{2 h}{T} x, & -T / 2 \leq x<0 \\ p, & 0 \leq x