t=-10:0.1:10;
t=t*pi;
y=1/2+1/2*(-cos(t));
plot(t ,y)
hold on
t=-10:0.1:10;
t=t*pi;
f=0.5-(4/(pi)^2)*cos(t)-(4/9/(pi)^2)*cos(3*t)-((4/25)/(pi)^2)*cos(5*t);
plot(t , f)