<s>[INST] Trying to solve the trig equation $\sqrt{3+4\cos^2(x)}=\frac{\sin(x)}{\sqrt 3}+3\cos(x)$ The equation is
$$\sqrt{3+4\cos^2(x)}=\frac{\sin(x)}{\sqrt 3}+3\cos(x)$$
My solution goes like this
$$
\begin{cases}
3+4\cos^2(x)=\frac{\sin^2(x)}{3}+\frac{6}{\sqrt 3}\sin(x)\cos(x)+9\cos^2(x) \\
\frac{\sin(x)}{\sqrt 3}+3\cos(x) \ge 0
\end{cases}
$$
$$3(\sin^2(x)+\cos^2(x))+4\cos^2(x)=\frac{\sin^2(x)}{3}+\frac{6}{\sqrt 3}\sin(x)\cos(x)+9\cos^2(x)$$
$$2\cos^2(x)+\frac{\sin^2(x)}{3}-3\sin^2(x)+\frac{6}{\sqrt 3}\sin(x)\cos(x)=0$$
I multiply by 3 and divide by $\cos^2(x)$:
$$8\tan^2(x)-6\sqrt{3}\tan(x)-6=0$$
Let $t=\tan(x)$, then
$$4t^2-3\sqrt{3}t-3=0$$
$$t_1=\frac{7\sqrt 3}{2}$$
$$t_2=\frac{11\sqrt 3}{4}$$
The solutions for $x$ would be arc-tangents of these values. 
But the textbook's answer is
$$\color{green}{x_1=\frac{\pi}{3}+2\pi n; x_2=-\arctan\left(\frac{\sqrt 3}{4}\right)+2\pi n}$$
Where did I make a mistake? 

P.S. From the textbook

 [/INST] The roots of $4 t^2-3 \sqrt{3} t-3$ are $-\frac{\sqrt{3}}{4}$ and $\sqrt{3}$.
A slightly different approach to this problem could be the following:
\begin{align}
3+4\cos^2(x)-\frac{\sin^2(x)}{3}-\frac{6}{\sqrt 3}\sin(x)\cos(x)-9\cos^2(x)=\frac{1}{3} \left(-3 \sqrt{3} \sin (2 x)-7 \cos (2 x)+1\right)
\end{align}
With this we have $$3 \sqrt{3} \sin (2 x)+7 \cos (2 x)=2\sqrt{19}\sin(2x+y)$$ where $y=\arcsin\frac{7}{2\sqrt{19}}$. Hence the roots can be found as \begin{align}
x&=\frac12\Big(\arcsin\frac{1}{2\sqrt{19}}-\arcsin\frac{7}{2\sqrt{19}}\Big)+2\pi n\\
x&=\arcsin\frac{1}{2\sqrt{19}}+\arcsin\frac{7}{2\sqrt{19}}+2\pi n\\
\end{align}
now note that \begin{align}
\arcsin\frac{1}{2\sqrt{19}}+\arcsin\frac{7}{2\sqrt{19}}&=\arcsin( \frac{1}{2\sqrt{19}}\sqrt{1-\frac{7}{2\sqrt{19}}^2} + \frac{7}{2\sqrt{19}}\sqrt{1-\frac{1}{2\sqrt{19}}^2})\\
&=\arcsin\frac{\sqrt3}{2}\\
&=\frac{\pi}{3}
\end{align}
Further using $\tan(\alpha+\beta)$ and $\tan(\arcsin x)=\frac{x}{\sqrt{1-x^2}}$ we obtain $$\arcsin\frac{1}{2\sqrt{19}}-\arcsin\frac{7}{2\sqrt{19}}=-2\arctan \frac{\sqrt3}{4}.$$
</s>