On the convergence and approximation of cosine functions