You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure why #25572 was closed. A misreading of the expressions maybe? Let me try one more time.
To see the problem, please look at the term that contains the non-commuting symbols A and B in the original expression and compare it with the corresponding term in the output. Simplify has incorrectly reversed the order from BA to AB within the same term. (The other terms are just part of the context in which the problem occurs.)
from sympy import *
x = symbols('x')
A, B = symbols('A B', commutative=False)
expr = 2*cos(x)*sin(x)*B*A + cos(x)**2
print(expr.simplify())
Output
sin(2*x)*A*B + cos(2*x)/2 + 1/2
The text was updated successfully, but these errors were encountered:
I'm not sure why #25572 was closed. A misreading of the expressions maybe? Let me try one more time.
To see the problem, please look at the term that contains the non-commuting symbols A and B in the original expression and compare it with the corresponding term in the output. Simplify has incorrectly reversed the order from BA to AB within the same term. (The other terms are just part of the context in which the problem occurs.)
Output
The text was updated successfully, but these errors were encountered: