When we express $\sin x - \cos x$ as $A \sin (x+c)$, how many solutions are there for $c \in [0, 2\pi)$? This is a problem from problem set 1 of MIT OCW 18.01SC:

express $\sin x - \cos x$ in the form $A \sin (x+c)$.

Their solution is $\sqrt{2} \sin (x - \frac{\pi}{4})$
I found two solutions (for $c \in [0, 2\pi]$):
Solution 1: $A = \sqrt{2}$, $c = -\frac{\pi}{4}$
Solution 2: $A = -\sqrt{2}$, $c = \frac{3\pi}{4}$
Are there two solutions or is there something amiss with the second solution above?
Here is how I got the solutions:
$$A\sin(x+c) = A\sin x \cos c + A \sin c \cos x$$
We can see that if $A \cos c = 1$ in the first term and $A \sin c = -1$ in the second term then we will end up with $\sin x - \cos x$, so we will have shown that $f(x)$ can be written in the form $A \sin(x+c)$.
We have two equations in two unknowns (A and c) and so we can solve for these variables. Square both sides of each equation:
$$A^2 \cos^2 c = 1$$
$$A^2 \sin^2 c = 1$$
Sum the two equations
$$A^2(\cos^2 x + \sin^2 x) =  2$$
$$A^2 = 2 \Rightarrow A = \pm \sqrt{2}$$
Solution 1: $A = \sqrt{2}$, $c = -\frac{\pi}{4}$
$$\cos c = \frac{1}{\sqrt{2}}= \frac{\sqrt{2}}{2} \Rightarrow c = \frac{\pi}{4} \text{ or } c = \frac{7 \pi}{4}$$
$$\sin c = -\frac{1}{\sqrt{2}}= -\frac{\sqrt{2}}{2} \Rightarrow c = \frac{5\pi}{4} \text{ or } c = \frac{7 \pi}{4}$$
Therefore the value of $c$ that satisfies both equations is $\frac{7\pi}{4}$, which is the same as $-\frac{\pi}{4}$
Solution 2: $A = -\sqrt{2}$, $c = \frac{3\pi}{4}$
$$\cos c = -\frac{1}{\sqrt{2}}= -\frac{\sqrt{2}}{2} \Rightarrow c = \frac{3\pi}{4} \text{ or } c = \frac{5 \pi}{4}$$
$$\sin c = \frac{1}{\sqrt{2}}= \frac{\sqrt{2}}{2} \Rightarrow c = \frac{\pi}{4} \text{ or } c = \frac{3 \pi}{4}$$
Therefore the value of $c$ that satisfies both equations is $\frac{3\pi}{4}$.
 A: Both of your answers are correct. Both are valid solutions. Remember this: for any trig-problem, there exists exactly one solution in a interval of length $\pi$. So, for an interval of length $2\pi$, there will be two solutions.
Usually, such problems arise in physics while studying waves and oscillations. There, $A$ must be positive. That's why the first solution is preferred.
Hope this helps. Ask anything if not clear :)
A: We can use sum to product formula to confirm your solution:
\begin{align}\sin x - \cos x = \sin x - \sin (\frac{\pi}{2}- x)=2\cos \frac{\pi}{4}\sin(x-\frac{\pi}{4})\end{align}\begin{align}=\sqrt 2\sin(x-\frac{\pi}{4})=-\sqrt 2\sin(\frac{\pi}{4}-x)\\=-\sqrt 2\sin(\pi-(\frac{\pi}{4}-x))=-\sqrt 2\sin(x+\frac{3\pi}{4})\end{align}
So, you are correct if $c \in[0,2\pi]$, the textbook is correct if $A>0$.
A: As you wrote, $$A\sin(x+c)=A\sin x\cos c+A\cos x\sin c=\sin x-\cos x$$ leads, by identification, to the system
$$\begin{cases}A\cos c=1,\\A\sin c=-1.\end{cases}$$
This is a Cartesian-to-polar transformation, which can be represented graphically. The point is uniquely determined, and if you assume a positive modulus, the azimuth is also uniquely determined in $[0,2\pi)$ or $(0,2\pi]$.
If you admit a negative modulus (which is unusual), you compensate by a phase shift of $\pi$.

