I'm missing the right substitute $\sqrt3\cos x=1-\sin x$ Please show me how to solve the following equation for $x$.
I've tried multiple substitutes but can't seem to find the right one.
$$\sqrt3\cos x=1-\sin x$$
 A: Solve for $x$
$$\sqrt3\cos x = 1-\sin x$$
Subtract $1-\sin x$ from both sides
$$-1+\sqrt3\cos x+\sin x = 0$$
Factor out a $2$ from $\sqrt3\cos x+\sin x$
$$2\left(\frac12\sqrt3\cos x+\frac{\sin x}{2}\right)-1=0$$
Since $\sin\frac\pi3=\frac{\sqrt3}2$ and that $\cos\frac\pi3=\frac12$
$$2\left(\sin\frac\pi3\cos x+\cos\frac\pi3\sin x\right)-1=0$$
$\sin\frac\pi3\cos x+\cos\frac\pi3\sin x$ is an alternate form of $\cos\left(\frac\pi6-x\right)$
$$2\cos\left(\frac\pi6-x\right)-1=0$$
$$2\cos\left(\frac\pi6-x\right)=1$$
$$\cos\left(\frac\pi6-x\right)=\frac12$$
Cosine is not an injective function, we can write formulas that match any value input instead of just using the normal cosine.
$$x=-\frac\pi6+2\pi n$$
$$x=-\frac{3\pi}2+2\pi n$$
$$n\in\mathbb{Z}$$
A: You don't have to guess the right substitution. Every equation of the form
$$
a\cos x+b\sin x = c
$$
can be managed with the following procedure.
Divide both sides by $\sqrt{a^2+b^2}$, which is different from $0$ unless $a=b=0$, which would make it trivial.
Now we can observe that there is a unique $\varphi$ such that
$$
\frac{a}{\sqrt{a^2+b^2}}=\sin\varphi,\quad \frac{b}{\sqrt{a^2+b^2}}=\cos\varphi,
$$
for
$$
\biggl(\frac{a}{\sqrt{a^2+b^2}}\biggr)^2+
\biggl(\frac{b}{\sqrt{a^2+b^2}}\biggr)^2=1.
$$
Thus the equation becomes
$$
\sin\varphi\cos x+\cos\varphi\sin x=\frac{c}{\sqrt{a^2+b^2}}
$$
or
$$
\sin(x+\varphi)=\frac{c}{\sqrt{a^2+b^2}}
$$
which is an elementary equation for the sine.
In your case $a=\sqrt{3}$, $b=1$, so $a^2+b^2=4$ and
$$
\sin\varphi=\frac{a}{\sqrt{a^2+b^2}}=\frac{\sqrt{3}}{2},\quad
\cos\varphi=\frac{b}{\sqrt{a^2+b^2}}=\frac{1}{2}
$$
so $\varphi=\pi/3$. Since $c=1$, the equation becomes
$$
\sin\biggl(x+\frac{\pi}{3}\biggr)=\frac{1}{2}=\sin\frac{\pi}{6}
$$
that has the solutions
$$
x+\frac{\pi}{3}=\frac{\pi}{6}+2k\pi,\qquad
x+\frac{\pi}{3}=\pi-\frac{\pi}{6}+2k\pi
$$
or, in another form
$$
x=-\frac{\pi}{6}+2k\pi,\qquad x=\frac{\pi}{2}+2k\pi.
$$

