[tex]\frac{1}{2}+i\frac{\sqrt{3}}{2}=e^{i\frac{\pi}{3}}[/tex]
[tex]\frac{1}{2}-i\frac{1}{2}=e^{-i\frac{\pi}{4}}[/tex]
Deci
[tex]\left(\dfrac{\frac{1}{2}+i\frac{\sqrt{3}}{2}}{\frac{1}{2}-i\frac{1}{2}}\right)^{40}=\left(e^{i\frac{\pi}{3}}e^{i\frac{\pi}{4}}\right)^{40}=e^{i\frac{40\pi}{3}}e^{i10\pi}=e^{i(13\pi+\frac{\pi}{3})}=-e^{i\frac{\pi}{3}}=-\frac{1}{2}-i\frac{\sqrt{3}}{2}.[/tex]