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.