A problem on range of a trigonometric function: what is the range of $\frac{\sqrt{3}\sin x}{2+\cos x}$?
What is the range of the function
$$\frac{\sqrt{3}\sin x}{2+\cos x}$$
$$\sqrt3\sin x-\cos x=2\sin\left(x-\frac\pi6\right)\le 2$$ $$\implies \sqrt3\sin x\le 2+\cos x$$
$$\implies \frac{\sqrt3\sin x}{2+\cos x}\le1\text{ as }2+\cos x>0$$
Again, $$\sqrt3\sin x+\cos x=2\sin\left(x+\frac\pi6\right)\ge -2$$
$$\implies \sqrt3\sin x\ge -(2+\cos x)$$
$$\implies \frac{\sqrt3\sin x}{2+\cos x}\ge-1 \text{ as }2+\cos x>0$$
Transform it into $\tan\theta/2$ using $$\cos2\theta=(1-\tan^2\theta)/(1+\tan^2\theta)$$ and $$\sin2\theta=(2\tan\theta)/(1+\tan^2\theta)$$
to get $$y=\dfrac{2\sqrt 3 \tan\theta/2}{3+\tan^2\theta/2}$$
Now $\tan\theta/2\in \Bbb R$ so, the quad. wq. in $\tan\theta/2$ must have discriminant positive. You get the result $$-1\le y\le1$$
Note that $y=f(x)=\dfrac{\sqrt 3 \sin x}{2+\cos x}$.
Note that $y^2=\dfrac{3 \sin ^2 x}{(2+\cos ^2 x)^2}=\dfrac{3 (1- \cos ^2 x)}{(2+\cos ^2 x)^2}$
Put $\cos x =u$, we have
\begin{align} y^2(2+u)^2 =3(1-u^2) \\ \implies (3+y^2)u^2+4y^2u+4y^2-3=0 \end{align} For this to have a solution, we need discriminant of the quadratic to be non-negative. Hence, we get $$(4y)^2-4(3+y^2)(4y^2-3) \ge 0 \\ \implies y^2 \le 1\\ \implies-1 \le y \le 1$$
Let $$y = \frac{\sqrt{3}\sin x}{2+\cos x}\Rightarrow 2y+y\cos x = \sqrt{3}\sin x$$
So $$\sqrt{3}\sin x-y\cos x = 2y$$
Now Using $\bf{Cauchy\; Schwarz \; Inequality}$
$$\left[(\sqrt{3})^2+(-1)^2\right]\cdot \left[\sin^2 x+\cos^2 x\right]\geq \left[\sqrt{3}\sin x-y\cos x\right]^2$$
So $$4\geq 4y^2\Rightarrow y^2\leq 1\Rightarrow y \in \left[-1,1\right]$$