It seems that fu does not deal with higher powers of cos and sin, but if you are writing a script, you could easily
derive a general formula to reduce the powers.
For example, if you start with Euler's formula
cos(x) = (exp(I*x) + exp(-I*x))/2
and use the binomial formula to obtain
cos(x)**n = (exp(I*n*x) + C(n, 1)*exp(I*(n-2)*x) + C(n, 2)*exp(I*(n-4)*x) + ,,, + exp(-I*n*x)) / 2**n ,
then using C(n, n-k) = C(n, k) you get
cos(x)**n = (cos(n*x) + C(n, 1)*cos((n-2)*x) + ...) / 2**(n - 1) .
(If n is even, the last term in the parentheses is C(n, n/2)/2.)
Kalevi Suominen