Status: Accepted
Owner: asmeurer
CC: mattpap
Labels: Type-Defect Priority-Medium Polynomial Simplify
New issue 2029 by asmeurer: Poly simplification functions need a deep option
http://code.google.com/p/sympy/issues/detail?id=2029
I know there is the use() function in polys11, but I think there should
also just be a deep option to the Poly simplification functions like
factor() and cancel() that works similar to the deep options to expand()
and powsimp(). For example, suppose I want to simplify the following:
In [1]: print cancel(log((x**2 - 1)/(x + 1)))
-log(1 + x) + log(-1 + x**2)
In [2]: print factor(log(x**2 - 1))
log(-1 + x**2)
Now, this is how I would expect it to work:
In [3]: print cancel(log((x**2 - 1)/(x + 1)), deep=True)
log(-1 + x)
In [4]: print factor(log(x**2 - 1), deep=True)
log(-(1 + x)*(1 - x))
Ideally you could then call expand() on the output of [4] and get log(x +
1) + log(-1 + x), but expand() has assumptions based restrictions on log
expansion that prevent it from doing that (these make it worthless in my
opinion, but that's another issue).
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.