Euler's formula for complex numbers
\[z=re^{ix}=r (cosx+isinx)\]
where r is modulus of complex number and x is called argument of complex number z
\[(cos(2x)-isin(2x))^p\]=\[cos(-2x)+isin(-2x)\]=\[(e^{-2xpi}) \]
\[(cos(3x)+isin(3x))^n\]=\[(e^{3xni})\]
\[ cos(4x)+isin(4x)=e^{4nxi}\]
\[ cos(5x)+isin(5x)=e^{5mxi}\]
Putting all these in \[\frac{(cos2x-isin2x)^{p}(cos3x+isin3x)^{q}}{(cos4x+isin4x)^{n}(cos5x+isin5x)^{m}}\]=\[ \frac{(e^{-2xpi}) (e^{-3xqi})}{(e^{4xni}) (e^{5xmi})}\]