This is a standard trigonometric identity that can be easily verified:
$a\cos (x) + b\sin (x) = \sqrt{a^2+b^2}\cos (x - p),\text{ where }\tan(p)=\frac ba.$
So for example,
$\sqrt2\cos(1)-\sqrt2\sin(1)=-0.43=2\cos(1-p_1),\text{ where }\tan(p_1)=-1,$
and
$-\sqrt2\cos(1)+\sqrt2\sin(1)=0.43=2\cos(1-p_2),\text{ where }\tan(p_2)=-1.$
My question is, why is is that $p_1$ is the principal value of $\arctan (-1) = -0.79$ radians, whereas for $p_2$, I have to add $\pi$ to the principal value so as to get the positive angle $2.36$ radians?
I.e. How could I have deduced that $p_1$ lies in the $4^\text{th}$ quadrant and that $p_2$ lies in the $2^\text{nd}$ quadrant??