14. Let $a$ be a real constant, solve the equation $\sin \left(x+\frac{\pi}{4}\right)+\sin 2 x=a$.
14. From $\sin 2 x=-\cos 2\left(x+\frac{\pi}{4}\right)=2 \sin ^{2}\left(x+\frac{\pi}{4}\right)-1$, we get
$2 \sin ^{2}\left(x+\frac{\pi}{4}\right)+\sin \left(x+\frac{\pi}{4}\right)-1=a$.
Let $t=\sin \left(x+\frac{\pi}{4}\right)$, then we only need to solve the equation
$2 t^{2}+t-1=a$ in the interval $[-1,1]$.
Let $f(t)=2 t^{2}+t-1=2\left(t+\frac{1}{4}\right)^{2}-\frac{9}{8}$.
Draw the graph of $f(t)$ on $[-1,1]$. Therefore, the solutions to equation (*) are the x-coordinates of the intersection points of the graph of $f(t)$ and $y=a$.
(1) When $a>2$, equation (*) has no real solutions;
(2) When $0<a \leqslant 2$ or $a=-\frac{9}{8}$, equation (*) has one root $t=\frac{-1+\sqrt{9+8 a}}{4}$, yielding $x=-\frac{\pi}{4}+k \pi+(-1)^{k} \arcsin \left(\frac{-1+\sqrt{9+8 a}}{4}\right), k \in \mathbf{Z}$
(3) When $-\frac{9}{8}<a \leqslant 0$, equation (*) has two roots $t=\frac{-1 \pm \sqrt{9+8 a}}{4}$, yielding $x=-\frac{\pi}{4}+k \pi+(-1)^{k} \arcsin \left(\frac{-1 \pm \sqrt{9+8 a}}{4}\right), k \in \mathbf{Z}$