# Is there any way to force Mathematica to collect a symbol in a polynomial?

Let's say that I have a polynomial like this:

a + b + c


Is there any way that I can get Mathematica to transform it to:

a*(1 + b/a + c/a)


I found such a manipulation on polynomials very common when deducing equations by hand; however, I have been trying all day and still can not figure out how to make Mathematica do this automatically.

-
Does tst = a + b + c; a Expand[tst/a] not do what you want? – J. M. Apr 8 '13 at 11:35
Oh my god it's so simple. I'm all hooked up on functions like Collect and stuff. Now I just feel stupid. Any way, thanks for this solution. – user2256793 Apr 8 '13 at 11:42

You can try a pattern matching approach (for a bit more advanced users) e.g. :

(a + b + c) /. Plus[c___, x_, b___] :> a Expand[Plus[c, x/a, b]]

a (1 + b/a + c/a)


or simpler :

(a + b + c) /. Plus[x___] :>  a Expand[Plus[x/a]]

-
Thanks, this is actually a better idea. It can be used on the manipulation of complicated expressions. – user2256793 Apr 8 '13 at 12:05