2 given the following periodic function f x left begin array lll 4 and
Question
2. Given the following periodic function f(x)=\left\{\begin{array}{lll}
4 & \text { if } \quad 0<x \leq 1 \\
2 & \text { if } \quad 1<x \leq 3 \\
0 & \text { if } \quad 3<x \leq 4 \\
& f(x+4)=f(x)
\end{array}\right. (a) Sketch the function and state if it is odd, even or neither. (b) Calculate the Fourier series for the function and write down the expansion up to the term n = 8.