plot 3cos^2(x-pi/4) +1 for x = 0 to 4pi