Equations involving sine and cosine functions