> periodic:= (x,a,b) -> x - (b-a)*floor((x-a)/(b-a));
> g:= x -> piecewise(x<0, Pi+x, x>0, Pi-x); plot(g(periodic(x,-Pi,Pi)), x=-5..7);
![]()
> f:= (x,N) -> (Pi/2)+(4/Pi)*sum(cos((2*k+1)*x)/(2*k+1)^2,k=0..N);
![]()
> plot([seq(f(x,n),n=0..3)],x=-5..7); # This draws the graph of the partial sums S_k (k=1,3,5,7) of the given Fourier series
![]()
What did you do to piss off Rnch this time?