int 2 cos((n-1/2) pi x) from 1/2 to 1