On Mon, Jan 9, 2012 at 1:33 PM, Kevin Hunter <hunt...@gmail.com> wrote:
> Hullo Sympy Group, > > I have a series of relations that I am receiving from an outside object > and code base. These equations are in no particular format, and I want to > convert them to one. At the moment, the end format I need is > > In case there is any nesting of your expressions, you might want to apply `expand_mul(expand_multinomial(eq.lhs - eq.rhs))` to make sure the expression is flat: >>> eq 3*x*(x + y) == -x + 3 >>> expand_mul(expand_multinomial(eq.lhs - eq.rhs)).as_coeff_Add() (-3, 3*x**2 + 3*x*y + x) >>> Eq(_[1], -_[0]) 3*x**2 + 3*x*y + x == 3 -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.