<s>[INST] Solving $ \sin x + \sqrt 3 \cos x = 1 $ - is my solution correct? I have an equation that I'm trying to solve:
$$ \sin x + \sqrt 3 \cos x = 1 $$
After pondering for a while and trying different things out, this chain of steps is what I ended up with:
$$ \sin x + \sqrt 3 \cos x = 1 $$
$$ \sin x = 1 - \sqrt 3 \cos x $$
$$ \left(\sin x \right)^2 = \left(1- \sqrt 3 \cos x\right)^2 $$
$$ \sin^2 x = 1 - 2 \sqrt 3 \cos x + 3 \cos^2 x $$
$$ 2 \sqrt 3 \cos x - 3 \cos^2 x = 1 - \sin^2 x $$
$$ 2 \sqrt 3 \cos x - 3 \cos^2 x = \cos^2 x $$
$$ 2 \sqrt 3 \cos x = \cos^2 x + 3 \cos^2 x $$
$$ 4 \cos^2 x = 2 \sqrt 3 \cos x $$
$$ \frac{4 \cos^2 x}{\cos x} = 2 \sqrt 3 $$
$$ 4 \cos x = 2 \sqrt 3 $$
$$ \cos x = \frac{2 \sqrt 3}{4} $$
$$ \cos x = \frac{\sqrt 3}{2} $$
The fraction $ \frac{\sqrt 3}{2} $ can be rewritten as $ \cos \left(\pm \frac{\pi}{6}\right) $, so my solutions are:
$$ \cos x = \cos \left(\frac{\pi}{6}\right) \quad \text{or} \quad \cos x = \cos \left(-\frac{\pi}{6}\right) $$
$$ x = \frac{\pi}{6} + 2\pi n \quad \text{or} \quad x = -\frac{\pi}{6} + 2\pi n $$
Since I earlier on exponentiated both sides I have to check my solutions:
$$ x = \frac{\pi}{6} + 2\pi \Rightarrow \text{LHS} = \sin \left(\frac{\pi}{6} + 2\pi\right) + \sqrt 3 \cos \left(\frac{\pi}{6} + 2\pi\right) = 2 \not = \text{RHS} $$
$$ x = -\frac{\pi}{6} + 2\pi \Rightarrow \text{LHS} = \sin \left(-\frac{\pi}{6} + 2\pi\right) + \sqrt 3 \cos \left(-\frac{\pi}{6} + 2\pi\right) = 1 = \text{RHS} $$
Leaving $ x = -\frac{\pi}{6} + 2\pi n $ as the answer since its positive counterpart was not equal to $ 1 $.
$$ \text{Answer:} \: x = -\frac{\pi}{6} + 2\pi n $$
Have I done anything wrong or does this look good? I haven't really done this before so I feel uncertain not just about the solution, but also my steps and notation...
 [/INST] You went a little bit astray after $4 \cos^2 x = 2 \sqrt 3 \cos x$, when you divided by $\cos x$: what if $\cos x=0$?
It’s better at that point to bring everything to one side and factor: $4\cos^2x-2\sqrt3\cos x=0$, so $2\cos x(2\cos x-\sqrt3)=0$. Now appeal to the fact that if a product is $0$, at least one of the factors must be $0$. Obviously $2\ne 0$, so either $\cos x=0$, or $2\cos x-\sqrt3=0$. As it happens, both of these possibilities give you solutions. You found the second set, but not the first set.
If $\cos x=0$, we need $\sin x=1$ to have a solution. If $\sin x=1$, $\cos x$ is automatically $0$, so you just need to find the solutions to $\sin x=1$ to complete your solution.
</s>