Thank you! On Friday, March 14, 2014 6:48:07 PM UTC+1, Sergey Kirpichev wrote: > > > > On Friday, March 14, 2014 9:30:24 PM UTC+4, [email protected] wrote: >> >> 3. If I knew that one term is in the form of "(a - b)", would the help? >> > > Yes, for example: > In [2]: e = a**4 - 4*a**3*b + 6*a**2*b**2 - 4*a*b**3 - a + b**4 > > In [3]: e > Out[3]: > 4 3 2 2 3 4 > a - 4⋅a ⋅b + 6⋅a ⋅b - 4⋅a⋅b - a + b > > In [4]: e2 = e.subs(a, x + b) > > In [5]: e2.expand() > Out[5]: > 4 > -b + x - x > > In [6]: e2.expand().subs(x, a - b) > Out[6]: > 4 > -a + (a - b) > >
-- 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 http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/50f14bd3-cecd-4bee-8b15-3a44792a0110%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
