4

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.

Friedrich
  • 487
  • There are multiple solutions. $x=\pi/2+2k\pi, \pi+2k \pi$ – Mark Viola Mar 24 '19 at 19:30
  • I don't think you did everything correct algebraically, because it should have been $-\frac\pi4$ instead of $\frac\pi4$. –  Mar 24 '19 at 19:30
  • @SaucyO'Path Is it wrong to use Pythagoras' Theoream, because I get $\sin(\alpha)=\dfrac{A}{\sqrt{2}}=\dfrac{1}{\sqrt{2}}$ and $\cos(\alpha)=\dfrac{B}{\sqrt{2}}= \dfrac{-1}{\sqrt{2}}$ and now doing it again in my calculator I get that $\alpha= \dfrac{3\pi}{4}$ – Friedrich Mar 24 '19 at 19:34
  • I can't really follow your logic, in the sense that you are referencing your own notation in your own sheet of paper some hundreds miles away from where I am, but the formula you should keep in mind appears to be $\sin(x+\alpha)=\cos\alpha\sin x+\sin\alpha\cos x$. –  Mar 24 '19 at 19:58
  • See https://math.stackexchange.com/questions/618192/how-to-solve-sin-x-cos-x-1 – lab bhattacharjee Mar 25 '19 at 03:36

5 Answers5

3

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

user
  • 26,272
  • I am now confused, because when using Pythagoras' Theoream, you get $\sin(\alpha)=\dfrac{1}{\sqrt{2}}$ and $\cos(\alpha)=-\dfrac{1}{\sqrt{2}}$, and so $\alpha=-\dfrac{\pi}{4}$ would be correct for sine but not for cosine because the value in cosine is negative, since $B=-1$ – Friedrich Mar 24 '19 at 19:39
  • Well, checking again, $\cos(-\dfrac{\pi}{4}) \neq \dfrac{-1}{\sqrt{2}}$ and $\sin(-\dfrac{\pi}{4}) \neq \dfrac{1}{\sqrt{2}}$ – Friedrich Mar 24 '19 at 19:40
  • 1
    @D.Qa I have added the formula for the sine of a sum. Just substitute $y=\pm\frac\pi4$ and compare the results. – user Mar 24 '19 at 19:42
  • 2
    @D.Qa $$\begin{align} \sin(x\color{red}+\frac\pi4)&=\sin x \cos\left(+\frac\pi4\right)+\cos x \sin \left(+\frac\pi4\right)=\frac{\sin x\color{red}+\cos x}{\sqrt2}\ \sin(x\color{red}-\frac\pi4)&=\sin x \cos\left(-\frac\pi4\right)+\cos x \sin \left(-\frac\pi4\right)=\frac{\sin x\color{red}-\cos x}{\sqrt2}\end{align} $$ Hopefully this helps. – user Mar 24 '19 at 20:08
  • Yes, I was trying it on my own, and it did actually, thank you, I think now I understood what is going on. :) – Friedrich Mar 24 '19 at 20:11
2

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?

Dr. Mathva
  • 8,621
  • 1
    Well, I set $v=\sin(x)$ and then wrote $2v^{2}-2v=0$ and solved for $v$ where I would get $v=0,1$ and so, $\sin(x)=1$ and $\sin(x)=0$, I will get $x=\dfrac{\pi}{2}+2\pi n$ and $x=\pi + 2\pi n$ – Friedrich Mar 24 '19 at 20:10
  • 1
    Exactly @D. Qa ;) – Dr. Mathva Mar 24 '19 at 20:14
1

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})$

1

Hint: Use the so-called Weierstrass substitution: $$\sin(x)=\frac{2t}{1+t^2}$$ $$\cos(x)=\frac{1-t^2}{1+t^2}$$

0

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.

Cameron Buie
  • 102,994