Comment #11 on issue 1274 by akshaysrinivasan: trigsimp doesn't like decimals http://code.google.com/p/sympy/issues/detail?id=1274
Try : >>> trigsimp(sin(x)**2.0+cos(x)**2) 1 The power of cos(x) is an Integer. The problem is that in trigsimp_nonrecursive, sin(x)**2 in the expression gets replaced by 1-cos(x)**2 ; this -usually- simplifies sin(x)**2 + cos(x)**2 to 1 . Here, although sin(x)**2.0 is replaced by 1-cos(x)**2 , the resulting expression (1 - cos(x)**2 + cos(x)**2.0) does not sum to 1 - see bug 1374. So trigsimp continues and tries to remove "lingering artifacts" - replacing things like a-a*cos(x)**2 with a*sin(x)**2. Here it tries to match the expression to a bunch of patterns. The exception arises from trigsimp trying to match (1-cos(x)**2 +cos(x)**2.0) to ( a_ + c_ - a_*cos(b_)**2 ) I'm quite sure this issue is a result of bug 1374. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---
