cosx[x_]=0.5-(4/Pi^2)*(∑_(n=0)^∞)Cos[(2*n+1)*Pi*x]/(2*n+1)^2

Plot[cosx[x],{x,-6,6}]

sinx[x_]=(2/Pi)*(∑_(n=1)^∞)(Sin[n*Pi*x]*(-1)^(n+1))/n

Plot[sinx[x],{x,-6,6}]

halfsinx[x_]=(8/Pi^2)*(∑_(n=0)^∞)((-1)^n)*Sin[(2*n+1)*Pi*x/2]/(2*n+1)^2

Plot[halfsinx[x],{x,-6,6}]