Frustrated because used standard R addition formula for mechanics problem, but the answer came out wrong. How to resolve this so doesn't happen again? In the middle of quite a lengthy mechanics problem, I got to:
$$\cos\alpha-\sin\alpha = 0.05\ $$
and I wanted to find the value of $\ \alpha,\ 0<\alpha<90^{\circ}\ $ that satisfies this equation using an R addition formulae, as that is the usual way to go here.
So I tried:
$$\cos\alpha-\sin\alpha = R\sin\left(\alpha+\gamma\right) = R\sin\alpha\cos\gamma\  + R\cos\alpha\sin\gamma $$
$$\implies R\cos\gamma = -1\quad \text{and}\quad R\sin\gamma = 1$$
$$\implies R^2 = 2\quad \text{and}\quad \tan\gamma = -1$$
At this point, I usually assume $R>0$ and $0<\gamma<90^{\circ}\ $ will give the correct evaluation of $\cos\alpha-\sin\alpha\ $, but that is not the case here.
In fact the correct evaluation of $\cos\alpha-\sin\alpha\ $ is:
$\cos\alpha-\sin\alpha\ = -\sqrt{2}\sin(\alpha-45^{\circ}).\ $
So I got the answer wrong because I didn't even think to check if $R$ and $\gamma$ were correct because like I said, I just assumed  $R>0$ and $0<\gamma<90^{\circ}\ $ should always work.
But when I get to
$$\implies R^2 = 2\quad \text{and}\quad \tan\gamma = -1$$
in my working, I don't want to check the four combinations: $\ R = \pm \sqrt{2}\ $ and
$\ \left( \gamma = -45^{\circ}\ \text{or}\ \gamma = 135^{\circ}\ \right).$
So instead of having to check these four options every time, what is a quicker way of ensuring I get to the right answer every time? Probably I should use a different R addition formula for this circumstance, but I don't know a good summary of which R addition formula I should use for each of the different circumstances...
 A: To ensure that $\gamma$ is acute and $R>0$ you just have to choose the correct one of four compound angle identities.
Choose whichever one starts with the first function and has the correct $+$ or $-$ sign.
In your example you have $\color{red}{\cos}\alpha\color{red}{-}\sin\alpha$ therefore choose
$$\cos(\alpha+\gamma)=\color{red}{\cos}\alpha\cos\gamma\color{red}{-}\sin\alpha\sin\gamma$$
A: \begin{align}
   \cos\alpha - \sin\alpha &= \frac{1}{20}\\
   \cos\alpha \cdot \frac{\sqrt 2}{2} -\sin\alpha\cdot \frac{\sqrt 2}{2} 
   &= \frac{\sqrt 2}{40}\\
   \cos\alpha \cdot \cos\left(\frac{\pi}{4}\right) 
  -\sin\alpha \cdot \sin\left(\frac{\pi}{4}\right) 
   &= \frac{\sqrt 2}{40}\\
   \cos\left(\alpha + \frac{\pi}{4}\right) &= \frac{\sqrt 2}{40}\\
   \alpha + \frac{\pi}{4} &=\arccos \frac{\sqrt 2}{40} \\
   \text{and so on}
\end{align}
Another example
\begin{align}
   5\cos\alpha - 7\sin\alpha &=  z\\
   \frac{5}{\sqrt{74}}\cos\alpha - \frac{7}{\sqrt{74}}\sin\alpha 
      &= \frac{z}{\sqrt{74}}\\
\end{align}
$$\left\{\text{Let $\cos \beta = \frac{5}{\sqrt{74}}$ and 
$\sin \beta = \frac{7}{\sqrt{74}}$}\right\}$$
\begin{align}
   \cos\alpha \cos \beta - \sin\alpha \sin \beta
      &= \frac{z}{\sqrt{74}}\\
\cos(\alpha + \beta) &= \frac{z}{\sqrt{74}}\\
&\cdots
\end{align}
