Comment #1 on issue 1590 by asmeurer: Reduce powers of sin's and cos's to
multi-argument functions
http://code.google.com/p/sympy/issues/detail?id=1590
There is also a quick and dirty work around way to do this, which involves
converting to complex exponentials first, then back.
In [3]: (cos(x)**5).rewrite(exp).expand().rewrite(cos)
Out[3]:
cos(5⋅x) 5⋅cos(x) 5⋅cos(3⋅x)
──────── + ──────── + ──────────
16 8 16
So while it would be better to implement the series (with binomial
coefficients) given on that Wikipedia page, which is now
http://en.wikipedia.org/wiki/Trig_identities#Power-reduction_formula, but
that way can work too. The series would (probably) be faster to compute,
and would also allow for expanding cos(x)**n and sin(x)**n with symbolic n.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.