Subject: controlling output of a trigonometric sum
From: Richard Fateman
Date: Mon, 25 Nov 2013 16:25:25 -0800
On 11/17/2013 11:40 AM, Giulio Venezian wrote:
> Here is a fragment: (the %o lines are messed up)
>
> (%i59) (t*cos(x)+t^3*cos(3*x))^2*4*cos(x);
>
ratsimp(poissimp(%)); is pretty close.
t^6*cos(7*x)+(t^6+2*t^4)*cos(5*x)+(4*t^4+t^2)*cos(3*x)+(2*t^6+2*t^4+3*t^2)*cos(x)
but read about constraints of poissimp.
if you set powerdisp:true you get
(3*t^2+2*t^4+2*t^6)*cos(x)+(t^2+4*t^4)*cos(3*x)+(2*t^4+t^6)*cos(5*x)+t^6*cos(7*x)