Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3819 by abro...@verizon.net: trigsimp gives bad results for non-commutative symbols
http://code.google.com/p/sympy/issues/detail?id=3819

Consider the following code -

from sympy import symbols, trigsimp, sin, cos

(r,th) = symbols('r,th')
(e_r,e_th) = symbols('e_r,e_th',commutative=False)
#(e_r,e_th) = symbols('e_r,e_th')
A = -r*sin(th)**2*e_r - r*sin(th)*cos(th)*e_th

print A
B = A/(r*sin(th))
print B
print trigsimp(B)

the output of print trigsimp(B) is

-2*(sin(th)*e_r + cos(th)*e_th)

if e_r and e_th are commutative symbols the output is

-e_r*sin(th) - e_th*cos(th)

which is correct. There is a problem with trigsimp if the expression contain non-commutative symbols.



--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to