# Simplify square roots with five or more variables, assumptions not working

Mathematica 12.0 gives me a result of the form

Sqrt[a b + x y z] Sqrt[-(1/(- a b - x y z))]


which obviously should simplify to 1. However, even with the assumption

Simplify[Sqrt[a b + x y z] Sqrt[-(1/(- a b - x y z))], a b + x y z > 0]


Mathematica refuses to further simplify this expression. If I set any of the five variables to one by hand (i.e. delete, for instance, all occurrences of a) then it correctly simplifies.

What is the reason for this strange behaviour and how can I get Mathematica to fully simplify square root expressions like this?

• As a workaround, I can square the result and then take the square root, but I would still prefer to understand the cause of the issue. Commented Sep 22, 2020 at 14:21
• Try this: FullSimplify[Sqrt[a b + x y z] Sqrt[-(1/(-a b - x y z))], Element[{a, b, x, y, z}, PositiveReals]] Commented Sep 22, 2020 at 14:26
• Since it chokes on too many variables, as a workaround reduce the number of variables. expr = Sqrt[a b + x y z] Sqrt[-(1/(-a b - x y z))]; expr /. x y z :> t // Simplify[#, a b + t > 0] & Commented Sep 22, 2020 at 14:50
• Sqrt[a b + x y z] Sqrt[-(1/(-a b - x y z)) // Simplify] // PowerExpand Commented Sep 22, 2020 at 17:04
• A problem seems to be with simplifying Sign. The expression Assuming[a b + x y z > 0, Sqrt[a b + x y z] Sqrt[-(1/(-a b - x y z)) // Simplify] // ComplexExpand[#, TargetFunctions -> {Re, Im}] & // FullSimplify] with v12.1.1 evaluates to 1/Sign[a b + x y z] and the Sign is obviously 1 Commented Sep 22, 2020 at 18:48

The simplify work for Sqrt if we assumption that all the variables is positive real numbers.
Simplify[Sqrt[a b + x y z] Sqrt[-(1/(-a b - x y z))],

• @André Sqrt[z] is a complex and difficult function that I could not understand completely :) Commented Sep 22, 2020 at 14:45
• @André except when they're all exactly zero of course, in which case it's Indeterminate Commented Sep 22, 2020 at 17:35