Cosine function and equations