Solving $\sin(x)-\cos(x)=1$ Solving 
$$\sin(x)-\cos(x)=1$$
for $x$. I used Pythagoras' Theoream and 
$$C\sin(x+\alpha)=A\sin(x)+B\cos(x)$$
where $A=1$ and $B=-1$, and I obtained 
$$C=\sqrt{2}$$
$$\alpha = \dfrac{\pi}{4}$$
and substituted where,
$$\sqrt{2}\sin(x+\dfrac{\pi}{4})=1$$
but somehow I think there is something wrong with my calculation, because in Wolfram it is
$$-\sqrt{2} \sin(\dfrac{\pi}{4}-x)=1$$
and I don't understand why do I get a different solution, I did everything correct algebraically. 
 A: You made a mistake:
$$
\sin x - \cos x=\sqrt2\sin\left(x\color{red}-\frac\pi4\right).
$$
The correctness of the last expression can be easily verified by trigonometric summation formula:
$$
\sin(x+y)=\sin x \cos y+\cos x \sin y.
$$
A: I would rather use the substitution $$\cos(x)=(\pm)\sqrt{1-\sin^2(x)}$$ to obtain $$\sin(x)-\cos(x)=1\iff\ldots\iff \sin(x)-1=(\pm)\sqrt{1-\sin^2(x)}$$
Squaring $$\sin^2(x)-2\sin(x)+1=1-\sin^2(x)\iff 2\sin^2(x)-2\sin(x)=0\iff \color{blue}{\sin^2(x)-\sin(x)=0}$$
Can you end it now?
A: No, you're good.
Remember that $\sin(-x)=-\sin(x)$.
That means that $-\sqrt{2} \sin(\dfrac{\pi}{4}-x)$ is equivalent to $\sqrt{2} \sin(x-\dfrac{\pi}{4})$
A: Hint: Use the so-called Weierstrass substitution:
$$\sin(x)=\frac{2t}{1+t^2}$$
$$\cos(x)=\frac{1-t^2}{1+t^2}$$
A: One thing you could do is square both sides. This yields $$\sin^2x-2\sin x\cos x+\cos^2x=1\\1-2\sin x\cos x=1\\\sin x\cos x=0\\\sin x=0\text{ or }\cos x=0.$$ This provides us with all integer multiples of $\frac\pi2$ as possible solutions. However, we must be a bit wary, since some of these may actually be solutions to $$\sin x-\cos x=-1.$$ Fortunately, periodicity means that we only have to check $0,\frac\pi2,\pi,\frac{3\pi}2$ to see which of those works, then conclude the rest accordingly.
