Maximum value of a trigonometric function