# Smart way of simplifying an expression with square roots?

I have some long expressions with square roots in them, but I know that if I can simplify these expressions, the result shouldn't have square roots. But Mathematica is not able to simplify these expression. Assume all the variables are large than 0.

((5 Sqrt[hh (3 + hh)] (2 hh^2 + 3 Sqrt[hh (3 + hh)] +
2 hh (3 + Sqrt[hh (3 + hh)]))^2 (9 + 8 hh^2 +
12 Sqrt[hh (3 + hh)] + 8 hh (3 + Sqrt[hh (3 + hh)]))^3 (hh^2 +
4 hH (-1 + 4 hH) + hh (-1 + 8 hH)) (-1 + hh + 4 hL) (hh +
4 hL))/((-1 + c + 8 hh) (hh + Sqrt[hh (3 + hh)]) (3 + hh + Sqrt[
hh (3 + hh)]) (-3 + 2 hh + 2 Sqrt[hh (3 + hh)]) (3 + 2 hh +
2 Sqrt[hh (3 + hh)])^5 (9 + 2 hh + 2 Sqrt[hh (3 + hh)]) (3 +
4 hh + 4 Sqrt[hh (3 + hh)]) (9 + 4 hh + 4 Sqrt[hh (3 + hh)])))// Simplify[#, hh > 0 && hL > 0 && hH > 0 && c > 0] &


I've tried Expand, FullSimplify, etc, but non of them works.

• You can get rid of all the Sqrt's by exp /. {Sqrt[hh (3 + hh)] -> x} where exp is your expression. – bill s Apr 22 '18 at 23:14
• @bills Hey, this is just one of examples, in my other expressions, the square roots may be other form and may have different expressions in the square roots. And I'm looking for an universal way of dealing with these square roots. But thanks, anyway! – Nahc Apr 22 '18 at 23:49
• Simplify after ComplexExpand rearranges things, but makes more Sqrt expressions. – John Doty Apr 22 '18 at 23:55

It seems to work if you first Expand your expression fully, then use the assumption that you know you can make to help Simplify (expr is your expression from the OP):
Simplify[ExpandAll@expr, Assumptions -> (_ > 0)] • The option Assumptions -> (_ > 0) seems unnecessary. – Michael E2 Apr 23 '18 at 0:50
• Does Assumptions -> (_ > 0) do what you think it does? I don't think Assumptions works with patterns, unless that is a V11.3 innovation. – Michael E2 Apr 23 '18 at 1:33
• @MichaelE2 I think it does. Try Simplify[Sqrt[x^2], Assumptions -> _ \[Element] Reals] with and without the Assumptions bit. – MarcoB Apr 23 '18 at 1:38
• Apparently it sometimes works. Compare Simplify[Sqrt[x^2], Assumptions -> x < 0] with Simplify[Sqrt[x^2], Assumptions -> _ < 0]. – Michael E2 Apr 23 '18 at 1:40