First, graph the function on your calculator, online, or manually. You will see that it is a decreasing function over -∞ < x < ∞
Therefore, on the interval 0 < x < 2π, the maximum will be at x = 0 and the minimum will be at x = 2π.
Plug these x-values into the function to get the corresponding y-values:
f(0) = sin2(0) - cos(0) - 4(0) = -1
f(2π) = sin4π - cos2π - 8π = -26.1