# If $\sin x + \cos x =1+\sin x \cos x$, then find the general solution for x

Squaring on both sides $$\sin^2 x +\cos^2 x + 2\sin x \cos x=1+\sin^2 x \cos^2 x +2\sin x \cos x$$ $$\sin^2 x\cos^2 x=0$$ $$\sin 2x=0$$

I feel this answer is wrong because the answer is $$n\pi + (-1)^n\pi /2$$

What am I doing wrong?

Avoid squaring as it immediately introduces When do we get extraneous roots?

Your solution includes $$\sin x+\cos x=-(1+\sin x\cos x)$$ as well

Use $$a+b=1+ab\iff(1-a)(1-b)=0$$

• If that’s the case, then $\cos x$ and $\sin x$ will simultaneously be 1, which isn’t possible – Aditya Nov 20 '19 at 14:46
• @Aditya, if $$p\cdot q=0,$$ what can we conclude? – lab bhattacharjee Nov 20 '19 at 14:48
• Assuming a and b are $sin x$ and $cos x$, $ab=0$ should be that $x=\pi , 0, \pi/2$ – Aditya Nov 20 '19 at 14:54
• @Aditya, We need $$1-\sin x=0$$ or $$1-\cos x=0$$ right? Why are you saying simultaneously $$1$$ – lab bhattacharjee Nov 20 '19 at 14:55
• @Aditya, $$\cos x=1,x=2m\pi$$ right? Check if that satisfies the given equation – lab bhattacharjee Nov 20 '19 at 15:05

To avoid When do we get extraneous roots?

set $$\sin x+\cos x=u,u^2=?$$

$$2u=2+u^2-1\implies(u-1)^2=?$$