To me, the expression Sqrt[2]Sqrt[x]
is more complex than Sqrt[2x]
. But even if I merely input the latter, I get the former as output. I'd like to simplify expressions where such square roots could get additional terms inside, so Inactivate
or Defer
don't really help. See e.g. this:
FullSimplify[Sqrt[2 x] Sqrt[y], x > 0 && y > 0]
This gives me Sqrt[2] Sqrt[x y]
as a result, while I'd prefer Sqrt[2 x y]
. Even if I specify complexity function like the following, it still doesn't help:
FullSimplify[Sqrt[2 x] Sqrt[y], x > 0 && y > 0,
ComplexityFunction -> (Times@@ImageDimensions@Rasterize[#] &)]
And this is despite these results:
Times@@ImageDimensions@Rasterize[Sqrt[2 x]]
Times@@ImageDimensions@Rasterize[HoldForm[Sqrt[2 x]]]
1323
903
I've looked at SystemOptions["SimplificationOptions"]
, but haven't found anything related to this type of simplification.
Is there any way to prevent such splitting of constants from the radical?