My question is to simplify the following expression:$$\frac{1}{2\sin x}\left(\sin 2x + \cos \frac{\pi}{4} + \cos \left( \frac{3\pi}{4} - 2x\right) + \cos 0 + \cos \left(\pi - 2x\right) + \cos\left(-\frac{\pi}{4}\right) + \cos\left(\frac{5\pi}{4} - 2x\right) + \cos\left(-\frac{\pi}{2}\right) + \cos\left(\frac{3\pi}{2} - 2x\right)\right)$$
I have this complicated trigonometric expression as above, it is obtained in a geometry problem but I don't know what's the best way to simplify it. The answer for this is $(1 + \sqrt{2})\sin x$ according to WolframAlpha.
My attempt
\begin{align} &\frac{1}{2\sin x}\left(\sin 2x + \cos \frac{\pi}{4} + \cos \left( \frac{3\pi}{4} - 2x\right) + \cos 0 + \cos \left(\pi - 2x\right) + \cos\left(-\frac{\pi}{4}\right) + \cos\left(\frac{5\pi}{4} - 2x\right) + \cos\left(-\frac{\pi}{2}\right) + \cos\left(\frac{3\pi}{2} - 2x\right)\right)\\ &=\frac{1}{2\sin x}\left(\cos \frac{\pi}{4} + \cos \left( \frac{3\pi}{4} - 2x\right) + \cos 0 + \cos \left(\pi - 2x\right) + \cos\left(-\frac{\pi}{4}\right) + \cos\left(\frac{5\pi}{4} - 2x\right) + \cos\left(-\frac{\pi}{2}\right)\right) \\ &=\frac{1}{2\sin x}\left(1 + \sqrt{2} + \cos \left( \frac{3\pi}{4} - 2x\right) + \cos \left(\pi - 2x\right) + \cos\left(\frac{5\pi}{4} - 2x\right)\right) \end{align} $$$$ How to compute after this? Should I use the compound angle formula to expand the $\cos(a + b)$ terms? It seems a bit heavy to me cuz I don't see how it will cancel nicely with $\sin x$. Or should I use the sum to product formula for cos? Thanks in advance!