\(\Leftrightarrow\sqrt{2}sin\left(x+\frac{\pi}{4}\right)=\sqrt{2}cos3x\)
\(\Leftrightarrow cos3x=sin\left(x+\frac{\pi}{4}\right)\)
\(\Leftrightarrow cos3x=cos\left(\frac{\pi}{4}-x\right)\)
\(\Leftrightarrow\left[{}\begin{matrix}3x=\frac{\pi}{4}-x+k2\pi\\3x=x-\frac{\pi}{4}+k2\pi\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=\frac{\pi}{16}+\frac{k\pi}{2}\\x=-\frac{\pi}{8}+k\pi\end{matrix}\right.\)
\(\Rightarrow x=\left\{\frac{\pi}{16};\frac{9\pi}{16};\frac{7\pi}{8}\right\}\)