General solution to $(\sqrt{3}-1)\cos x+(\sqrt{3}+1)\sin x=2$ $(\sqrt{3}-1)\cos x+(\sqrt{3}+1)\sin x=2$ is said to have a general solution of $x=2n\pi\pm\frac{\pi}{4}+\frac{\pi}{12}$.
My Approach:
Considering the equation as 
$$
a\cos x+b\sin x=\sqrt{a^2+b^2}\Big(\frac{a}{\sqrt{a^2+b^2}}\cos x+\frac{b}{\sqrt{a^2+b^2}}\sin x\Big)=\sqrt{a^2+b^2}\big(\sin y.\cos x+\cos y.\sin x\big)=\sqrt{a^2+b^2}.\sin(y+x)=2
$$
$\frac{a}{\sqrt{a^2+b^2}}=\sin y$ and $\frac{b}{\sqrt{a^2+b^2}}=\cos y$.
$$
{\sqrt{a^2+b^2}}=\sqrt{8}=2\sqrt{2}\\\tan y=a/b=\frac{\sqrt{3}-1}{\sqrt{3}+1}=\frac{\frac{\sqrt{3}}{2}.\frac{1}{\sqrt{2}}-\frac{1}{2}.\frac{1}{\sqrt{2}}}{\frac{\sqrt{3}}{2}.\frac{1}{\sqrt{2}}+\frac{1}{2}.\frac{1}{\sqrt{2}}}=\frac{\sin(\pi/3-\pi/4)}{\sin(\pi/3+\pi/4)}=\frac{\sin(\pi/3-\pi/4)}{\cos(\pi/3-\pi/4)}=\tan(\pi/3-\pi/4)\implies y=\pi/3-\pi/4=\pi/12
$$
Substituting for $y$,
$$
2\sqrt{2}.\sin(\frac{\pi}{12}+x)=2\implies \sin(\frac{\pi}{12}+x)=\frac{1}{\sqrt{2}}=\sin{\frac{\pi}{4}}\\\implies \frac{\pi}{12}+x=n\pi+(-1)^n\frac{\pi}{4}\implies x=n\pi+(-1)^n\frac{\pi}{4}-\frac{\pi}{12}
$$
What's going wrong with the approach ?
 A: Our hint is: $a\cos \theta +b\sin \theta =c$.  
Given: $(\sqrt{3}-1)\cos \theta +(\sqrt{3}+1)\sin \theta =2$.  
Let $(\sqrt{3}-1) = r\cos \alpha$ and $(\sqrt{3}+1) =r\sin \alpha$.  
Then $r\cos \alpha \cos \theta + r\sin \alpha \sin \theta =2 \Rightarrow r\cos(\theta-\alpha) =2 \Rightarrow \cos(\theta-\alpha) =\frac{2}{r}$.  
Now, $r =\sqrt{(\sqrt{3}-1)^2 +(\sqrt{3}+1)^2} = \sqrt{8} =2\sqrt{2}$.  
Thus, $\cos(\theta-\alpha) =\frac{1}{\sqrt{2}} = \cos \frac{\pi}{4}$.  
Also, $\tan \alpha =\frac{\sqrt{3}+1}{\sqrt{3}-1} = \tan(\frac{\pi}{2}-\frac{\pi}{3} +\frac{\pi}{4}) \Rightarrow \alpha =\frac{5\pi}{12}$.  

Thus:$(\theta-\alpha) =2n\pi \pm \frac{\pi}{4}$. Giving, $\theta = 2n\pi \pm \frac{\pi}{4} +\frac{5\pi}{12}.$
A: You can consider system \begin{align} (\sqrt 3 - 1)\cos x+(\sqrt 3+ 1)\sin x &= 2\\ \cos^2 x + \sin^2 x &= 1\end{align} Geometrically, you are looking for intersection of a line and unit circle, so we are expecting at most two solutions (see this plot). Thus, we can safely square the first equation and eliminate extra solutions later. Doing this we get: \begin{align}(4-2\sqrt 3)\cos^2x+4\cos x\sin x+(4+2\sqrt 3)\sin^2 x &= 4\\ 2\sin 2x -2\sqrt 3\cos 2x &= 0\\ \tan 2x &= \sqrt 3\\ 2x &= \pi/3+k\pi,\ k\in\Bbb Z\\ x &= \pi/6+k\pi/2,\ k\in\Bbb Z\end{align} Now, we eliminate solutions not in first or second quadrant to finally get $$x = \pi/6+2k\pi,\ x = 2\pi/3+2k\pi,\ k\in\Bbb Z$$
A: converting the given equation in $$\tan$$ we get
$${\frac { \left( 1+\sqrt {3} \right)  \left( 1- \left( \tan \left( x/2
 \right)  \right) ^{2} \right) }{1+ \left( \tan \left( x/2 \right) 
 \right) ^{2}}}+2\,{\frac { \left( \sqrt {3}-1 \right) \tan \left( x/2
 \right) }{1+ \left( \tan \left( x/2 \right)  \right) ^{2}}}-2=0
$$
simplifying and factorizing we obtain
$$-1/3\,{\frac { \left( \sqrt {3}+3 \right)  \left( \tan \left( x/2
 \right) +2-\sqrt {3} \right)  \left( 3\,\tan \left( x/2 \right) -
\sqrt {3} \right) }{1+ \left( \tan \left( x/2 \right)  \right) ^{2}}}
=0$$
thus you have to solve
$$- \left( \sqrt {3}+3 \right)  \left( -\tan \left( x/2 \right) -2+
\sqrt {3} \right)  \left( -3\,\tan \left( x/2 \right) +\sqrt {3}
 \right) 
=0$$
A: $$(\sqrt{3}-1)\cos x+(\sqrt{3}+1)\sin x=2$$
divide by $2\sqrt{2}$:
$$\frac{\sqrt{3}-1}{2\sqrt{2}}\cos x+\frac{\sqrt{3}+1}{2\sqrt{2}}\sin x=\frac{1}{\sqrt{2}}$$
now use

$$\cos a \cos b+\sin a \sin b=\cos (a-b)$$

$$
\cos^2 a+\sin^2 a=\bigg(\frac{\sqrt{3}-1}{2\sqrt{2}}\bigg)^2+\bigg(\frac{\sqrt{3}+1}{2\sqrt{2}}\bigg)^2=1
$$
and the fact that $$a=\arctan(\frac{\sqrt{3}+1}{\sqrt{3}-1})=\frac{5\pi}{12}$$
we have $$\cos(\frac{5\pi}{12}-x)=\frac{1}{\sqrt{2}}=\cos\frac{\pi}{4}$$
which gives
$$\frac{5\pi}{12}-x=\pm\frac{\pi}{4}+2k \pi$$
$$\boxed{x=2k\pi+\frac{2\pi}{3},\quad x=2k\pi+\frac{\pi}{6}}$$
A: Hint:
For $(\tan A-\tan45^\circ)\cos x+(\tan A+\tan45^\circ)\sin x=\sec A$
$\cos(x+A+45^\circ)=\cos45^\circ$
