Solving equations involving sine, cosine, and tangent