<s>[INST] Express $\sqrt{3}\sin\theta - \cos\theta$ as: $a\cos (\theta + \alpha) $ Express $\sqrt{3}\sin\theta - \cos\theta$ as: $a\cos (\theta + \alpha) $
Can someone please explain to me how to go about doing this? 
 [/INST] If 
\begin{align*}
\cos\varphi & = \frac{b}{\sqrt{a^2 + b^2}}\\
\sin\varphi & = \frac{a}{\sqrt{a^2 + b^2}}
\end{align*}
then 
$$a\sin\theta - b\cos\theta = -\sqrt{a^2 + b^2}\cos(\theta + \varphi)$$
since 
\begin{align*}
-\sqrt{a^2 + b^2}\cos(\theta + \varphi) & = -\sqrt{a^2 + b^2}(\cos\theta\cos\varphi - \sin\theta\sin\varphi)\\
& = -\sqrt{a^2 + b^2}\left(\cos\theta \cdot \frac{b}{\sqrt{a^2 + b^2}} - \sin\theta \cdot \frac{a}{\sqrt{a^2 + b^2}}\right)\\
& = -b\cos\theta + a\sin\theta\\
& = a\sin\theta - b\cos\theta
\end{align*}
In the expression, $\sqrt{3}\sin\theta - \cos\theta$, $a = \sqrt{3}$ and $b = 1$, so $$a^2 + b^2 = \sqrt{3}^2 + 1^2 = 3 + 1 = 4$$  Thus, $\sqrt{a^2 + b^2} = \sqrt{4} = 2$.  Hence, 
\begin{align*}
\cos\varphi & = \frac{b}{\sqrt{a^2 + b^2}} = \frac{1}{2}\\
\sin\varphi & = \frac{a}{\sqrt{a^2 + b^2}} = \frac{\sqrt{3}}{2}
\end{align*}
Therefore, 
$$\varphi = \arccos\left(\frac{1}{2}\right) = \arcsin\left(\frac{\sqrt{3}}{2}\right) = \frac{\pi}{3}$$
so we obtain 
$$\sqrt{3}\sin\theta - \cos\theta = -2\cos\left(\theta + \frac{\pi}{3}\right)$$
Note:  We could also express the answer in the form 
$$\sqrt{3}\sin\theta - \cos\theta = \sin\left(\theta - \frac{\pi}{6}\right)$$
if we use the formula
$$a\sin\theta - b\cos\theta = \sqrt{a^2 + b^2}\sin(\theta - \varphi)$$
where 
\begin{align*}
\cos\varphi & = \frac{a}{\sqrt{a^2 + b^2}}\\
\sin\varphi & = \frac{b}{\sqrt{a^2 + b^2}}
\end{align*}
with $a = \sqrt{3}$, $b = 1$, and 
$$\varphi = \arcsin\left(\frac{1}{2}\right) = \arccos\left(\frac{\sqrt{3}}{2}\right) = \frac{\pi}{6}$$
</s>