<s>[INST] How can I prove that $\arcsin \left(\sqrt\frac{1 + \sin2x}{2} \right)= |x + \frac{\pi}{4}|$ the function $ f$ is defined as: $\arcsin \sqrt\frac{1 + \sin2x}{2}$
The function is defined on $\mathbb{R}$. 
Prove that $f(x) = |x + \frac{\pi}{4}|$ for all $x$ in $[\frac{-3\pi}{4}, \frac{\pi}{4}]$
We have for all in $ x \in \mathbb{R} $ :
$$f'(x) = \frac{\cos2x}{\sqrt{ \frac{3 - 2\sin2x - \sin^2 2x}{4}}} $$  
I don't know how to proceed to prove that $f(x) = |x + \frac{\pi}{4}|$ for all $x$ in $[\frac{-3\pi}{4}, \frac{\pi}{4}]$
Thank you. 
 [/INST] Note that we can write
$$\begin{align}
\frac{1+\sin(2x)}{2}&=\frac{\cos^2(x)+2\sin(x)\cos(x)+\sin^2(x)}{2}\\\\
&=\frac{(\sin(x)+\cos(x))^2}{2}\\\\
&=\frac{2\sin^2(x+\pi/4)}{2}
\end{align}$$
Can you proceed now?
</s>