What's the best way to pull out a common coefficient not depending on a
given variable from an expression?  I know there are a lot of functions
that do things like this, but I never know which one to use.  I want
something like (all with respect to x):

3*x -> (3, x)
3*x + x**3 -> (1, 3*x + x**3)
y*x + y*x**2 -> (y, x + x**2)

My motivation is to pull out a common constant for integrate().  Currently
it splits the integral using Add.make_args and then pulls out the constant
for each term using as_independent, but I want to remove the splitting of
Add args.

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to