Question: Recursive trignometric transformations

It is evident that by repeated applications of the double-angle and product trigonometric identities, one may transform any monomial of the form sin(x)^p * cos(y)^q, where p and q are positive integers, to a linear combination of only first powers of sines and cosines.

Example 1:  The monomial  4*sin(x)*cos(y)^2 is equivalent to

 

Example 2: The monomial 16*sin(x)^2*cos(y)^3 is equivalent to             

How does one write a Maple procedure to do that transformation in the general case of sin(x)^p * cos(y)^q?

 

Please Wait...