1

How do we solve $\sin x+\cos x=1$?

I have solved it easily by making the substitution, $\sin x+\cos x=1=R\sin(x+a)$ which gives the solutions $x=2n\pi, 2n\pi+\pi/2$.

But when I do as follows $$ (\sin x+\cos x)^2=1\implies 2\sin x\cos x=0\implies \sin 2x=0\implies2x=n\pi $$ For even and odd $$ 2x=2m\pi\text{ or }2x=(2m+1)\pi\\x=m\pi\text{ or } x=m\pi+\frac{\pi}{2} $$ What am I missing here ?

Anne Bauval
  • 49,005
SOORAJ SOMAN
  • 8,038
  • Consider the last part of Lab Bhattacharjee's answer below and reduce your equation to $$a.sin(x)+b.cos(x)=c$$ with $a^2+b^2=1$ by setting $$a:=\frac{A}{\sqrt{A^2+B^2}}\ ;\ B:=\frac{B}{\sqrt{A^2+B^2}}\ ;\ c:=\frac{C}{\sqrt{A^2+B^2}}$$ Then set $$a:=sin(\alpha)\ ;\ b=cos(\alpha)$$ you will be on the right track ! – Duchamp Gérard H. E. Aug 12 '17 at 12:26
  • @DuchampGérardH.E. The OP already did that. They are asking why their second method doesn't give the same result. – Anne Bauval May 10 '24 at 06:40
  • @AnneBauval I do not understand your statement, sorry about that. – Duchamp Gérard H. E. May 14 '24 at 22:19
  • The OP wrote I have solved it easily by making the substitution, $\sin x+\cos x=1=R\sin(x+a)$ which gives the solutions $x=2n\pi, 2n\pi+\pi/2$ – Anne Bauval May 14 '24 at 22:24
  • @AnneBauval Hummm ... bah, this is a matter of taste. I prefer giving the OP general knowledge that he can exploit later in similar situations. that's all. – Duchamp Gérard H. E. May 14 '24 at 22:27

7 Answers7

6

You squared your equation. That gives you extra solutions. Specifically, your second approach picks up all solutions to $\sin x+\cos x=-1$ as well.

Anne Bauval
  • 49,005
Arthur
  • 204,511
2

This method gives the solution to $\sin x+\cos x=1$ or $\sin x+\cos x=-1$.

Both the equations becomes $(\sin x+ \cos x) ^2=1$ after squaring.

CY Aries
  • 23,788
2

One way is this: if $\sin x + \cos x = 1$, then both $\sin x$ and $\cos x$ are non negative, otherwise the other one would be greater than $1$. If one of them is different from $0$ or $1$, one has $$1 = \sin^2 x + \cos^2 x \lt \sin x + \cos x = 1$$ This is impossible. The only remaining possibilities are $(\sin x, \cos x) = (0, 1) $ or $(1, 0)$, hence $x = 2 k \pi$ or $\frac{\pi}{2} + 2 k \pi$.

Gribouillis
  • 16,826
  • Interesting trick, but the OP already solved the equation by a more standard method. They are only asking why their second method doesn't give the same result. – Anne Bauval May 10 '24 at 06:47
  • 1
    @AnneBauval The question "what am I missing here?" is at least imprecise about what the OP wants. Also the title "solve..." leaves many possibilities open. Also in what sense is my reply "less standard"? Vive la liberté! – Gribouillis May 10 '24 at 08:13
1

$x=1$ is not equal to $x^2=1$.

For example: $-1=1$ is wrong, but $(-1)^2=1^2$ is true.

I think it's better to solve your equation by the following way.

We need to solve $$\frac{1}{\sqrt2}\sin{x}+\frac{1}{\sqrt2}\cos{x}=\frac{1}{\sqrt2}$$ or $$\sin(45^{\circ}+x)=\sin45^{\circ},$$ which gives $$45^{\circ}+x=45^{\circ}+360^{\circ}k,$$ which is $x=360^{\circ}k$, $k\in\mathbb Z$ or $$45^{\circ}+x=135^{\circ}+360^{\circ}k,$$ which is $x=90^{\circ}+360^{\circ}k$, $k\in\mathbb Z$ and we got the answer: $$\{90^{\circ}+360^{\circ}k,360^{\circ}k|k\in\mathbb Z\}$$

  • The beginning of your answer perfectly adresses the OP's question. The rest is useless because the OP already did that. They are asking why their second method doesn't give the same result. – Anne Bauval May 10 '24 at 06:43
1

HINT:

Avoid squaring as it generally introduces extraneous root(s).

Here use double angle formula $\sin2A=2\sin A\cos A$ and $\cos2A=12-\sin^2A$

OR in general cases $$A\sin x+B\cos x=C$$ use Weierstrass Substitution

0

HINT: use that $$\sin(x)+\cos(x)=\sqrt{2} \sin \left(x+\frac{\pi }{4}\right)$$

-1

You can divide both sides by $\sqrt 2$ to get $$\cos (\frac {π}{4}-x) =1$$ which can be further be solved easily.

Rohan Shinde
  • 10,061