Any trick for evaluating $\left(\frac{\sqrt{3}}{2}\cos(\theta) + \frac{i}{2}\sin(\theta)\right)^7$? Expressions of the form $(a\cos(\theta) + bi\sin(\theta))^n$ come up from time to time in applications of complex analysis, but to my knowledge the De Moivre's formula can only be applied with $a = b$. Is there some trick to deal with the case of $a \neq b$, for example when the expression is $\left(\frac{\sqrt{3}}{2}\cos(\theta) + \frac{i}{2}\sin(\theta)\right)^7$?
 A: How about this:
$$ \frac{\sqrt{3}}{{2}} \cos \theta = \cos 30 \cos \theta= \frac{1}{2} \left[ \cos(30 - \theta)+\cos \left(30+ \theta \right) \right] =\frac12 (b+a)$$
$$ \frac12 \sin \theta= \sin(30) \sin \theta= \frac12 \left[\cos \left( 30 - \theta\right)- \cos (30+ \theta )\right]=\frac12 (b-a)$$
We have:
$$\frac{1}{2^7}\left[ (a+b) + i(b-a)\right]^7$$
Call $a+b=u=\sqrt{3} \cos \theta$, $b-a=v= \sin \theta$, then for the complicated part:
$$ \left[ u+iv\right]^7 = (u^2+v^2)^{\frac72} \left[\frac{u+iv}{(u^2 + v^2)^{\frac12}} \right]^7=(u^2 +v^2)^{\frac72} e^{i7( \tan^{-1} \frac{v}{u}) }$$
Now back substitute and simplify.
A: Long Comment:
For your particular problem there is a small tiny tiny algebraic simplification as
$$T=\sin \left(\frac{\pi }{3}\right) \cos (\theta )-i \cos \left(\frac{\pi }{3}\right) \sin (\theta )=\frac{1}{2} \sqrt{3} \cos (\theta )-\frac{1}{2} i \sin (\theta )\tag1$$
or
$$T=\cos \left(\frac{\pi }{6}\right) \cos (\theta )-i \sin \left(\frac{\pi }{6}\right) \sin (\theta )=\frac{1}{2} \sqrt{3} \cos (\theta )-\frac{1}{2} i \sin (\theta )\tag2$$
Rewriting (1) as
$$S=\left( \sin \left(\omega\right) \cos (\theta )-i \cos \left(\omega\right) \sin (\theta )\right)^n \tag3$$
we can get to
$$S= \left(\frac{1}{2}+\frac{i}{2}\right)^n (\sin (\theta +\omega )+i \sin (\theta -\omega ))^n \tag4$$
and likewise for (2)
$$S=\left(\cos (\theta ) \cos \left(\frac{\omega }{2}\right)+i \sin (\theta ) \sin \left(\frac{\omega }{2}\right) \right)^n$$
we get
$$S= \left(\frac{1}{2}-\frac{i}{2}\right)^n \left(\cos \left(\theta +\frac{\omega }{2}\right)+i \cos \left(\theta -\frac{\omega }{2}\right)\right)^n$$
Using @Buraian 's methods we have the interesting general result for (3)
$$S=\left( \sin \left(\omega\right) \cos (\theta )-i \cos \left(\omega\right) \sin (\theta )\right)^n=\left(\frac{1}{2}+\frac{i}{2}\right)^n\left(1-\cos (2 \theta ) \cos (2 \omega )\right)^{n/2} e^{ \left(i \,n \tan ^{-1}(\sin (\theta +\omega ),\sin (\theta -\omega ))\right)}\tag5$$
where $\tan ^{-1}(x,y)=\tan ^{-1}(\frac{y}{x})$ gives the angle of the point $[x,y]$ and where $\sin ^2(\theta -\omega )+\sin ^2(\theta +\omega )$ simplifies to $1-\cos (2 \theta ) \cos (2 \omega )$.
A: In general, from de Moivre's theorem, we have:
$$\cos x=\frac {e^{ix}+e^{-ix}}{2}$$ and $$\sin x =\frac {e^{ix}-e^{-ix}}{2}$$
Then, $$S=(a\cos x+ib\sin x)^n=\frac {((a+b) e^{ix}+(a-b) e^{-ix})^n}{2^n}$$
Hence, from the Binomial Theorem,
$$S=\frac {\sum_{r=0}^n \binom {n}{r} (a+b)^{n-r}(a-b)^r e^{i(n-2r)x}}{2^n}$$
Since $e^{i(n-2r)x}=\cos ((n-2r)x)+i\sin ((n-2r)x)$ we have:
$$S=\left(\frac {\sum_{r=0}^n \binom {n}{r} (a+b)^{n-r}(a-b)^r \cos((n-2r) x)}{2^n}\right)+i\left(\frac {\sum_{r=0}^n \binom {n}{r} (a+b)^{n-r}(a-b)^r \sin ((n-2r) x)}{2^n}\right)$$
Thus it is evident what this particular case shall simplify to.
