Solve $\left ( 1- \sqrt{2}\sin x \right )\left ( \cos 2x+ \sin 2x \right )= \frac{1}{2}$ Solve 
$$\left ( 1- \sqrt{2}\sin x \right )\left ( \cos 2x+ \sin 2x \right )=  \frac{1}{2}$$
Now I did not understand how can i solve that.
I have tried substituting  $\cos(2x)=\cos^2(x)−\sin^2(x)$ and$\,$ $\sin(2x)=2\sin(x)\cos(x)$,
the equation is now $(1−\sqrt2\sin(x))(\cos^2(x)−\sin^2(x)+2\sin(x)\cos(x))=\frac12$
Help Required
Thanks

You can substitute: 
$$y=2x\Rightarrow x=\frac y2$$
$$\left ( 1- \sqrt{2}\sin \frac y2 \right )\left ( \cos y+ \sin y \right )=  \frac{1}{2}$$
Remember that:
$$\sin\frac\theta2=\pm\sqrt{\frac{1-\cos\theta}2}$$
So you get: $\left ( 1- \sqrt{2} (\pm\sqrt{\frac{1-\cos\theta}2})\right )\left ( \cos y+ \sin y \right )=  \frac{1}{2}$, which simplifies to:
$$\left ( 1 \pm\sqrt{{1-\cos\theta}}\right )\left ( \cos y+ \sin y \right )=  \frac{1}{2}$$
Solving for the first case:$\left ( 1 -\sqrt{{1-\cos\theta}}\right )\left ( \cos y+ \sin y \right )=  \frac{1}{2}$
$$\begin{align}
\cos  y-(\cos  y) \sqrt{1-\cos (y)}+\sin  y-(\sin  y) \sqrt{1-\cos (y)}&=\frac{1}{2}\\
-(\cos  y) \sqrt{1-\cos (y)}-(\sin  y) \sqrt{1-\cos (y)}&=\frac{1}{2}-\cos  y-\sin  y\\
\left(-(\cos  y) \sqrt{1-\cos (y)}-(\sin  y) \sqrt{1-\cos (y)}\right)^2&=\left(\frac{1}{2}-\cos  y-\sin  y\right)^2\\
\end{align}$$
We then evaluate each side:
$$\begin{align}
\left(-(\cos  y) \sqrt{1-\cos (y)}-(\sin  y) \sqrt{1-\cos (y)}\right)^2&=\cos ^2 y-\cos ^3 y+2 (\cos  y) (\sin  y)-2 \left(\cos ^2 y\right) (\sin  y)+\sin ^2 y-(\cos  y) \left(\sin ^2 y\right)\\
\left(\frac{1}{2}-\cos  y-\sin  y\right)^2&=y \sin ^2-y \sin +y \cos ^2-y \cos +2 (y \sin ) (y \cos )+\frac{1}{4}\\
\end{align}$$
Continuing the computation, we get:
$$\begin{align}
-\frac{1}{4}+\cos  y-\cos ^3 y+\sin  y-2 \left(\cos ^2 y\right) (\sin  y)-(\cos  y) \left(\sin ^2 y\right)&=0\\
-1+4 (\cos  y)-4 \left(\cos ^3 y\right)+4 (\sin  y)-8 \left(\cos ^2 y\right) (\sin  y)-4 (\cos  y) \left(\sin ^2 y\right)&=0\\
-1-4 (\sin  y)+8 \left(\sin ^3 y\right)&=0\\
(2 (\sin  y)+1) \left(-1-2 (\sin  y)+4 \left(\sin ^2 y\right)\right)&=0\\
\end{align}$$
We get the correct answers as:
$$y=\begin{cases}
2 \pi  n+\frac{7 \pi }{6}\qquad{n \in \mathbb{Z}}\\
2 \pi  n+\frac{3 \pi }{10}\\
2 \pi  n+\frac{11 \pi }{10}\\
2 \pi  n+\frac{19 \pi }{10}\\
\end{cases}$$
And since $x=\frac y2$, then the first set of solutions for $x$ will be:
$$x=\begin{cases}
2 \pi  n+\frac{7 \pi }{12}\qquad{n \in \mathbb{Z}}\\
2 \pi  n+\frac{3 \pi }{20}\\
2 \pi  n+\frac{11 \pi }{20}\\
2 \pi  n+\frac{19 \pi }{20}\\
\end{cases}$$
The second case:$\left ( 1 +\sqrt{{1-\cos\theta}}\right )\left ( \cos y+ \sin y \right )=  \frac{1}{2}$ returns the following answers:
$$y=\begin{cases}
2 \pi  n-\frac{ \pi }{6}\qquad{n \in \mathbb{Z}}\\
2 \pi  n+\frac{7 \pi }{10}\\
\end{cases}$$
However,the second answer for $x$ does not hold for the original equation. And thus, our final solution set contains:
$$\therefore x=\begin{cases}
2 \pi  n-\frac{ \pi }{12}\qquad{n \in \mathbb{Z}}\\
2 \pi  n+\frac{7 \pi }{12}\\
2 \pi  n+\frac{3 \pi }{20}\\
2 \pi  n+\frac{11 \pi }{20}\\
2 \pi  n+\frac{19 \pi }{20}\\
\end{cases}$$
