Hi again, I've submitted a pull request for this, adding the simplification to cos: https://github.com/sympy/sympy/pull/572
It should be fairly quick to review if there's no objections to it. Thanks! Tomo On Thu, Aug 18, 2011 at 6:58 PM, Aaron Meurer <asmeu...@gmail.com> wrote: > Yes, we already have functions where this behavior should go. They're > called trigsimp() and combsimp(), respectively. And both are called > from the generic simplify(). > > And I generally agree that more advanced simplification should not > happen automatically. The question is where to draw the line. > Perhaps this little write-up I did on automatic simplification a while > back would be a good read at this point > (https://github.com/sympy/sympy/wiki/Automatic-Simplification). > > Aaron Meurer > > On Thu, Aug 18, 2011 at 4:28 PM, someone <someb...@bluewin.ch> wrote: > > Hi, > > > > > >> Either make cos.eval() to it, or make trigsimp() do it. Don't do any > >> of those other hacks you suggested. My vote goes for making cos.eval > >> do it, but I wouldn't be averse to putting it in trigsimp() instead. > > > > I think that at least there should be a powerful general "simplification" > > function that does transformations like this one. And for example also > > simplifies more "complex" expressions like: > > > > cos(pi/3+n*2*pi) with n \in Z ---> 1/2 > > > > whenever possible. Also, this simplification function should be general > > enough to work with almost any (special)function where there are known > > values for special arguments. For example this: > > > > gamma(n) with n \in N, n >= 1 ---> (n-1)! > > > > belongs to a similar class of problems. So the solution to the original > > question should be as general as possible. > > > > I think such simplifications should not necessarily be done automatically > > all the time. But they should be really easy to get if requested. > > > > I hope this makes some sense ... maybe I missed something already > present? > > > > > > -- Raoul > > > > -- > > You received this message because you are subscribed to the Google Groups > "sympy" group. > > To post to this group, send email to sympy@googlegroups.com. > > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.