Very simple question, but I can't find a simple answer here or in the documentation. I have an expression:
qq = a x + b x^2 + c x^3
and wish to factor out a defined variable/constant to get for example:
qq = b (a/b x + x^2 + c/b x^3)
Bonus points for simplicity/readability.
FactorByVariable[p_, c_] := c Expand[p/c]wherepis your polynomial,cis the variable you want to factor out. – IPoiler Oct 02 '15 at 03:21