>>> from sympy import *
>>> x = Symbol('x')
>>> p = (x**2 + x) / ((x - 1)*(x + 1))
>>> print(p)
(x**2 + x)/((x - 1)*(x + 1))
>>> p = simplify(p)
>>> print(p)
x/(x - 1)
This simplification is only valid for x != -1, and I haven't specified any
restrictions on the range of x. Was this done on purpose, and if so why?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/0c18b7ae-13f5-4d86-bddf-b4e4cff7b29c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.