Plot[Pi/2 + (4/Pi) Sum[Cos[(2 n + 1) x]/(2 n + 1)^2, {n, 0, Infinity}],{x,-Pi,Pi}]