Expand Sine and Cosine
Bracmat, 221 bytes

(P=F v a b.!arg:((sin|cos):?F.?v)&amp;(!v:@&amp;(!F.!v)|!F$!v)|!arg:%?a_%?b&amp;(P$!a)_(P$!b)|!arg)&amp;(f=i a b n u.1+(!arg:e^(?n*((i|-i):?i)*?u+?b)&amp;(!i*(sin.!u)+(cos.!u))^!n*f$(e^!b)|!arg:%?a_%?b&amp;(f$!a)_(f$!b)|!arg)+-1)&amp;(Z=.f$(P$!arg))


Try it online!