Cosine function and its application