<s>[INST] Solve $\sin x + \cos x = \sqrt{1+k}$ for $\sin 2x$, $\sin x-\cos x$, and $\tan x$ in terms of $k$ Given that $\sin x + \cos x = \sqrt{1+k}$, $-1 \le k \le 1$


*

*Find the value of $\sin 2x$ in terms of k 

*Given that $x \in (45^{\circ}, 90^{\circ})$ deduce that $\sin x - \cos x = \sqrt{1-k}$

*Hence, show that $\tan x = \dfrac{1 + \sqrt{1-k^2}}{k}$
Okay, I have figured out that 
$$ \sin^2 x + \cos^2 x + 2 \sin x \cos x  = 1+k \implies \sin 2x = k $$
Now, I am not sure what approach I should use to deduce the second one.
And can somebody give me a hint on how to start with the third one?
 [/INST] Try this for the second one,
$$ (\sin x- \cos x)^2=  (\sin x+\cos x)^2 -2\sin 2x$$
For the third one, solve the equations below for $\sin x$ and $\cos x$,
$$ \sin x + \cos x = \sqrt{1+k}$$
$$ \sin x- \cos x = \sqrt{1-k}$$
and then plug them into
$$\tan x= \frac{\sin x}{\cos x}$$
</s>