Number 19 from the bookrestart:with(plots):f:=x->piecewise(x>-Pi and x < -1/2, 0, x>-1/2 and x<1/2, 1,x>1/2 and x<Pi,0);plot(f(x),x=-Pi..Pi);Part aE:=1/Pi*int(f(x),x=-Pi..Pi);a_0:=1/(2*Pi)*int(f(x),x=-Pi..Pi);2*(a_0)^2;evalf(2*(a_0)^2/E);a_1:=1/Pi*int(f(x)*cos(x),x=-Pi..Pi);b_1:=1/Pi*int(f(x)*sin(x),x=-Pi..Pi);a_k:=1/Pi*int(f(x)*cos(k*x),x=-Pi..Pi);a_0+a_1*cos(x)+b_1*sin(x);plot({f(x),28*sin(x)/Pi},x=-Pi..Pi);a_2:=1/Pi*int(f(x)*cos(2*x),x=-Pi..Pi);b_2:=1/Pi*int(f(x)*sin(2*x),x=-Pi..Pi);a_3:=1/Pi*int(f(x)*cos(3*x),x=-Pi..Pi);b_3:=1/Pi*int(f(x)*sin(3*x),x=-Pi..Pi);a_0+a_1*cos(x)+b_1*sin(x)+a_2*cos(2*x)+b_2*sin(2*x)+a_3*cos(3*x)+b_3*sin(3*x);Here are some commands so that the coefficients can be written as sequencesrestart:L:=2*Pi;a_0:=int(f(x),x=-L/2..L/2)/L;a:=(m,L)->2*int(cos(2*m*Pi*x/L)*f(x),x=-L/2..L/2)/L; seq(a[p]=a(p,L),p=1..5);b:=(m,L)->2*int(sin(2*m*Pi*x/L)*f(x),x=-L/2..L/2)/L; seq(b[p]=b(p,L),p=1..5);