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?
 A: 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}$$
A: Here’s two more very straightforward ways to go about it:
$${\cos x+\sin x\over\sqrt 2}=\sqrt{1+k\over 2}$$
$$\implies \sin\left(x+\frac\pi4\right) = \sqrt{1+k\over 2}$$ (note that this expression is valid for all $k$ in the range). Hence, $$x=\arcsin\left(\sqrt{1+k\over 2}\right)-\frac \pi4$$

For the first part, we have $$\sin2x=\sin\left(2\arcsin\left(\sqrt{1+k\over 2}\right)-\frac\pi2\right)$$
$$=-\cos\left(2\arcsin\left(\sqrt{1+k\over 2}\right)\right)$$
$$={1+k\over 2}+{1+k\over 2}-1$$
$$=k$$
For the second, we have
$$\sin x-\cos x = \sin\left (\arcsin\left(\sqrt{1+k\over 2}\right)-\frac\pi4\right)-\cos\left(\arcsin\left(\sqrt{1+k\over 2}\right)-\frac\pi4\right)$$
$$=\left(\sin\left(\arcsin\left(\sqrt{1+k\over 2}\right)\right)-\cos \left(\arcsin\left(\sqrt{1+k\over 2}\right)\right)-\sin \left(\arcsin\left(\sqrt{1+k\over 2}\right)\right)-\cos \left(\arcsin\left(\sqrt{1+k\over 2}\right)\right)\right)\cdot\frac1{\sqrt 2} $$
$$=-\sqrt 2\cdot\cos \left(\arcsin\left(\sqrt{1+k\over 2}\right)\right)$$
$$=-\sqrt2\cdot\mp\sqrt{1-k\over 2}$$
And since $x\in\left(\frac\pi4,\frac\pi2\right)$, $\sqrt{1+k\over 2}>0$ because $k\in(-1,1)$, and because $x = \left(\arcsin\left(\sqrt{1+k\over 2}\right)-\frac\pi4\right)$, $\cos \left(\arcsin\left(\sqrt{1+k\over 2}\right)\right)<0$ and so we have $$\sin x-\cos x = \sqrt{1-k}$$
And finally, $$\tan x= \tan \left(\arcsin\left(\sqrt{1+k\over 2}\right)-\frac\pi4\right)$$ With this and $\tan\left(\alpha-\frac\pi4\right)={1-\tan\alpha\over1+\tan\alpha}$ we get our result that $$\tan x = {1+\sqrt{1-k^2}\over k}$$

Note that we have used $\cos(\arcsin\alpha) = \sqrt{1-\alpha^2}$ and $\tan(\arcsin\alpha) ={\alpha\over\sqrt{1-\alpha^2}}$ in our simplification. Also note that any part may be solved by steps from the other two similarly to the answer due to Quanto. 

Yet another method picking off from the first line of the first method:
Writing $k$ in terms of $x$ we have:
$$k=2\sin^2\left(x+\frac\pi4\right)-1$$
$$\implies k=-\cos\left(2x+\frac\pi2\right)$$
$$\implies \boxed{k = \sin2x}$$
Next, we have
$$\sin x -\cos x = \sqrt{(\sin x +\cos x)^2-4\sin x\cos x}$$
$$=\sqrt{1+k-2k}$$
$$\implies \boxed{\sin x - \cos x = \sqrt{1-k}}$$
Also, I did not see the "Hence" in the last part of the question. So this last step is common to both parts of the solution
$$\tan x = \sin x + \cos x$$
By Componendo et Dividendo
$${\tan x - 1\over \tan x + 1} = {\sin x - \cos x \over \sin x + \cos x} = \sqrt{1-k\over 1+k}$$
$$\implies \sqrt{1+k}\tan x -\sqrt{1+k} = \sqrt{1-k}\tan x +\sqrt{1-k}$$
$$\implies \tan x(\sqrt{1+k}-\sqrt{1-k})=\sqrt{1+k}+\sqrt{1-k}$$
Multiplying both sides by $$\sqrt{1+k}+\sqrt{1-k}\over(\sqrt{1+k}+\sqrt{1-k})\cdot(\sqrt{1+k}-\sqrt{1-k})$$
we have
$$\tan x ={ (\sqrt{1+k}+\sqrt{1-k})^2\over \sqrt{1+k}^2-\sqrt{1-k}^2)}$$
$$ = {1+k+1-k-2\sqrt{1-k^2}\over 1+k-1+k}$$
$$\implies\boxed{\tan x = {{1+\sqrt{1-k^2}\over k}}}$$
The first method may look unwieldy due to the repeated appearance of $\arcsin\left(\sqrt{1+k\over 2}\right)-\frac\pi4$ but it is quite simple. Read it as some angle $\phi$ instead and it’ll make it better.
A: You did well in determining $\sin2x=k$.
Now, $\cos2x=-\sqrt{1-\sin^22x}=-\sqrt{1-k^2}$, due to $\pi/2<2x<\pi$.
Next, you can recall that
$$
\tan x=\frac{1-\cos2x}{\sin2x}=\frac{\sin2x}{1+\cos2x}
$$
(a not so well-known bisection formula for the tangent). Using the first formula yields
$$
\tan x=\frac{1+\sqrt{1-k^2}}{k}
$$
Finally, $(\sin x-\cos x)^2=1-\sin2x=1-k$. The limitation on $x$ ensures that $\sin x>\cos x$, so
$$
\sin x-\cos x=\sqrt{1-k}
$$
