Trigonometry – How to Solve $\\sin(x)-\\cos(x)=1$

trigonometry

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.

Best Answer

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. $$