Comment #5 on issue 1568 by smichr: factoring is working too hard
http://code.google.com/p/sympy/issues/detail?id=1568

Also, perhaps factor should do deep factoring first to obtain a better factorization.
Consider:

df=-(1 - x)**2*(4 + x)/((2 + x)*(a + x)**2) - (1 - x)**2*(4 + x)/((2 + x)**2*(a +
x)) - (2 - 2*x)*(4 + x)/((2 + x)*(a + x)) + (1 - x)**2/((2 + x)*(a + x))
factor(df)
(1 - x)*(-7/((2 + x)*(a + x)) - 4/((2 + x)*(2*a*x + a**2 + x**2)) - 4/((a + x)*(4 + 4*x + x**2)) + x**2/((2 + x)*(2*a*x + a**2 + x**2)) + x**2/((a + x)*(4 + 4*x + x**2)) - 3*x/((2 + x)*(a + x)) + 3*x/((2 + x)*(2*a*x + a**2 + x**2)) + 3*x/((a + x)*(4 + 4*x
+ x**2)))

If the denominators had been factored it would have been possible to simplify this
further:

n,d=df.as_numer_denom();factor(n)/factor(d)
-(1 - x)*(8 + 16*x + 18*a + 10*a*x + 5*x**2 + 2*a*x**2 + x**3)/((2 + x)**2*(a + x)**2)

It seems like factor should do this without user preprocessing.

--
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 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.

Reply via email to