Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

replacing even powers of sin(x) by powers of (1-cos(x)^2)

Hi folks, I would like to force sage to take an expression like

f = cos(x)(sin(x))^2+cos(x)^3(sin(x))^5

and replace the even powers of sin(x) by powers of (1-cos(x)^2), so that the above would become

f=cos(x)(1-cos(x)^2)+cos(x)^3(1-cos(x)^2)^2*sin(x)

Any suggestions?

click to hide/show revision 2
None

replacing even powers of sin(x) by powers of (1-cos(x)^2)

Hi folks, I would like to force sage to take an expression like

f = cos(x)(sin(x))^2+cos(x)^3(sin(x))^5

cos(x)*(sin(x))^2+cos(x)^3*(sin(x))^5

and replace the even powers of sin(x) sin(x) by powers of (1-cos(x)^2), (1-cos(x)^2), so that the above would become

f=cos(x)(1-cos(x)^2)+cos(x)^3(1-cos(x)^2)^2*sin(x)

f=cos(x)*(1-cos(x)^2)+cos(x)^3*(1-cos(x)^2)^2*sin(x)

Any suggestions? suggestions?