Comment #1 on issue 1619 by smichr: examples/advanced/curvilinear_coordinates.py is very slow http://code.google.com/p/sympy/issues/detail?id=1619
One problem I see is that when substituting a pattern like a*sin(b)**2 with a-a*cos(b)**2, if there is a term a**2*sin(b)**2 in the expression, too, then it get replaced as a*(a-a*cos(b)**2) and unless an expansion is done, the term in the parenthesis will not find the terms with which to cancel and progress is not made in simplifying. e.g. here is a term that arises in that example file: >>> q (w*y*cos(t*w)**2 + w*y*sin(t*w)**2)/(1 + w**2*x**2*cos(t*w)**2 + w**2*x**2*sin(t*w)**2 + w**2*y**2*cos(t*w)**2 + w**2*y**2*sin(t*w)**2 - 2*w**2*x**2*cos(t*w)**2*sin(t*w)**2 - 2*w**2*y**2*cos(t*w)**2*sin(t*w)**2 - w**2*x**2*cos(t*w)**4 - w**2*x**2*sin(t*w)**4 - w**2*y**2*cos(t*w)**4 - w**2*y**2*sin(t*w)**4) >>> simplify(q) (w*y*cos(t*w)**2 + w*y*sin(t*w)**2)/(1 + w**2*x**2*cos(t*w)**2 + w**2*x**2*sin(t*w)**2 + w**2*y**2*cos(t*w)**2 + w**2*y**2*sin(t*w)**2 - 2*w**2*x**2*cos(t*w)**2*sin(t*w)**2 - 2*w**2*y**2*cos(t*w)**2*sin(t*w)**2 - w**2*x**2*cos(t*w)**4 - w**2*x**2*sin(t*w)**4 - w**2*y**2*cos(t*w)**4 - w**2*y**2*sin(t*w)**4) No progres...but >>> q.subs(sin(t*w)**2,1-cos(t*w)**2).expand() w*y Very small result. We need better trigsimp'ing. /c -- 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 -~----------~----~----~----~------~----~------~--~---
