Consider the following expression:

$\sqrt{a x} \sqrt{b x}$

What do I use to make it simplify to:

$\sqrt{ab} x$

I tried actually everything (Simplify, FullSimplify, Collect and so on...) and such expressions remain unchanged.

Thanks in Advance and Regards,



You can try `PowerExpand``

Sqrt[a x] Sqrt[b x] // PowerExpand 
Sqrt[a] Sqrt[b] x
  • 2
    $\begingroup$ This is equivalent to assuming a and b being reals. According to the documentation, PowerExpand always assumes real numbers and integer exponents. $\endgroup$ Aug 17 '12 at 12:32
  • $\begingroup$ Thanks a lot for all answers. This is one that fits my needs the most. $\endgroup$
    – Misery
    Aug 17 '12 at 18:52

I am answering this up to the letter: (1) combining powers of x, (2) grouping a and b under the same square root.

Simplify[Sqrt[a x] Sqrt[b x], Assumptions -> {a > 0, b > 0}]

Sqrt[a b] x

FullSimplify[Sqrt[a x] Sqrt[b x], Assumptions -> {a > 0, b > 0}]

Sqrt[a b] x

Refine[Sqrt[a x ] Sqrt[b x ], Assumptions -> {a > 0, b > 0}]

Sqrt[a b] x

Refine[Sqrt[a x ] Sqrt[b x ], a > 0 && b > 0]

Sqrt[a b] x

  • $\begingroup$ It seems that when using Simplify and FullSimplify, we can get the result with setting any 2 of the 3 variables as a nonnegative number, for example, {x >= 0, b > 0} is also available, but I don't know the exact reason… $\endgroup$
    – xzczd
    Aug 17 '12 at 7:54
  • $\begingroup$ @xzczd My guess is, in your case, a is left alone and b brought under Sqrt[a] as positive number. $\endgroup$ Aug 17 '12 at 8:00
  • $\begingroup$ Just now, I accidentally found that if b is a certain positive number, Simplify , FullSimplify and Refine won't work 囧: b = 2; Simplify[Sqrt[a x] Sqrt[b x], x > 0 && a > 0], the result is: Sqrt[2] Sqrt[a] x $\endgroup$
    – xzczd
    Aug 17 '12 at 8:13
  • 1
    $\begingroup$ @xzczd: That's because Mathematica pulls the factor out during normal evaluation: Sqrt[2 a] evaluates to Sqrt[2] Sqrt[a]. Thus even if Simplify should combine them, you'll never see that because subsequent evaluation will undo it. $\endgroup$
    – celtschk
    Aug 17 '12 at 10:44
  • $\begingroup$ @celtschk then, what if I want to get Sqrt[2 a] x? $\endgroup$
    – xzczd
    Aug 17 '12 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.