<s>[INST] Given $\cos (\theta)$ and $\sin (\theta)$, find $2\theta$ I am working on my scholarship exam. I worked through almost final step but got my answer wrong. Could you please have a look?

If $\cos (\theta) = \sqrt{\frac{1}{2}+\frac{1}{2\sqrt{2}}}$ and $\sin
(\theta) = -\sqrt{\frac{1}{2}-\frac{1}{2\sqrt{2}}}$ with
   $0\leq\theta<2\pi$, it follows that $2\theta = ..... \pi$

What I have got is below:
$\sin(2\theta)=2\sin\theta\cos\theta$
Then, $\sin(2\theta)=-\frac{1}{\sqrt{2}}$
Hence, $2\theta = \frac{5\pi}{4}$ or $\frac{7\pi}{4}$ (quadrant 3 or 4)
$\theta=\frac{5\pi}{8}$ or $\frac{7\pi}{8}$
Since $\cos\theta$ is positive and $\sin\theta$ is negative, $\theta$ should be in quadrant 4 but my  $\theta$'s are not. So I cannot use my $2\theta$ as a final answer.
However, the answer key provided is $\theta=\frac{15\pi}{4}$, Why do you think that is the case? How did they get to this answer? Please help.
 [/INST] Your mistake is at this step:
$\sin(2\theta)=-\frac{1}{\sqrt{2}}$, hence $2\theta = \frac{5\pi}{4}$ or $\frac{7\pi}{4}$.
The correct step is:
$\sin(2\theta)=-\frac{1}{\sqrt{2}}$, hence $2\theta = \frac{5\pi}{4}+2k\pi$ or $\frac{7\pi}{4}+2k\pi$, where $k$ is any integer. So dividing by 2 we get
 $\theta = \frac{5\pi}{8}+k\pi$ or $\frac{7\pi}{8}+k\pi$, where $k$ is any integer.
 If you take $k=0$, the answer doesn't work. So you need to use a different $k$.
</s>