Solve quadratic equations where the function is a trigonometric ratio