Here's a completely different way to do that problem. A standard trig identity is cos(a+b)= cos(a)cos(b)- sin(a)sin(b). If we take b= x (I am assuming that is "sqrt 3 sin x", not "sqrt 3 sin t".) we have f(x)= (-1)cos x+ sqt(3) sin(x)= cos(a)cos(x)- sin(a)sin(x) so we would have to have cos(a)= -1 and sin(a)= -sqrt(3).
Well that's impossible because sqrt(3)> 1 and we would have to have which is not true: , not 1. So multiply and divide by the square root of that, 2:
and now we must have cos(a)= -1/2 and sin(a)= -sqrt(3)/2 which says that .
That is, . And it is easy to find maximum and minimum values for that.