# Collect is not giving me the result I expect

When I evaluate

Collect[(a ((G m ω)/c^3)^(1/2) + b ((G m ω)/c^3)^(1/2)), c]


I get this:

a Sqrt[(G m ω)/c^3] + b Sqrt[(G m ω)/c^3]


Here is a snapshot of the output.

So, both c-terms are not being collected together. I have c in two different terms in the expanded form.

I expected the following:

How can I get the form I want?

• What is your expected output? Commented Dec 6, 2014 at 18:01
• I believe that Collect does exactly what it is intended to do here. Commented Dec 6, 2014 at 20:35
• I have edited my question. Please see if it can be put off hold. Commented Dec 7, 2014 at 9:04
• I don't get it. You ask Mathematica to collect powers of a and that is precisely what it does. There is one zeroth order term and a first order term in a. Why you expect it to work on c is an enigma to me. Commented Dec 7, 2014 at 15:21
• @SjoerdC.deVries , hey, yeah, the question got wrong. It should be 'c' there - ' b ((G m ω)/c^3)^(1/2)), c]'. But even with 'c', it doesn't collect c at a single place. But the method suggested by Karsten 7. works. Commented Dec 8, 2014 at 8:42

Try this:

    expr = (a ((G m \[Omega])/c^3)^(1/2) + b ((G m \[Omega])/c^3)^(1/2));

Simplify[expr, {G > 0, c > 0, m > 0, \[Omega] > 0}]

(*   (a + b) Sqrt[(G m \[Omega])/c^3]   *)


Have fun!

You can get the desired output using

PowerExpand[(a ((G m ω)/c^3)^(1/2) + b ((G m ω)/c^3)^(1/2)), c] // Together


$\frac{a \sqrt{G m \omega }+b \sqrt{G m \omega }}{c^{3/2}}$

as

PowerExpand[(a ((G m ω)/c^3)^(1/2) + b ((G m ω)/c^3)^(1/2)), c]


$\frac{a \sqrt{G m \omega }}{c^{3/2}}+\frac{b \sqrt{G m \omega }}{c^{3/2}}$
gets c out of the square roots and Together converts the sum into a single rational function.