# Chapter 2, Asmar's textbook, how to construct and plot periodic waves g:=(x,T)->x-T*floor((x+T/2)/T);f0:=u->abs(cos(u));F:=x->f0(g(x,Pi)); plot(f0(x),x=-Pi/2..Pi/2);plot(F(x),x=-Pi..Pi); plot((2/Pi)*5*g(x,Pi),x=-Pi*2..Pi*2); g1:=u->u-floor(u+1/2);plot(2*g1(u/2),u=-1..3); f1:=x->abs(cos(0.5*Pi*g1(2*x/Pi))); plot(f1(x),x=-Pi..Pi); #