Given,
$$\cos{\frac{x}{2}} +\sin{(3x)} + \sqrt{3}\left(\sin\frac{x}{2} + \cos{(3x)}\right)$$
How can we write this as a product?
Some things I have tried:
- Grouping like arguments with each other. Wolfram Alpha gives $$\cos{\frac{x}{2}} + \sqrt{3}\sin{\frac{x}{2}} = 2\sin{\left(\frac{x}{2} + \frac{\pi}{6}\right)}$$but I don't know how to derive that myself or do a similar thing with the $3x$.
- Write $3x$ as $6\frac{x}{2}$ and then using the triple and double angle formulas, but that is much too tedious and there has to be a more efficient way.
- Rewriting $\sqrt{3}$ as $2\sin{\frac{\pi}{3}}$ and then expanding and trying to use the product-to-sum formulas, and then finally grouping like terms and then using the sum-to-product formulas, but that didn't work either.
I feel like I'm overthinking this, so any help or insights would be useful.