A triangular wave of period T is illustrated in Figure 3.12 and is described by
F(t)= \begin{cases}\frac{4}{T} t-1 & 0 \leq t \leq \frac{T}{2} \\ 1-\frac{4}{T}\left(t-\frac{T}{2}\right) & \frac{T}{2} \leq t \leq T\end{cases}
Determine the Fourier coefficients for this function.
Straightforward integration of equation (3.21) yields
a_0=\frac{2}{T} \int_0^T F(t) d t (3.21)
a_0=\frac{2}{T} \int_0^{T / 2}\left(\frac{4}{T} t-1\right) d t+\frac{2}{T} \int_{T / 2}^T\left[1-\frac{4}{T}\left(t-\frac{T}{2}\right)\right] d t=0
which is also the average value of the triangular wave over one period. Similarly, integration of equation (3.23) yields the result that b_n=0 for every n. Equation (3.22) yields
a_n=\frac{2}{T} \int_0^T F(t) \cos n \omega_T t d t \quad n=1,2, \ldots (3.22)
b_n=\frac{2}{T} \int_0^T F(t) \sin n \omega_T t d t \quad n=1,2, \ldots (3.23)
\begin{aligned} a_n & =\frac{2}{T} \int_0^{T / 2}\left(\frac{4}{T} t-1\right) \cos n \omega_T t d t+\frac{2}{T} \int_{T / 2}^T\left[1-\frac{4}{T}\left(t-\frac{T}{2}\right)\right] \cos n \omega_T t d t \\ & = \begin{cases}0 & n \text { even } \\ \frac{-8}{\pi^2 n^2} & n \text { odd }\end{cases} \end{aligned}
Thus the Fourier representation of this function becomes
F(t)=-\frac{8}{\pi^2}\left[\cos \frac{2 \pi}{T} t+\frac{1}{9} \cos \frac{6 \pi}{T} t+\frac{1}{25} \cos \frac{10 \pi}{T} t \ldots\right]
which has frequency 2 \pi / T. It is instructive to plot F(t) by adding one term at a time to make clear how many terms of the infinite series are needed to obtain a reasonable representation of F(t) as plotted in Figure 3.12. (Run VTB3_3 to observe this convergence.) This is done in Figure 3.13, which is a plot of F(t) for one, two, and four terms of the Fourier series. Computer codes for computing the series and plotting the results are given in Section 3.8 and VTB3_3. Toolbox file VTB3_3 can be used to obtain the coefficients of an arbitrary signal and for plotting the results. Substitution of the values a_n and b_n into VTB 3 \_5 will visually verify the result.