Is this what you expected?
Undefined function or variable 'delta_w'.
If not, then you need to define delta_w.
Ok, maybe you meant delta_w is 0.01. But then you should recognize that 2*pi does not divide evenly into increments of 0.01. So the last point will not be 2*pi, but some small amount off.
And, oh, what is the difference between -0 and 0? That new math stuff. I'll never understand it.
Hmm. What else. Do you think that cos(4*pi*T) covers 4 cycles? Since T=2*pi, then 4*pi*T=8*pi^2.
Since the cos function is periodic on the interval 2*pi, then 4 cycles would be 8*pi.