(* To plot partial sum 10.2.19 for m=5 *)

g5=Sum[Sin[(2*n-1)*Pi*x/2]/(2*n-1),{n,1,5}];
Plot[g5,{x,0,12}]

(* To plot error over one period (0≤x≤4) for 10.2.19, with m=5. FOR USE WITH 10.2.25, 10.3.7 *)

f=Piecewise[{{1,0<=x<2},{-1,2≤x<4}},Indeterminate]
g5=Sum[Sin[(2*n-1)*Pi*x/2]/(2*n-1),{n,1,5}];
Plot[Abs[f-g5],{x,0,4},PlotRange->{{0,4},{0,1}}]