# Simplifying Radicals in Numerator and Denominator

I am new to Mathematica. So I am sorry if the question seems elementary.

I wanted to simplify an expression but it seems that some radicals ($\sqrt{u}$ and $\sqrt{u-1}$) in numerator or denominator do not cancel. What should I do?

f = Sqrt[u (-1 + u^2) - (-1 + u^2)^2] ((u (-1 + 2 u))/(
2 Sqrt[-u + u^2]) + Sqrt[-u + u^2])

FullSimplify[f]


and the result is

My final goal is to get

$$f = {1 \over 2}\sqrt { - u\left( {u + 1} \right)\left( {{u^2} - u - 1} \right)} \left( {4u - 3} \right)$$

• Is u positive? If so, is it greater than 1? This matters in the cancellations. Commented Jan 18, 2016 at 11:17
• People here generally like users to post code as Mathematica code instead of images or TeX, so they can copy-paste it, as @rhermans said. It makes it convenient for them and more likely you will get someone to help you. You may find this this meta Q&A helpful Commented Jan 18, 2016 at 11:22
• @MichaelE2: OK. Thanks for the guide. I will do so. Commented Jan 18, 2016 at 11:24
• Have you read the documentation about FullSimplify, esp. the parts that explain this summary, "FullSimplify[expr,assum] does simplification using assumptions."? Commented Jan 18, 2016 at 11:24

Is this what you are seeking?

FullSimplify[f, u > 1]
(* 1/2 u (-3 + 4 u) Sqrt[2 + 1/u - u^2] *)


Response to edit in question

The LeafCount of this result is

LeafCount[%]
(* 24 *)


On the other hand, the LeafCount of the outcome desired by the OP is

g = 1/2  (-3 + 4 u) Sqrt[-u (u + 1) (u^2 - u - 1)]
LeafCount[%]
(* 27 *)


Note also that

FullSimplify[g, u > 1]
(* 1/2 (-3 + 4 u) Sqrt[u + 2 u^2 - u^4] *)
LeafCount[%]
(* 25 *)


which may be a more desirable result, if 1/u is not wanted in my first answer. I should add that most any transformation of f can be obtained with FullSimplify, but often not easily.

• Can you kindly see the updated question. I think it is not really fully simplified yet! $\sqrt{u}$ is not cancelled! Commented Jan 18, 2016 at 11:31
• @@bbgodfrey, What is FullSimplify doing with these assumptions? The answer it comes out with does not depend on the assumptions, and seems to be true for any complex value of u: f2 = FullSimplify[f, u > 1]; Equal @@ {f, f2} /. u -> RandomComplex[{-10 - 10 I, 10 + 10 I}] Commented Jan 18, 2016 at 11:40
• @H.R. The issue is that your desired "simplified" result is less simple than mine as assessed by LeafCount. Commented Jan 18, 2016 at 11:49
• It's interesting that your form can be found by making the unnecessary assumption that u>1 (does that imply that Element[u,Reals]?), the OP's desired form is only true when u>1. Commented Jan 18, 2016 at 11:55
• @JasonB The two expressions seem to be equal in many but not all cases. Consider Equal @@ {f, f2} /. u -> .5 + .3 I, which is True. However, Equal @@ {f, f2} /. u -> .5 - .3 I is False. Interesting question, nonetheless. Commented Jan 18, 2016 at 12:06