2
$\begingroup$

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.

Thanks for any advices!

$\endgroup$
3
  • $\begingroup$ You can get rid of all the Sqrt's by exp /. {Sqrt[hh (3 + hh)] -> x} where exp is your expression. $\endgroup$
    – bill s
    Apr 22, 2018 at 23:14
  • $\begingroup$ @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! $\endgroup$
    – Nahc
    Apr 22, 2018 at 23:49
  • $\begingroup$ Simplify after ComplexExpand rearranges things, but makes more Sqrt expressions. $\endgroup$
    – John Doty
    Apr 22, 2018 at 23:55

1 Answer 1

3
$\begingroup$

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)]

Mathematica graphics

$\endgroup$
7
  • $\begingroup$ The option Assumptions -> (_ > 0) seems unnecessary. $\endgroup$
    – Michael E2
    Apr 23, 2018 at 0:50
  • $\begingroup$ @MichaelE2 Yes, in this case. However, the OP had mentioned that they have other similar expressions where perhaps the assumption might help. I wanted to show how to quickly include a "global" assumption, as an expedient alternative to listing each symbol individually. $\endgroup$
    – MarcoB
    Apr 23, 2018 at 1:32
  • $\begingroup$ Does Assumptions -> (_ > 0) do what you think it does? I don't think Assumptions works with patterns, unless that is a V11.3 innovation. $\endgroup$
    – Michael E2
    Apr 23, 2018 at 1:33
  • $\begingroup$ @MichaelE2 I think it does. Try Simplify[Sqrt[x^2], Assumptions -> _ \[Element] Reals] with and without the Assumptions bit. $\endgroup$
    – MarcoB
    Apr 23, 2018 at 1:38
  • $\begingroup$ Apparently it sometimes works. Compare Simplify[Sqrt[x^2], Assumptions -> x < 0] with Simplify[Sqrt[x^2], Assumptions -> _ < 0]. $\endgroup$
    – Michael E2
    Apr 23, 2018 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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