How to solve trigonometric equations without using unit circle