Solving Quadratic Trigonometric Equations