1
$\begingroup$

I am trying to cancel common factors under square roots in some expression with all positive real variables: $$\text{Simplify}\left[\frac{\left(3+\sqrt{6}\right) \sqrt{g} \text{nn}^4}{2 \sqrt{\text{nn}^7 P*T}},\text{nn}>0\land P>0\land T>0\right]$$

which returns the same thing $$\frac{\left(3+\sqrt{6}\right) \sqrt{g} \text{nn}^4}{2 \sqrt{\text{nn}^7 P T}}.$$

However, removing the assumptions for $P,T$ makes it work: $$\text{Simplify}\left[\frac{\left(3+\sqrt{6}\right) \sqrt{g} \text{nn}^4}{2 \sqrt{\text{nn}^7 P T}},\text{nn}>0\right]$$ $$\frac{\left(3+\sqrt{6}\right) \sqrt{g \text{nn}}}{2 \sqrt{P T}}.$$

Why does it happen? And a more important question, what is a better way to cancel common factors under roots with positive real variables in the more general case with larger expressions and many variables to cancel, so that I am sure no common factors remain?

$\endgroup$
0
$\begingroup$

Maybe you are looking for the function PowerExpand?

PowerExpand[((3 + Sqrt[6]) nn^4 Sqrt[g])/(2 Sqrt[nn^7 P*T])]

(*   ((3+Sqrt[6]) Sqrt[g] Sqrt[nn])/(2 Sqrt[P] Sqrt[T])  *)
$\endgroup$
  • $\begingroup$ Good! It does the job. $\endgroup$ – xivaxy Oct 17 '14 at 17:26
0
$\begingroup$

It works for me if I turn the simplifications into a list:

{nn>0,P>0,T>0}.
$\endgroup$
  • $\begingroup$ Simplify[((3 + Sqrt[6]) nn^4 Sqrt[g])/( 2 Sqrt[nn^7 P*T]), {nn > 0, P > 0, T > 0}] still gives the same result for me. I am using Mathematica 10.0.0.0 $\endgroup$ – xivaxy Oct 17 '14 at 17:03
  • $\begingroup$ Odd. What about using Refine instead of Simplify? Both work for me. $\endgroup$ – Lauren Pearce Oct 17 '14 at 17:14
  • $\begingroup$ Refine[...,{nn > 0, P > 0, T > 0}] works nicely. So, finally I need to do either Simplify[Refine[...,assumptions]], or Simplify[PowerExpand[...],assumption] $\endgroup$ – xivaxy Oct 17 '14 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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