We need to find the maximum value of the function

Since we have a sum of trigonometric functions and a constant, we know that the function is periodic and so don't have to consider endpoints: the stationary points of the function are all you need. Simply find them using the first derivative then substitute to find the maximum.