Finding the Range of a Trigonometric function The range of $$f(x)=3\cos^2x-8\sqrt3 \cos x\cdot\sin x+5\sin^2x-7$$is given by:(1)$[-7,7]$(2)$[-10,4]$(3)$[-4,4]$(4)$[-10,7]$
ANS: (2)
My Solution
The equation can be written as: $$3\cos^2x-8\sqrt3 \cos x\cdot \sin x+16\sin^2x-11\sin^2x-7 \\\implies (\sqrt3\cos x-4\sin x)^2-11\sin^2x-7$$
So let $y=\sqrt3\cos x+4\sin x$
$$-\sqrt{(\sqrt3)^2+4^2} \le y\le \sqrt{(\sqrt3)^2+4^2} \implies 19 \le y^2 \le 19 \implies y^2\in[0,19]$$
CASE 1: When $y^2=0$
$$f(x)=0-11\sin^2x-7 \text{ ,taking } \sin^2 x=0\text{,  minimum value of }f(x)= -7$$
CASE 2: When $y^2=19$
$$f(x)=19-11\sin^2x-7 \text{ ,taking } \sin^2 x=1\text{,  minimum value of }f(x)= 1$$
So my range is $y\in[-7, 1]$
where is the problem?

The problem is when you say $y=0$ you fix the value of $sinx$ as $\sqrt3cosx-4sinx=0$ so $tanx=\frac{\sqrt3}{4}$ and $sin^2x= \frac{3}{19}$ not 0 or 1 . You should write it as the form of $asin2x+bcos2x+c$ as stated in the comment.
