<s>[INST] I need to find the real and imaginary part of this $Z_{n}=\left (\frac{ \sqrt{3} + i }{2}\right )^{n} + \left (\frac{ \sqrt{3} - i }{2}\right )^{n}$ I have a test tomorrow and i have some troubles understanding this kind of problems, would really appreciate some help with this
$$ Z_{n}=\left (\frac{ \sqrt{3} + i }{2}\right )^{n} + \left (\frac{ \sqrt{3} - i }{2}\right )^{n}
$$
$$ 
Z_{n}\epsilon  \mathbb{C}
$$
 [/INST] Note that $z=\left (\frac{ \sqrt{3} + i }{2}\right )^{n}=(a+bi)^n$ we have 
$$|z|=\sqrt{(\sqrt{3}/2)^2+(1/2)^2}=1, \quad \theta_z=\arctan(\tfrac{b}{a})=\arctan(\tfrac{1}{\sqrt{3}})=\tfrac{\pi}{6}$$
and for $w=\left (\frac{ \sqrt{3} - i }{2}\right )^{n}=(a-bi)^n$ we have 
$$|w|=\sqrt{(\sqrt{3}/2)^2+(1/2)^2}=1, \quad \theta_w=\arctan(-\tfrac{b}{a})=\arctan(-\tfrac{1}{\sqrt{3}})=-\tfrac{\pi}{6}$$
Then, 
$$z=|z|^n(\cos\theta_z+i\sin\theta_z)^n=\left[\cos\left(\tfrac{\pi}{6}\right)+i\sin\left(\tfrac{\pi}{6}\right)\right]^n$$
$$w=|w|^n(\cos\theta_w+i\sin\theta_w)^n=\left[\cos\left(-\tfrac{\pi}{6}\right)+i\sin\left(-\tfrac{\pi}{6}\right)\right]^n$$
Using de Moivre's formula
$$z^n=|z|^n(\cos\theta+i\sin\theta)^n=|z|^n(\cos(n\theta)+i\sin(n\theta))^n$$
we get 
$$z=\left[\cos\left(\tfrac{\pi}{6}\right)+i\sin\left(\tfrac{\pi}{6}\right)\right]^n=\left[\cos\left(\tfrac{n\pi}{6}\right)+i\sin\left(\tfrac{n\pi}{6}\right)\right]$$
$$w=\left[\cos\left(-\tfrac{\pi}{6}\right)+i\sin\left(-\tfrac{\pi}{6}\right)\right]^n=\left[\cos\left(-\tfrac{n\pi}{6}\right)+i\sin\left(-\tfrac{n\pi}{6}\right)\right]=\left[\cos\left(\tfrac{n\pi}{6}\right)-i\sin\left(\tfrac{n\pi}{6}\right)\right]$$
Finally, 
$$Z_n=z+w=2\cos\left(\tfrac{n\pi}{6}\right)$$
</s>