product cos(k) form k=1 to n