An alternative method is to set $X=\cos x$, $Y=\sin x$ and to solve the system
\begin{cases}
aX+bY=c\\[1ex]
X^2+Y^2=1
\end{cases}
which in this case is
\begin{cases}
\sqrt{3}\,X+Y=1\\[1ex]
X^2+Y^2=1
\end{cases}
Solve with respect to $Y$ the linear equation: $Y=1-\sqrt{3}\,X$ and substitute:
$$
X^2+(1-\sqrt{3}\,X)^2=1
$$
that becomes
$$
4X^2-2\sqrt{3}\,X=0
$$
that factors as
$$
X=0\qquad\text{or}\qquad 2X-\sqrt{3}=0
$$
that become
$$
\begin{cases}
\cos x=0\\[2ex]
\sin x=1
\end{cases}
\qquad\text{or}\qquad
\begin{cases}
\cos x=\frac{\sqrt{3}}{2}\\[2ex]
\sin x=-\frac{1}{2}
\end{cases}
$$
that give the same solutions as before.
A: Let $f(x) = \sqrt{3}\cos x + \sin x$.
Then $f(x) = 2 ({\sqrt{3} \over 2}\cos x + {1 \over 2} \sin x) = 2 (\sin { \pi \over 3} \cos x + \cos { \pi \over 3} \sin x) = 2 \sin (x+{ \pi \over 3})$, so to solve $f(x) = 1$, we need to find $x$ such that $\sin (x+{ \pi \over 3}) = {1 \over 2}$.
Since $\sin^{-1} (\{ {1 \over 2}\} ) = \{ { \pi \over 6}+2n\pi, { 5\pi \over 6}+2n\pi\}_n $, we see that the solutions are $\{ -{ \pi \over 6}+2n\pi, { \pi \over 2}+2n\pi\}_n $.
A: As our friends, has already showed everything,
$\sqrt3\cos x=1-\sin x$, now dividing by 2. We get,
$\frac{\sqrt3}{2}\cos x=\frac{1}{2}-\frac{1}{2}\sin x$
$\frac{\sqrt3}{2}\cos x+\frac{1}{2}\sin x=\frac{1}{2}$, or
$\cos(\pi/6)\cos x+\sin(\pi/6)\sin x=\frac{1}{2}$. So
$\cos(\pi/6-x) = \frac{1}{2}$. Or,
As $\cos(x)$ is an even function.
$(i)\pi/6-x = \pi/3+2\pi n$
$(ii)x-\pi/6 = \pi/3+2\pi n$
So,
$(i)x = \pi/6 -\pi/3 = -\pi/6+2\pi n$
$(ii)x = \pi/6 +\pi/3 = \pi/2+2\pi n$
A: Another approach :
\begin{align}
\sqrt3\cos x&=1-\sin x\\
\sqrt3\cos x+\sin x&=1\\
\frac{\sqrt3}{2}\cos x+\frac12\sin x&\stackrel{\color{red}{[1]}}=\frac12\\
\cos30^\circ\cos x+\sin30^\circ\sin x&\stackrel{\color{red}{[2]}}=\cos(60^\circ+360^\circ n)\\
\cos(x-30^\circ)&\stackrel{\color{red}{[3]}}=\cos(60^\circ+360^\circ n)\\
x-30^\circ&=60^\circ+360^\circ n\\
x&=90^\circ+360^\circ n\\
\end{align}

Notes :
$\color{red}{[1]}\;\;\;$Dividing both sides by $2$
$\color{red}{[2]}\;\;\;$Another solution is $\cos(360^\circ n-60^\circ)$
$\color{red}{[3]}\;\;\;\cos(x\pm y)=\cos x\cos y\mp\sin x\sin y$
A: We can raise both sides of the equation to the power 2, to get:
$$3 \cos^2 x = (1-\sin x)^2.$$
With the aid of the identity 
$$\cos^2 x = 1-\sin^2 x = (1-\sin x)(1+\sin x)$$ 
we get
$$ 3(1+\sin x) = 0, $$
dividing both sides by $1-\sin x$, provided that $\sin x \neq 1$ (i.e. $x \neq \pi/2 + 2k\pi$). Then we have
$$ 1+\sin x = 0, $$
$$ \sin x = -1,$$
$$ x= 3\pi/2 + 2k\pi. $$
Now we just have to check for the consistency of the solutions in order to remove any extraneous values. Since the set of solutions does not include the forbidden values of $x$, we don't have to remove anything. 
A: For variety,
$$ \sin x = \frac{z - z^{-1}}{2 \mathbf{i}} \qquad  \cos x = \frac{z + z^{-1}}{2 } $$
where
$$ z = e^{\mathbf{i} x} = \cos x + \mathbf{i} \sin x$$
