Maxima and Minima Using Trigonometric Functions