# $\cos^n x\sin^m x$ as sum of sine and cosine functions of multiples of the argument.

Gradshteyn and Ryzhik (2007), e.q. 1.320 has some formulas for representing the powers of sine and cosine functions as sums of sine or cosine functions of multiples of the angle, e.g.

$$\cos^3x = \frac{1}{4}(\cos 3x + 3 \cos x)$$

$$\cos^n x\sin^m x$$

Can this be expressed the same way, e.g.

$$\cos^n x\sin^m x = \sum_0^{n+m}a_k\cos kx + \sum_0^{n+m}b_k\sin kx$$

Thanks

-

Yes, any polynomial in $\cos(x)$ and $\sin(x)$ can be expressed as a linear combination of $\cos(kx)$ and $\sin(kx)$ for $0 \le k \le d$, where $d$ is the total degree of the polynomial. The simplest way to do this is to convert to complex exponentials and expand, then convert back to sines and cosines.
Thus for example \eqalign{\cos(x)^3 \sin(x)^4 &= \frac{i^4}{2^7} (e^{ix} + e^{-ix})^3 (e^{-ix} - e^{ix})^4 \cr &= \frac{3}{128} (e^{ix} + e^{-ix}) - \frac{3}{128} (e^{3ix} + e^{-3ix}) - \frac{1}{128} (e^{5ix} + e^{-5ix}) + \frac{1}{128}(e^{7ix} + e^{-7ix})\cr &= \frac{3}{64} \cos(x) - \frac{3}{64} \cos(3x) - \frac{1}{64} \cos(5x) + \frac{1}{64} \cos(7x)\cr}
Moreover, if (as in the case above) all terms are of odd total degree, only odd $k$ contribute; if all are of even total degree, only even $k$ contribute. If (as in this case) the polynomial is an even function of $x$) you only have cosine terms; if the polynomial is an odd function you only have sine terms.