Question: How to express a polynomial in cos(x) and sin(x) in terms of sin^m(nx)

Hello,

Say I have a rational function 

 

f:= q^4*(q^2+1)*((q^6+q^5-q^4-2*q^3+q+1)^6/q^13+(q^6+q^5-2*q^3-q^2+q+1)^6/q^25)/((1+q)^4*(-q^2+1)^2)

 

in a variable q, with big degrees in numerator and denominator. I happen to know that if I make a change of variable q=exp(Ix) this rational function can be written in the form

f(exp(Ix))=\sum_{k>0, n>=0} (coefficient(n,k)) sin^(2n-2)(kx/2), where this sum is finite.

I'm trying to find (1) what is the best way to simplify the rational function f and (2) how can I make the change of variable into these variables. 

I managed to put the rational function in terms of cos(x) and sin(x), however after a day of calculations the computer couldn't simplify the expression. 

For this I was using:  simplify(rationalize(convert(subs(q=exp(Ix),factor(rationalize(f))),trig)))

I appreciate any help.

Edit: Another way of getting this variables would be to force Maple to use multiple angle identities to write the powers of cosine(x) in terms of sin(kx). Is there any way to force this kind of simplification?

Please Wait...