Forcing the simplification of ratios of radicals

Mathematica seems to have trouble with expressions like

$$\sqrt{\frac{1}{x}} \sqrt{x}$$

Oddly, it doesn't have trouble with

$$\frac{\sqrt{x}}{\sqrt{x}}$$

which will happily simplify to $$1$$ even without invoking Simplify. I know that usually FullSimplify not doing what you expect is because of unconscious assumptions you're not telling Mathematica about, but I'm at a loss as for what value of $$x$$ I could be talking about where the above two expressions wouldn't be equal...

At any rate, is there any way to force FullSimplify to give the expected result (i.e. $$1$$) in the first of the above cases?

• Test several assumptions and you will find a counterexample: Grid[Assuming[#, {HoldForm[#], Sqrt[1/x] Sqrt[x]} // Simplify] & /@ {x > 0, x >= 0, x <= 0, x < 0}] Oct 27, 2019 at 23:48

Your requested simplification is not true for negative numbers:

Sqrt[1/x] Sqrt[x] /. x -> -1


-1

You can give FullSimplify an assumption to get your desired output:

FullSimplify[Sqrt[1/x] Sqrt[x], x > 0]


1

• .... Hm. Okay, so that does in fact work in this specific simplification, but when I tried that in my actual use case, it 'bounced' again. Lemme explore a bit and update my question. Oct 28, 2019 at 0:26
• Okay, so, for more complicated examples with multiple variables, neither {_>0} nor (for example) {m, M}>0 will work. You have to write out in painstaking detail {m>0,M>0,...}. I'd like to do that automatically or at least with much less typing; is that new question territory or edit-my-question territory? Oct 28, 2019 at 0:29
• @linkhyrule5 Try Thread[{m, M}>0]. Or Positive[{m, M}]. Oct 28, 2019 at 3:11
• @MichaelE2 That works. Thanks! Oct 28, 2019 at 5:04