Solution of trig equation $\sin x + \cos x = \sqrt 2$ I'm trying to do this equation
$$\sin x + \cos x =\sqrt 2$$
If I square both sides, it becomes 
$$(\sin x)^2 + (\cos x)^2 = 2$$
But isn't $(\sin x)^2+(\cos x)^2= 1$ (Pythagorean theorem)?
It should be $$(\sin x)^2 + (\cos x )^2 + 2 \sin x \cos x = 2.$$
But I don't know where the $2 \sin x\cos x$ comes from.
Which trig identity is it? Thanks a bunch!
 A: Hint: 
If $f(x)= a\sin x+b\cos x$ then you can write it in a form $$f(x) = A\sin(x+\varphi)$$ where $A =\pm \sqrt{a^2+b^2}$ and $\tan \varphi = {b\over a}$

In your case $a=b=1$ so $A= \sqrt{2}$ and $\tan \varphi = 1 \implies \varphi = {\pi \over 4}$
A: If you square both sides, the algebraic identity $(a+b)^2=a^2+2ab+b^2$ gives you
$$\sin^2(x)+2\sin(x)\cos(x)+\cos^2(x)=2$$
now using Pythagoras and the double angle identity for $\sin$ gives
$$1+\sin(2x)=2$$
or 
$$\sin(2x)=1$$
can you take it from here?

Another way is to use the $\tan(x/2)$ substituition (Weierstrass Substituion) to obtain the polynomial equation
$$\frac{2t}{1+t^2}+\frac{1-t^2}{1+t^2}=\sqrt{2}.$$
A: $$\require{cancel} \frac{\sin(x)}{\sqrt{2}} + \frac{\cos(x)}{\sqrt{2}} = \frac{\sqrt2}{\sqrt2}$$
$$\cos(\frac{\pi}4)\sin(x)+\sin(\frac{\pi}4) \cos(x)=1$$
Using the following identity:
$$\sin(A\pm B)=\cos(B)\sin(A)\pm\cos(A)\sin(B)$$
Therefore:
$$\sin(x+\frac{\pi}4)=1$$
Taking the sine inverse of both sides:
Sine Inverse
$$\sin^{-1}(\mathbf{\frac{opp}{hyp}}) = \mathbf{angle}$$
Therefore, we can conjecture:
$$\cancel{\sin^{-1}}(\cancel{\sin}(\mathbf{angle}))=\sin^{-1}(\mathbf{\frac{opp}{hyp}}) $$
$$\mathbf{ang} = \sin^{-1}(\mathbf{\frac{opp}{hyp}})$$
$$\sin^{-1}(\sin(x+\frac{\pi}4))=\sin^{-1}(1)$$
$$x+\frac{\pi}4=\frac{\pi}2$$
$$x=\frac{\pi}4$$
A: $$\sin x=\sqrt2-\cos x$$ and by squaring
$$1-\cos^2x=2-2\sqrt2\cos x+\cos^2x.$$
Solving the quadratic equation we get a single solution
$$\cos x=\frac1{\sqrt2},$$ and from the initial equation, $$\sin x=\frac1{\sqrt2}.$$
