<s>[INST] If $(1 + \operatorname{cis}x)(1 + \operatorname{cis} 2x) = a + bi$, prove that $a^2 + b^2 = (4\cos x \cos\frac x2)^2$ Could anyone help me with this? I'm stuck.

If $$(1 + \operatorname{cis}x)(1 + \operatorname{cis} 2x) = a + bi$$ prove that $$a^2 + b^2 = \left(4\cos x \cos\frac x2\right)^2$$

For reference, $\operatorname{cis}x = \cos x + i\sin x$.
I found that 
$$a = 1 + \cos x + \cos2x + \cos3x \quad\text{and}\quad 
b = \sin x + \sin2x + \sin3x$$
 [/INST] Hint:
$$1+\text{cis}2y=1+\cos2y+i\sin2y=2\cos y(\cos y+i\sin y)$$
$$|1+\text{cis}2y|=|2\cos y|\cdot|\cos y+i\sin y|=2|\cos y|$$
$$|1+\text{cis}2y|^2=4|\cos y|^2=4\cos^2y$$
</s>