plot cos^2(x) on [-pi/2, pi/2]